llvm-project/clang/test/Analysis/test-include-cpp.cpp
Dominic Chen 4a90bf8c3f Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support multiple constraint managers"
This reverts commit f93343c099fff646a2314cc7f4925833708298b1.

llvm-svn: 296836
2017-03-02 22:58:06 +00:00

14 lines
321 B
C++

// 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}}
}