diff options
Diffstat (limited to 'test/Analysis/casts.c')
-rw-r--r-- | test/Analysis/casts.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c index b5e6e2784c8d..3ba12e4318de 100644 --- a/test/Analysis/casts.c +++ b/test/Analysis/casts.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s extern void clang_analyzer_eval(_Bool); @@ -118,3 +118,8 @@ void castsToBool() { extern float globalFloat; clang_analyzer_eval(globalFloat); // expected-warning{{UNKNOWN}} } + +void locAsIntegerCasts(void *p) { + int x = (int) p; + clang_analyzer_eval(++x < 10); // no-crash // expected-warning{{UNKNOWN}} +} |