diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-24 04:45:44 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-24 04:45:44 +0000 |
commit | 72269ec8cb6480aa51be7fec03a27a3fa3eb5ea8 (patch) | |
tree | a170121746110c84ba0dcd2e9ec4fc030320236c /clang | |
parent | da32375115e77eba018e8bfdcaf985f7d4a8e5bd (diff) | |
download | bcm5719-llvm-72269ec8cb6480aa51be7fec03a27a3fa3eb5ea8.tar.gz bcm5719-llvm-72269ec8cb6480aa51be7fec03a27a3fa3eb5ea8.zip |
rename UndefinedArgChecker to CallAndMessageChecker.
llvm-svn: 89735
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Analysis/CallAndMessageChecker.cpp | 28 | ||||
-rw-r--r-- | clang/lib/Analysis/GRExprEngineInternalChecks.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Analysis/GRExprEngineInternalChecks.h | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/clang/lib/Analysis/CallAndMessageChecker.cpp b/clang/lib/Analysis/CallAndMessageChecker.cpp index e717f6bfe21..8386d03e234 100644 --- a/clang/lib/Analysis/CallAndMessageChecker.cpp +++ b/clang/lib/Analysis/CallAndMessageChecker.cpp @@ -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 @@ private: }; } // 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 @@ void UndefinedArgChecker::EmitBadCall(BugType *BT, CheckerContext &C, 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::PreVisitCallExpr(CheckerContext &C, } } -void UndefinedArgChecker::PreVisitObjCMessageExpr(CheckerContext &C, - const ObjCMessageExpr *ME) { +void CallAndMessageChecker::PreVisitObjCMessageExpr(CheckerContext &C, + const ObjCMessageExpr *ME) { const GRState *state = C.getState(); diff --git a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp index 62c361ca558..2e698d7d3fb 100644 --- a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp +++ b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp @@ -226,7 +226,7 @@ void GRExprEngine::RegisterInternalChecks() { // automatically. Note that the check itself is owned by the GRExprEngine // object. RegisterAttrNonNullChecker(*this); - RegisterUndefinedArgChecker(*this); + RegisterCallAndMessageChecker(*this); RegisterDereferenceChecker(*this); RegisterVLASizeChecker(*this); RegisterDivZeroChecker(*this); diff --git a/clang/lib/Analysis/GRExprEngineInternalChecks.h b/clang/lib/Analysis/GRExprEngineInternalChecks.h index bbaf4df6386..f691190df2d 100644 --- a/clang/lib/Analysis/GRExprEngineInternalChecks.h +++ b/clang/lib/Analysis/GRExprEngineInternalChecks.h @@ -30,7 +30,7 @@ void RegisterPointerSubChecker(GRExprEngine &Eng); 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); |