[cfe-commits] r86127 - in /cfe/trunk: include/clang/Analysis/PathSensitive/BugType.h lib/Analysis/VLASizeChecker.cpp test/Analysis/misc-ps.m
Ted Kremenek
kremenek at apple.com
Thu Nov 5 00:30:13 PST 2009
Author: kremenek
Date: Thu Nov 5 02:30:12 2009
New Revision: 86127
URL: http://llvm.org/viewvc/llvm-project?rev=86127&view=rev
Log:
Tweak wording and classifications of analyzer diagnostics.
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/BugType.h
cfe/trunk/lib/Analysis/VLASizeChecker.cpp
cfe/trunk/test/Analysis/misc-ps.m
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/BugType.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/BugType.h?rev=86127&r1=86126&r2=86127&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/BugType.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/BugType.h Thu Nov 5 02:30:12 2009
@@ -64,10 +64,10 @@
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; }
Modified: cfe/trunk/lib/Analysis/VLASizeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/VLASizeChecker.cpp?rev=86127&r1=86126&r2=86127&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/VLASizeChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/VLASizeChecker.cpp Thu Nov 5 02:30:12 2009
@@ -38,8 +38,8 @@
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 @@
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 =
Modified: cfe/trunk/test/Analysis/misc-ps.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps.m?rev=86127&r1=86126&r2=86127&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps.m (original)
+++ cfe/trunk/test/Analysis/misc-ps.m Thu Nov 5 02:30:12 2009
@@ -121,12 +121,12 @@
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)
More information about the cfe-commits
mailing list