diff options
Diffstat (limited to 'include/clang/Analysis/PathSensitive/Checker.h')
-rw-r--r-- | include/clang/Analysis/PathSensitive/Checker.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/include/clang/Analysis/PathSensitive/Checker.h b/include/clang/Analysis/PathSensitive/Checker.h index 3dc484569d..4e00d69cdb 100644 --- a/include/clang/Analysis/PathSensitive/Checker.h +++ b/include/clang/Analysis/PathSensitive/Checker.h @@ -46,21 +46,21 @@ public: GRExprEngine &eng, ExplodedNode *pred, const void *tag, bool preVisit) - : Dst(dst), B(builder), Eng(eng), Pred(pred), + : Dst(dst), B(builder), Eng(eng), Pred(pred), OldSink(B.BuildSinks), OldTag(B.Tag), OldPointKind(B.PointKind), OldHasGen(B.HasGeneratedNode) { - //assert(Dst.empty()); // This is a fake assertion. + //assert(Dst.empty()); // This is a fake assertion. // See GRExprEngine::CheckerVisit(), CurrSet is repeatedly used. B.Tag = tag; if (preVisit) - B.PointKind = ProgramPoint::PreStmtKind; + B.PointKind = ProgramPoint::PreStmtKind; } - + ~CheckerContext() { if (!B.BuildSinks && !B.HasGeneratedNode) Dst.Add(Pred); } - + ConstraintManager &getConstraintManager() { return Eng.getConstraintManager(); } @@ -68,7 +68,7 @@ public: GRStmtNodeBuilder &getNodeBuilder() { return B; } ExplodedNode *&getPredecessor() { return Pred; } const GRState *getState() { return B.GetState(Pred); } - + ASTContext &getASTContext() { return Eng.getContext(); } @@ -76,26 +76,26 @@ public: ExplodedNode *GenerateNode(const Stmt *S, bool markAsSink = false) { return GenerateNode(S, getState(), markAsSink); } - + ExplodedNode *GenerateNode(const Stmt* S, const GRState *state, - bool markAsSink = false) { + bool markAsSink = false) { ExplodedNode *node = B.generateNode(S, state, Pred); - + if (markAsSink && node) node->markAsSink(); - + return node; } - + void addTransition(ExplodedNode *node) { Dst.Add(node); } - + void EmitReport(BugReport *R) { Eng.getBugReporter().EmitReport(R); } }; - + class Checker { private: friend class GRExprEngine; @@ -105,11 +105,11 @@ private: GRExprEngine &Eng, const Stmt *stmt, ExplodedNode *Pred, bool isPrevisit) { - CheckerContext C(Dst, Builder, Eng, Pred, getTag(), isPrevisit); + CheckerContext C(Dst, Builder, Eng, Pred, getTag(), isPrevisit); assert(isPrevisit && "Only previsit supported for now."); _PreVisit(C, stmt); } - + public: virtual ~Checker() {} virtual void _PreVisit(CheckerContext &C, const Stmt *stmt) = 0; @@ -119,4 +119,4 @@ public: } // end clang namespace #endif - + |