diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Analysis/Inputs/system-header-simulator-for-nullability-cxx.h | 9 | ||||
-rw-r--r-- | clang/test/Analysis/trustnonnullchecker_test.mm | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Analysis/Inputs/system-header-simulator-for-nullability-cxx.h b/clang/test/Analysis/Inputs/system-header-simulator-for-nullability-cxx.h new file mode 100644 index 00000000000..fe620c9ff19 --- /dev/null +++ b/clang/test/Analysis/Inputs/system-header-simulator-for-nullability-cxx.h @@ -0,0 +1,9 @@ +#pragma clang system_header + +struct S { + ~S(){} +}; + +void foo() { + S s; +} diff --git a/clang/test/Analysis/trustnonnullchecker_test.mm b/clang/test/Analysis/trustnonnullchecker_test.mm new file mode 100644 index 00000000000..fa84673492b --- /dev/null +++ b/clang/test/Analysis/trustnonnullchecker_test.mm @@ -0,0 +1,9 @@ +// RUN: %clang_analyze_cc1 -fblocks -analyze -analyzer-checker=core,nullability,apiModeling -verify %s + +#include "Inputs/system-header-simulator-for-nullability-cxx.h" + +// expected-no-diagnostics + +void blah() { + foo(); // no-crash +} |