summaryrefslogtreecommitdiffstats
path: root/test/Analysis/dtor.cpp
blob: ea5b04684d7f62c99d92ae7abdf3f496c5a30e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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;
}
OpenPOWER on IntegriCloud