summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Analysis/PathSensitive/BugType.h4
-rw-r--r--clang/lib/Analysis/VLASizeChecker.cpp6
-rw-r--r--clang/test/Analysis/misc-ps.m4
3 files changed, 7 insertions, 7 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/BugType.h b/clang/include/clang/Analysis/PathSensitive/BugType.h
index 46b3edd3172..242b8e9afeb 100644
--- a/clang/include/clang/Analysis/PathSensitive/BugType.h
+++ b/clang/include/clang/Analysis/PathSensitive/BugType.h
@@ -64,10 +64,10 @@ protected:
const std::string desc;
public:
BuiltinBug(GRExprEngine *eng, const char* n, const char* d)
- : BugType(n, "Logic errors"), Eng(*eng), desc(d) {}
+ : BugType(n, "Logic error"), Eng(*eng), desc(d) {}
BuiltinBug(GRExprEngine *eng, const char* n)
- : BugType(n, "Logic errors"), Eng(*eng), desc(n) {}
+ : BugType(n, "Logic error"), Eng(*eng), desc(n) {}
const std::string &getDescription() const { return desc; }
diff --git a/clang/lib/Analysis/VLASizeChecker.cpp b/clang/lib/Analysis/VLASizeChecker.cpp
index 76e4477449e..0e731902f4b 100644
--- a/clang/lib/Analysis/VLASizeChecker.cpp
+++ b/clang/lib/Analysis/VLASizeChecker.cpp
@@ -38,8 +38,8 @@ ExplodedNode *UndefSizedVLAChecker::CheckType(QualType T, ExplodedNode *Pred,
if (ExplodedNode* N = Builder.generateNode(S, state, Pred)) {
N->markAsSink();
if (!BT)
- BT = new BugType("Declare variable-length array (VLA) of undefined "
- "size", "Logic error");
+ BT = new BugType("Declared variable-length array (VLA) uses a garbage"
+ " value as its size", "Logic error");
EnhancedBugReport *R =
new EnhancedBugReport(*BT, BT->getName().c_str(), N);
@@ -81,7 +81,7 @@ ExplodedNode *ZeroSizedVLAChecker::CheckType(QualType T, ExplodedNode *Pred,
if (ExplodedNode* N = Builder.generateNode(S, zeroState, Pred)) {
N->markAsSink();
if (!BT)
- BT = new BugType("Declare variable-length array (VLA) of zero size",
+ BT = new BugType("Declared variable-length array (VLA) has zero size",
"Logic error");
EnhancedBugReport *R =
diff --git a/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m
index 947b41ae794..80e20c1ebb0 100644
--- a/clang/test/Analysis/misc-ps.m
+++ b/clang/test/Analysis/misc-ps.m
@@ -121,12 +121,12 @@ void check_zero_sized_VLA(int x) {
if (x)
return;
- int vla[x]; // expected-warning{{Declare variable-length array (VLA) of zero size}}
+ int vla[x]; // expected-warning{{Declared variable-length array (VLA) has zero size}}
}
void check_uninit_sized_VLA() {
int x;
- int vla[x]; // expected-warning{{Declare variable-length array (VLA) of undefined size}}
+ int vla[x]; // expected-warning{{Declared variable-length array (VLA) uses a garbage value as its size}}
}
// sizeof(void)
OpenPOWER on IntegriCloud