diff options
Diffstat (limited to 'test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h')
-rw-r--r-- | test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h b/test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h new file mode 100644 index 0000000000000..2397824fc965a --- /dev/null +++ b/test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h @@ -0,0 +1,18 @@ +// Like the compiler, the static analyzer treats some functions differently if +// they come from a system header -- for example, it is assumed that system +// functions do not arbitrarily free() their parameters, and that some bugs +// found in system headers cannot be fixed by the user and should be +// suppressed. + +#pragma clang system_header + +struct RecordInSystemHeader { + int a; + int b; +}; + +template <class T> +struct ContainerInSystemHeader { + T &t; + ContainerInSystemHeader(T& t) : t(t) {} +}; |