diff options
author | dim <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
commit | e7bcad327814a78ecb8d5f5545d2e3df84c67a5c (patch) | |
tree | ac719b5984165053bf83d71142e4d96b609b9784 /test/Analysis/test-include-cpp.cpp | |
parent | 9dd834653b811ad20382e98a87dff824980c9916 (diff) | |
download | FreeBSD-src-e7bcad327814a78ecb8d5f5545d2e3df84c67a5c.zip FreeBSD-src-e7bcad327814a78ecb8d5f5545d2e3df84c67a5c.tar.gz |
Vendor import of clang trunk r241361:
https://llvm.org/svn/llvm-project/cfe/trunk@241361
Diffstat (limited to 'test/Analysis/test-include-cpp.cpp')
-rw-r--r-- | test/Analysis/test-include-cpp.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Analysis/test-include-cpp.cpp b/test/Analysis/test-include-cpp.cpp new file mode 100644 index 0000000..2ac5e11 --- /dev/null +++ b/test/Analysis/test-include-cpp.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s + +#include "test-include-cpp.h" + +int TestIncludeClass::test1(int *p) { + p = 0; + return *p; // expected-warning{{Dereference of null pointer}} +} + +int TestIncludeClass::test2(int *p) { + p = 0; + return *p; // expected-warning{{Dereference of null pointer}} +} |