forked from OSchip/llvm-project
14 lines
271 B
C++
14 lines
271 B
C++
|
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -analyzer-inline-call -cfg-add-implicit-dtors -verify %s
|
||
|
|
||
|
class A {
|
||
|
public:
|
||
|
~A() {
|
||
|
int *x = 0;
|
||
|
*x = 3; // expected-warning{{Dereference of null pointer}}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
int main() {
|
||
|
A a;
|
||
|
}
|