summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Analysis/PathSensitive/Checker.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Analysis/PathSensitive/Checker.h')
-rw-r--r--clang/include/clang/Analysis/PathSensitive/Checker.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/Checker.h b/clang/include/clang/Analysis/PathSensitive/Checker.h
index 91a4b6d1b1e..b380f1bf02f 100644
--- a/clang/include/clang/Analysis/PathSensitive/Checker.h
+++ b/clang/include/clang/Analysis/PathSensitive/Checker.h
@@ -53,22 +53,10 @@ public:
OldTag(B.Tag, tag),
OldPointKind(B.PointKind, K),
OldHasGen(B.HasGeneratedNode),
- state(st), statement(stmt), size(Dst.size()),
- DoneEvaluating(false) {}
+ state(st), statement(stmt), size(Dst.size()) {}
~CheckerContext();
- // FIXME: This were added to support CallAndMessageChecker to indicating
- // to GRExprEngine to "stop evaluating" a message expression under certain
- // cases. This is *not* meant to be a permanent API change, and was added
- // to aid in the transition of removing logic for checks from GRExprEngine.
- void setDoneEvaluating() {
- DoneEvaluating = true;
- }
- bool isDoneEvaluating() const {
- return DoneEvaluating;
- }
-
ConstraintManager &getConstraintManager() {
return Eng.getConstraintManager();
}
@@ -165,7 +153,7 @@ private:
friend class GRExprEngine;
// FIXME: Remove the 'tag' option.
- bool GR_Visit(ExplodedNodeSet &Dst,
+ void GR_Visit(ExplodedNodeSet &Dst,
GRStmtNodeBuilder &Builder,
GRExprEngine &Eng,
const Stmt *S,
@@ -177,7 +165,14 @@ private:
_PreVisit(C, S);
else
_PostVisit(C, S);
- return C.isDoneEvaluating();
+ }
+
+ bool GR_EvalNilReceiver(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder,
+ GRExprEngine &Eng, const ObjCMessageExpr *ME,
+ ExplodedNode *Pred, const GRState *state, void *tag) {
+ CheckerContext C(Dst, Builder, Eng, Pred, tag, ProgramPoint::PostStmtKind,
+ ME, state);
+ return EvalNilReceiver(C, ME);
}
// FIXME: Remove the 'tag' option.
@@ -231,6 +226,10 @@ public:
virtual void VisitBranchCondition(GRBranchNodeBuilder &Builder,
GRExprEngine &Eng,
Stmt *Condition, void *tag) {}
+
+ virtual bool EvalNilReceiver(CheckerContext &C, const ObjCMessageExpr *ME) {
+ return false;
+ }
};
} // end clang namespace
OpenPOWER on IntegriCloud