summaryrefslogtreecommitdiffstats
path: root/test/Analysis/initializer.cpp
blob: 2fa3a9eb86a7bbab19ddc951d8864eac38fabc15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -cfg-add-initializers -verify %s

class A {
  int x;
public:
  A();
};

A::A() : x(0) {
  if (x != 0) {
    int *p = 0;
    *p = 0; // no-warning
  }
}
OpenPOWER on IntegriCloud