2012-12-02 13:20:44 +00:00
|
|
|
// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s
|
|
|
|
// expected-no-diagnostics
|
2010-03-06 09:23:02 +00:00
|
|
|
|
2012-04-14 14:01:31 +00:00
|
|
|
// Test when entering f1(), we set the right AnalysisDeclContext to Environment.
|
2010-03-06 09:23:02 +00:00
|
|
|
// Otherwise, block-level expr '1 && a' would not be block-level.
|
|
|
|
int a;
|
|
|
|
|
|
|
|
void f1() {
|
|
|
|
if (1 && a)
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void f2() {
|
|
|
|
f1();
|
|
|
|
}
|