Nuno Lopes | 282f753 | 2009-01-30 13:01:29 +0000 | [diff] [blame] | 1 | // RUN: clang -analyze -checker-simple -analyzer-store-region -verify %s |
Zhongxing Xu | e8e4d8c | 2008-11-20 00:46:15 +0000 | [diff] [blame] | 2 | |
3 | struct s { | ||||
4 | int data; | ||||
5 | }; | ||||
6 | |||||
7 | struct s global; | ||||
8 | |||||
9 | void g(int); | ||||
10 | |||||
11 | void f4() { | ||||
12 | int a; | ||||
13 | if (global.data == 0) | ||||
14 | a = 3; | ||||
Ted Kremenek | 4226846 | 2008-12-04 02:07:20 +0000 | [diff] [blame] | 15 | if (global.data == 0) // When the true branch is feasible 'a = 3'. |
Zhongxing Xu | e8e4d8c | 2008-11-20 00:46:15 +0000 | [diff] [blame] | 16 | g(a); // no-warning |
17 | } |