diff options
author | Anna Zaks <ganna@apple.com> | 2012-05-16 18:46:25 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-05-16 18:46:25 +0000 |
commit | 533718fb27f87a25bf9f6fdd69df4a4ce8b783a6 (patch) | |
tree | 7824284ac9b2432e2578b045e62ed1e5a4d4747d | |
parent | 7e2a01ef8204e03230eda9e0034b4007ec04d179 (diff) |
[analyzer] Revert a regression committed in r156920.
This breaks the build with -triple i386-apple-darwin9.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156932 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/string.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/Analysis/string.c b/test/Analysis/string.c index 4e9d51f4c1..d6b482b015 100644 --- a/test/Analysis/string.c +++ b/test/Analysis/string.c @@ -1062,12 +1062,11 @@ void PR12206(const char *x) { // Constrain the length of x. if (strlen(x) != value) return; - // Test relational operators. - clang_analyzer_eval(strlen(x) >= 2); // expected-warning{{TRUE}} - clang_analyzer_eval(2 <= strlen(x)); // expected-warning{{TRUE}} + if (strlen(x) < 2) { (void)*(char*)0; } // no-warning + if (2 > strlen(x)) { (void)*(char*)0; } // no-warning // Test equality operators. - clang_analyzer_eval(strlen(x) != 1); // expected-warning{{TRUE}} - clang_analyzer_eval(1 != strlen(x)); // expected-warning{{TRUE}} + if (strlen(x) == 1) { (void)*(char*)0; } // no-warning + if (1 == strlen(x)) { (void)*(char*)0; } // no-warning } |