summaryrefslogtreecommitdiffstats
path: root/test/Analysis/uninit-vals-ps-region.c
blob: 6f3762ee10bf3c056d0358889898839001af3a96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: clang-cc -analyze -checker-simple -analyzer-store=region -verify %s

struct s {
  int data;
};

struct s global;

void g(int);

void f4() {
  int a;
  if (global.data == 0)
    a = 3;
  if (global.data == 0) // When the true branch is feasible 'a = 3'.
    g(a); // no-warning
}
OpenPOWER on IntegriCloud