diff options
Diffstat (limited to 'test/Analysis/inline3.c')
-rw-r--r-- | test/Analysis/inline3.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/inline3.c b/test/Analysis/inline3.c new file mode 100644 index 0000000..3661263 --- /dev/null +++ b/test/Analysis/inline3.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -analyze -inline-call -analyzer-store region -analyze-function f2 -verify %s + + +// Test when entering f1(), we set the right AnalysisContext to Environment. +// Otherwise, block-level expr '1 && a' would not be block-level. +int a; + +void f1() { + if (1 && a) + return; +} + +void f2() { + f1(); +} |