Built-in checks now have a category: "Logic Errors"

llvm-svn: 56401
This commit is contained in:
Ted Kremenek 2008-09-21 18:57:28 +00:00
parent 80b2b16540
commit 1b6997ed5e
1 changed files with 6 additions and 4 deletions

View File

@ -60,6 +60,8 @@ public:
BR.EmitWarning(R);
}
}
virtual const char* getCategory() const { return "Logic Errors"; }
};
class VISIBILITY_HIDDEN NullDeref : public BuiltinBug {
@ -74,7 +76,7 @@ public:
class VISIBILITY_HIDDEN UndefinedDeref : public BuiltinBug {
public:
UndefinedDeref() : BuiltinBug("bad dereference",
UndefinedDeref() : BuiltinBug("uninitialized pointer dereference",
"Dereference of undefined value.") {}
virtual void EmitBuiltinWarnings(BugReporter& BR, GRExprEngine& Eng) {
@ -115,10 +117,10 @@ public:
class VISIBILITY_HIDDEN BadArg : public BuiltinBug {
public:
BadArg() : BuiltinBug("bad argument",
BadArg() : BuiltinBug("uninitialized argument",
"Pass-by-value argument in function is undefined.") {}
BadArg(const char* d) : BuiltinBug("bad argument", d) {}
BadArg(const char* d) : BuiltinBug("uninitialized argument", d) {}
virtual void EmitBuiltinWarnings(BugReporter& BR, GRExprEngine& Eng) {
for (GRExprEngine::UndefArgsTy::iterator I = Eng.undef_arg_begin(),
@ -156,7 +158,7 @@ public:
class VISIBILITY_HIDDEN BadReceiver : public BuiltinBug {
public:
BadReceiver()
: BuiltinBug("bad receiver",
: BuiltinBug("uninitialized receiver",
"Receiver in message expression is an uninitialized value.") {}
virtual void EmitBuiltinWarnings(BugReporter& BR, GRExprEngine& Eng) {