Ted Kremenek | 6c07bdb | 2009-06-26 00:05:51 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -analyze -checker-cfref -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 | } |