diff options
Diffstat (limited to 'test/Analysis/inline.c')
-rw-r--r-- | test/Analysis/inline.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/Analysis/inline.c b/test/Analysis/inline.c index 0827d93461..73d629a04a 100644 --- a/test/Analysis/inline.c +++ b/test/Analysis/inline.c @@ -1,4 +1,6 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-ipa=inlining -analyzer-store region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-ipa=inlining -analyzer-store region -verify %s + +void clang_analyzer_eval(int); int test1_f1() { int y = 1; @@ -90,3 +92,14 @@ int test_rdar10977037() { } +// Test inlining a forward-declared function. +// This regressed when CallEvent was first introduced. +int plus1(int x); +void test() { + clang_analyzer_eval(plus1(2) == 3); // expected-warning{{TRUE}} +} + +int plus1(int x) { + return x + 1; +} + |