From 486754660bb926339aefcf012a3f848592babb8b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:06:01 +0000 Subject: Vendor import of clang trunk r338150: https://llvm.org/svn/llvm-project/cfe/trunk@338150 --- ...tem-header-simulator-for-cxx-uninitialized-object.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h (limited to 'test/Analysis/Inputs/system-header-simulator-for-cxx-uninitialized-object.h') 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 +struct ContainerInSystemHeader { + T &t; + ContainerInSystemHeader(T& t) : t(t) {} +}; -- cgit v1.2.3