forked from OSchip/llvm-project
parent
92e4ac1599
commit
5f996d5a06
|
@ -28,7 +28,6 @@ namespace clang {
|
||||||
class BugType;
|
class BugType;
|
||||||
class PathDiagnosticClient;
|
class PathDiagnosticClient;
|
||||||
class Diagnostic;
|
class Diagnostic;
|
||||||
class ParentMap;
|
|
||||||
class BugReporterData;
|
class BugReporterData;
|
||||||
|
|
||||||
class GRExprEngine {
|
class GRExprEngine {
|
||||||
|
@ -53,9 +52,6 @@ protected:
|
||||||
/// G - the simulation graph.
|
/// G - the simulation graph.
|
||||||
GraphTy& G;
|
GraphTy& G;
|
||||||
|
|
||||||
/// Parents - a lazily created map from Stmt* to parents.
|
|
||||||
ParentMap* Parents;
|
|
||||||
|
|
||||||
/// Liveness - live-variables information the ValueDecl* and block-level
|
/// Liveness - live-variables information the ValueDecl* and block-level
|
||||||
/// Expr* in the CFG. Used to prune out dead state.
|
/// Expr* in the CFG. Used to prune out dead state.
|
||||||
LiveVariables& Liveness;
|
LiveVariables& Liveness;
|
||||||
|
@ -218,11 +214,7 @@ public:
|
||||||
|
|
||||||
GraphTy& getGraph() { return G; }
|
GraphTy& getGraph() { return G; }
|
||||||
const GraphTy& getGraph() const { return G; }
|
const GraphTy& getGraph() const { return G; }
|
||||||
|
|
||||||
/// getParentMap - Return a map from Stmt* to parents for the function/method
|
|
||||||
/// body being analyzed. This map is lazily constructed as needed.
|
|
||||||
ParentMap& getParentMap();
|
|
||||||
|
|
||||||
typedef BugTypeSet::iterator bug_type_iterator;
|
typedef BugTypeSet::iterator bug_type_iterator;
|
||||||
typedef BugTypeSet::const_iterator const_bug_type_iterator;
|
typedef BugTypeSet::const_iterator const_bug_type_iterator;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "clang/AST/ParentMap.h"
|
|
||||||
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
|
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
|
||||||
#include "clang/Analysis/PathSensitive/BugReporter.h"
|
#include "clang/Analysis/PathSensitive/BugReporter.h"
|
||||||
#include "clang/Basic/SourceManager.h"
|
#include "clang/Basic/SourceManager.h"
|
||||||
|
@ -43,7 +42,6 @@ GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx,
|
||||||
LiveVariables& L)
|
LiveVariables& L)
|
||||||
: CoreEngine(cfg, CD, Ctx, *this),
|
: CoreEngine(cfg, CD, Ctx, *this),
|
||||||
G(CoreEngine.getGraph()),
|
G(CoreEngine.getGraph()),
|
||||||
Parents(0),
|
|
||||||
Liveness(L),
|
Liveness(L),
|
||||||
Builder(NULL),
|
Builder(NULL),
|
||||||
StateMgr(G.getContext(), G.getAllocator()),
|
StateMgr(G.getContext(), G.getAllocator()),
|
||||||
|
@ -67,17 +65,6 @@ GRExprEngine::~GRExprEngine() {
|
||||||
delete *I;
|
delete *I;
|
||||||
|
|
||||||
delete [] NSExceptionInstanceRaiseSelectors;
|
delete [] NSExceptionInstanceRaiseSelectors;
|
||||||
|
|
||||||
delete Parents;
|
|
||||||
}
|
|
||||||
|
|
||||||
ParentMap& GRExprEngine::getParentMap() {
|
|
||||||
if (!Parents) {
|
|
||||||
Stmt* Body = getGraph().getCodeDecl().getCodeBody();
|
|
||||||
Parents = new ParentMap(Body);
|
|
||||||
}
|
|
||||||
|
|
||||||
return *Parents;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
Loading…
Reference in New Issue