diff options
Diffstat (limited to 'clang/test/Analysis/inline3.c')
-rw-r--r-- | clang/test/Analysis/inline3.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Analysis/inline3.c b/clang/test/Analysis/inline3.c new file mode 100644 index 00000000000..3661263b6ba --- /dev/null +++ b/clang/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(); +} |