diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-20 19:36:41 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-20 19:36:41 +0000 |
| commit | 2f4e33aba2317facb9be01c287a29d14c9753624 (patch) | |
| tree | 8cbccfb239a2e4e54729b104ef2f8bc39138be67 /clang/test/Analysis | |
| parent | 85568adcee7086578f6fe9a6518ca151ad540f70 (diff) | |
| download | bcm5719-llvm-2f4e33aba2317facb9be01c287a29d14c9753624.tar.gz bcm5719-llvm-2f4e33aba2317facb9be01c287a29d14c9753624.zip | |
Improvements to my patch in r164143 per
Richard's comments. // rdar://12202422
llvm-svn: 164316
Diffstat (limited to 'clang/test/Analysis')
| -rw-r--r-- | clang/test/Analysis/additive-folding.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Analysis/additive-folding.cpp b/clang/test/Analysis/additive-folding.cpp index 7355a752469..4d58f1c20d5 100644 --- a/clang/test/Analysis/additive-folding.cpp +++ b/clang/test/Analysis/additive-folding.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -analyzer-constraints=range -Wno-tautological-compare %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -analyzer-constraints=range -Wno-tautological-compare -Wtautological-constant-out-of-range-compare %s void clang_analyzer_eval(bool); @@ -128,10 +128,10 @@ void tautologies(unsigned a) { // Tautologies from outside the range of the symbol void tautologiesOutside(unsigned char a) { - clang_analyzer_eval(a <= 0x100); // expected-warning{{comparison of literal 256 with expression of type 'unsigned char' is always true}} expected-warning{{TRUE}} - clang_analyzer_eval(a < 0x100); // expected-warning{{comparison of literal 256 with expression of type 'unsigned char' is always true}} expected-warning{{TRUE}} + clang_analyzer_eval(a <= 0x100); // expected-warning{{comparison of constant 256 with expression of type 'unsigned char' is always true}} expected-warning{{TRUE}} + clang_analyzer_eval(a < 0x100); // expected-warning{{comparison of constant 256 with expression of type 'unsigned char' is always true}} expected-warning{{TRUE}} - clang_analyzer_eval(a != 0x100); // expected-warning{{comparison of literal 256 with expression of type 'unsigned char' is always true}} expected-warning{{TRUE}} + clang_analyzer_eval(a != 0x100); // expected-warning{{comparison of constant 256 with expression of type 'unsigned char' is always true}} expected-warning{{TRUE}} clang_analyzer_eval(a != -1); // expected-warning{{TRUE}} clang_analyzer_eval(a > -1); // expected-warning{{TRUE}} |

