summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/bstring.c
diff options
context:
space:
mode:
authorTom Care <tcare@apple.com>2010-07-27 23:30:21 +0000
committerTom Care <tcare@apple.com>2010-07-27 23:30:21 +0000
commit29a6250bf0755777f2e3d0b0c46c6623166c3a00 (patch)
tree1ae695103886ace1c181a0dbe7d20e08e65e8c30 /clang/test/Analysis/bstring.c
parent76bdd685c2689d75f2f096574c9ac4092092c101 (diff)
downloadbcm5719-llvm-29a6250bf0755777f2e3d0b0c46c6623166c3a00.tar.gz
bcm5719-llvm-29a6250bf0755777f2e3d0b0c46c6623166c3a00.zip
Added some false positive checking to UnreachableCodeChecker
- Allowed reporting of dead macros - Added path walking function to search for false positives in conditional statements - Updated some affected tests - Added some false positive test cases llvm-svn: 109561
Diffstat (limited to 'clang/test/Analysis/bstring.c')
-rw-r--r--clang/test/Analysis/bstring.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Analysis/bstring.c b/clang/test/Analysis/bstring.c
index 3a5dfab33df..418b3233003 100644
--- a/clang/test/Analysis/bstring.c
+++ b/clang/test/Analysis/bstring.c
@@ -53,7 +53,7 @@ void memcpy0 () {
memcpy(dst, src, 4); // no-warning
if (memcpy(dst, src, 4) != dst) {
- (void)*(char*)0; // expected-warning{{never executed}}
+ (void)*(char*)0; // no-warning
}
}
@@ -155,7 +155,7 @@ void memmove0 () {
memmove(dst, src, 4); // no-warning
if (memmove(dst, src, 4) != dst) {
- (void)*(char*)0; // expected-warning{{never executed}}
+ (void)*(char*)0; // no-warning
}
}
@@ -217,7 +217,7 @@ void memcmp3 () {
char a[] = {1, 2, 3, 4};
if (memcmp(a, a, 4))
- (void)*(char*)0; // expected-warning{{never executed}}
+ (void)*(char*)0; // no-warning
}
void memcmp4 (char *input) {
@@ -231,11 +231,11 @@ void memcmp5 (char *input) {
char a[] = {1, 2, 3, 4};
if (memcmp(a, 0, 0)) // no-warning
- (void)*(char*)0; // expected-warning{{never executed}}
+ (void)*(char*)0; // no-warning
if (memcmp(0, a, 0)) // no-warning
- (void)*(char*)0; // expected-warning{{never executed}}
+ (void)*(char*)0; // no-warning
if (memcmp(a, input, 0)) // no-warning
- (void)*(char*)0; // expected-warning{{never executed}}
+ (void)*(char*)0; // no-warning
}
void memcmp6 (char *a, char *b, size_t n) {
OpenPOWER on IntegriCloud