summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-24 00:44:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-24 00:44:26 +0000
commitd9120d35750e94c3bf5209fb04fa1bcd918426bb (patch)
tree01d1c90219964b69da42255e742214c929f137d3
parent20327b04229afa9a252219e53f5415ee312b4a6a (diff)
downloadbcm5719-llvm-d9120d35750e94c3bf5209fb04fa1bcd918426bb.tar.gz
bcm5719-llvm-d9120d35750e94c3bf5209fb04fa1bcd918426bb.zip
Shorten the static analyzer diagnostic for 'use of garbage value'.
llvm-svn: 82672
-rw-r--r--clang/lib/Analysis/GRExprEngineInternalChecks.cpp4
-rw-r--r--clang/test/Analysis/uninit-vals-ps-region.c2
-rw-r--r--clang/test/Analysis/uninit-vals-ps.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
index 2eb5589117f..cc1ec4b77e4 100644
--- a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
+++ b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
@@ -235,9 +235,9 @@ public:
if (Ex) {
OS << "The " << (isLeft ? "left" : "right")
- << " operand of the '"
+ << " operand of '"
<< BinaryOperator::getOpcodeStr(B->getOpcode())
- << "' expression is a garbage value";
+ << "' is a garbage value";
}
else {
// Neither operand was undefined, but the result is undefined.
diff --git a/clang/test/Analysis/uninit-vals-ps-region.c b/clang/test/Analysis/uninit-vals-ps-region.c
index 716b7c920fa..1561f11c993 100644
--- a/clang/test/Analysis/uninit-vals-ps-region.c
+++ b/clang/test/Analysis/uninit-vals-ps-region.c
@@ -25,7 +25,7 @@ void test_uninit_pos() {
struct TestUninit v2 = test_uninit_aux();
int z;
v1.y = z;
- test_unit_aux2(v2.x + v1.y); // expected-warning{{The right operand of the '+' expression is a garbage value}}
+ test_unit_aux2(v2.x + v1.y); // expected-warning{{The right operand of '+' is a garbage value}}
}
void test_uninit_neg() {
struct TestUninit v1 = { 0, 0 };
diff --git a/clang/test/Analysis/uninit-vals-ps.c b/clang/test/Analysis/uninit-vals-ps.c
index 32b4324a7da..759c7edbcc5 100644
--- a/clang/test/Analysis/uninit-vals-ps.c
+++ b/clang/test/Analysis/uninit-vals-ps.c
@@ -22,7 +22,7 @@ int f2() {
int x;
- if (x+1) // expected-warning{{The left operand of the '+' expression is a garbage value}}
+ if (x+1) // expected-warning{{The left operand of '+' is a garbage value}}
return 1;
return 2;
@@ -31,13 +31,13 @@ int f2() {
int f2_b() {
int x;
- return ((1+x)+2+((x))) + 1 ? 1 : 2; // expected-warning{{The right operand of the '+' expression is a garbage value}}
+ return ((1+x)+2+((x))) + 1 ? 1 : 2; // expected-warning{{The right operand of '+' is a garbage value}}
}
int f3(void) {
int i;
int *p = &i;
- if (*p > 0) // expected-warning{{The left operand of the '>' expression is a garbage value}}
+ if (*p > 0) // expected-warning{{The left operand of '>' is a garbage value}}
return 0;
else
return 1;
OpenPOWER on IntegriCloud