blob: 2c70fb21aa2b60683ded305d97b05fbdf6c491c1 [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Zhongxing Xu5cb8d9d2010-03-04 09:04:52 +00003
Ted Kremenek81ce1c82011-10-24 01:32:45 +00004// Test when entering f1(), we set the right AnalysisDeclContext to Environment.
Zhongxing Xu5cb8d9d2010-03-04 09:04:52 +00005// Otherwise, block-level expr '1 && a' would not be block-level.
6int a;
7
8void f1() {
9 if (1 && a)
10 return;
11}
12
13void f2() {
14 f1();
15}