[cfe-commits] r89735 - in /cfe/trunk/lib/Analysis: CallAndMessageChecker.cpp GRExprEngineInternalChecks.cpp GRExprEngineInternalChecks.h
Zhongxing Xu
xuzhongxing at gmail.com
Mon Nov 23 20:45:46 PST 2009
Author: zhongxingxu
Date: Mon Nov 23 22:45:44 2009
New Revision: 89735
URL: http://llvm.org/viewvc/llvm-project?rev=89735&view=rev
Log:
rename UndefinedArgChecker to CallAndMessageChecker.
Modified:
cfe/trunk/lib/Analysis/CallAndMessageChecker.cpp
cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp
cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.h
Modified: cfe/trunk/lib/Analysis/CallAndMessageChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CallAndMessageChecker.cpp?rev=89735&r1=89734&r2=89735&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CallAndMessageChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/CallAndMessageChecker.cpp Mon Nov 23 22:45:44 2009
@@ -1,4 +1,4 @@
-//===--- UndefinedArgChecker.h - Undefined arguments checker ----*- C++ -*--==//
+//===--- CallAndMessageChecker.cpp ------------------------------*- C++ -*--==//
//
// The LLVM Compiler Infrastructure
//
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines BadCallChecker, a builtin check in GRExprEngine that performs
-// checks for undefined arguments.
+// This defines CallAndMessageChecker, a builtin checker that checks for various
+// errors of call and objc message expressions.
//
//===----------------------------------------------------------------------===//
@@ -19,15 +19,15 @@
using namespace clang;
namespace {
-class VISIBILITY_HIDDEN UndefinedArgChecker
- : public CheckerVisitor<UndefinedArgChecker> {
+class VISIBILITY_HIDDEN CallAndMessageChecker
+ : public CheckerVisitor<CallAndMessageChecker> {
BugType *BT_call_null;
BugType *BT_call_undef;
BugType *BT_call_arg;
BugType *BT_msg_undef;
BugType *BT_msg_arg;
public:
- UndefinedArgChecker() :
+ CallAndMessageChecker() :
BT_call_null(0), BT_call_undef(0), BT_call_arg(0),
BT_msg_undef(0), BT_msg_arg(0) {}
static void *getTag() {
@@ -41,12 +41,12 @@
};
} // end anonymous namespace
-void clang::RegisterUndefinedArgChecker(GRExprEngine &Eng) {
- Eng.registerCheck(new UndefinedArgChecker());
+void clang::RegisterCallAndMessageChecker(GRExprEngine &Eng) {
+ Eng.registerCheck(new CallAndMessageChecker());
}
-void UndefinedArgChecker::EmitBadCall(BugType *BT, CheckerContext &C,
- const CallExpr *CE) {
+void CallAndMessageChecker::EmitBadCall(BugType *BT, CheckerContext &C,
+ const CallExpr *CE) {
ExplodedNode *N = C.GenerateSink();
if (!N)
return;
@@ -57,8 +57,8 @@
C.EmitReport(R);
}
-void UndefinedArgChecker::PreVisitCallExpr(CheckerContext &C,
- const CallExpr *CE){
+void CallAndMessageChecker::PreVisitCallExpr(CheckerContext &C,
+ const CallExpr *CE){
const Expr *Callee = CE->getCallee()->IgnoreParens();
SVal L = C.getState()->getSVal(Callee);
@@ -97,8 +97,8 @@
}
}
-void UndefinedArgChecker::PreVisitObjCMessageExpr(CheckerContext &C,
- const ObjCMessageExpr *ME) {
+void CallAndMessageChecker::PreVisitObjCMessageExpr(CheckerContext &C,
+ const ObjCMessageExpr *ME) {
const GRState *state = C.getState();
Modified: cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp?rev=89735&r1=89734&r2=89735&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp Mon Nov 23 22:45:44 2009
@@ -226,7 +226,7 @@
// automatically. Note that the check itself is owned by the GRExprEngine
// object.
RegisterAttrNonNullChecker(*this);
- RegisterUndefinedArgChecker(*this);
+ RegisterCallAndMessageChecker(*this);
RegisterDereferenceChecker(*this);
RegisterVLASizeChecker(*this);
RegisterDivZeroChecker(*this);
Modified: cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.h?rev=89735&r1=89734&r2=89735&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.h (original)
+++ cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.h Mon Nov 23 22:45:44 2009
@@ -30,7 +30,7 @@
void RegisterPointerArithChecker(GRExprEngine &Eng);
void RegisterFixedAddressChecker(GRExprEngine &Eng);
void RegisterCastToStructChecker(GRExprEngine &Eng);
-void RegisterUndefinedArgChecker(GRExprEngine &Eng);
+void RegisterCallAndMessageChecker(GRExprEngine &Eng);
void RegisterArrayBoundChecker(GRExprEngine &Eng);
void RegisterUndefinedArraySubscriptChecker(GRExprEngine &Eng);
void RegisterUndefinedAssignmentChecker(GRExprEngine &Eng);
More information about the cfe-commits
mailing list