|
@@ -37,6 +37,7 @@ namespace ento {
|
|
class ExplodedGraph;
|
|
class ExplodedGraph;
|
|
class GRState;
|
|
class GRState;
|
|
class EndOfFunctionNodeBuilder;
|
|
class EndOfFunctionNodeBuilder;
|
|
|
|
+ class BranchNodeBuilder;
|
|
class MemRegion;
|
|
class MemRegion;
|
|
class SymbolReaper;
|
|
class SymbolReaper;
|
|
|
|
|
|
@@ -202,6 +203,10 @@ public:
|
|
/// \brief Run checkers for end of path.
|
|
/// \brief Run checkers for end of path.
|
|
void runCheckersForEndPath(EndOfFunctionNodeBuilder &B, ExprEngine &Eng);
|
|
void runCheckersForEndPath(EndOfFunctionNodeBuilder &B, ExprEngine &Eng);
|
|
|
|
|
|
|
|
+ /// \brief Run checkers for branch condition.
|
|
|
|
+ void runCheckersForBranchCondition(const Stmt *condition,
|
|
|
|
+ BranchNodeBuilder &B, ExprEngine &Eng);
|
|
|
|
+
|
|
/// \brief Run checkers for live symbols.
|
|
/// \brief Run checkers for live symbols.
|
|
void runCheckersForLiveSymbols(const GRState *state,
|
|
void runCheckersForLiveSymbols(const GRState *state,
|
|
SymbolReaper &SymReaper);
|
|
SymbolReaper &SymReaper);
|
|
@@ -239,7 +244,6 @@ public:
|
|
|
|
|
|
typedef CheckerFn<const Decl *, AnalysisManager&, BugReporter &>
|
|
typedef CheckerFn<const Decl *, AnalysisManager&, BugReporter &>
|
|
CheckDeclFunc;
|
|
CheckDeclFunc;
|
|
- typedef CheckerFn<const Stmt *, CheckerContext &> CheckStmtFunc;
|
|
|
|
|
|
|
|
typedef bool (*HandlesDeclFunc)(const Decl *D);
|
|
typedef bool (*HandlesDeclFunc)(const Decl *D);
|
|
void _registerForDecl(CheckDeclFunc checkfn, HandlesDeclFunc isForDeclFn);
|
|
void _registerForDecl(CheckDeclFunc checkfn, HandlesDeclFunc isForDeclFn);
|
|
@@ -250,6 +254,7 @@ public:
|
|
// Internal registration functions for path-sensitive checking.
|
|
// Internal registration functions for path-sensitive checking.
|
|
//===----------------------------------------------------------------------===//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
+ typedef CheckerFn<const Stmt *, CheckerContext &> CheckStmtFunc;
|
|
typedef CheckerFn<const ObjCMessage &, CheckerContext &> CheckObjCMessageFunc;
|
|
typedef CheckerFn<const ObjCMessage &, CheckerContext &> CheckObjCMessageFunc;
|
|
typedef CheckerFn<const SVal &/*location*/, bool/*isLoad*/, CheckerContext &>
|
|
typedef CheckerFn<const SVal &/*location*/, bool/*isLoad*/, CheckerContext &>
|
|
CheckLocationFunc;
|
|
CheckLocationFunc;
|
|
@@ -258,6 +263,8 @@ public:
|
|
typedef CheckerFn<ExplodedGraph &, BugReporter &, ExprEngine &>
|
|
typedef CheckerFn<ExplodedGraph &, BugReporter &, ExprEngine &>
|
|
CheckEndAnalysisFunc;
|
|
CheckEndAnalysisFunc;
|
|
typedef CheckerFn<EndOfFunctionNodeBuilder &, ExprEngine &> CheckEndPathFunc;
|
|
typedef CheckerFn<EndOfFunctionNodeBuilder &, ExprEngine &> CheckEndPathFunc;
|
|
|
|
+ typedef CheckerFn<const Stmt *, BranchNodeBuilder &, ExprEngine &>
|
|
|
|
+ CheckBranchConditionFunc;
|
|
typedef CheckerFn<SymbolReaper &, CheckerContext &> CheckDeadSymbolsFunc;
|
|
typedef CheckerFn<SymbolReaper &, CheckerContext &> CheckDeadSymbolsFunc;
|
|
typedef CheckerFn<const GRState *, SymbolReaper &> CheckLiveSymbolsFunc;
|
|
typedef CheckerFn<const GRState *, SymbolReaper &> CheckLiveSymbolsFunc;
|
|
|
|
|
|
@@ -278,6 +285,8 @@ public:
|
|
|
|
|
|
void _registerForEndPath(CheckEndPathFunc checkfn);
|
|
void _registerForEndPath(CheckEndPathFunc checkfn);
|
|
|
|
|
|
|
|
+ void _registerForBranchCondition(CheckBranchConditionFunc checkfn);
|
|
|
|
+
|
|
void _registerForLiveSymbols(CheckLiveSymbolsFunc checkfn);
|
|
void _registerForLiveSymbols(CheckLiveSymbolsFunc checkfn);
|
|
|
|
|
|
void _registerForDeadSymbols(CheckDeadSymbolsFunc checkfn);
|
|
void _registerForDeadSymbols(CheckDeadSymbolsFunc checkfn);
|
|
@@ -415,6 +424,8 @@ private:
|
|
|
|
|
|
std::vector<CheckEndPathFunc> EndPathCheckers;
|
|
std::vector<CheckEndPathFunc> EndPathCheckers;
|
|
|
|
|
|
|
|
+ std::vector<CheckBranchConditionFunc> BranchConditionCheckers;
|
|
|
|
+
|
|
std::vector<CheckLiveSymbolsFunc> LiveSymbolsCheckers;
|
|
std::vector<CheckLiveSymbolsFunc> LiveSymbolsCheckers;
|
|
|
|
|
|
std::vector<CheckDeadSymbolsFunc> DeadSymbolsCheckers;
|
|
std::vector<CheckDeadSymbolsFunc> DeadSymbolsCheckers;
|