[analyzer] Refactoring: Drop the 'GR' prefix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122424 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/GR/AggExprVisitor.cpp b/lib/GR/AggExprVisitor.cpp
index 7f873bc..4502298 100644
--- a/lib/GR/AggExprVisitor.cpp
+++ b/lib/GR/AggExprVisitor.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/AST/StmtVisitor.h"
using namespace clang;
@@ -23,18 +23,18 @@
/// is used for evaluating exprs of C++ object type. Evaluating such exprs
/// requires a destination pointer pointing to the object being evaluated
/// into. Passing such a pointer around would pollute the Visit* interface of
-/// GRExprEngine. AggExprVisitor encapsulates code that goes through various
+/// ExprEngine. AggExprVisitor encapsulates code that goes through various
/// cast and construct exprs (and others), and at the final point, dispatches
-/// back to the GRExprEngine to let the real evaluation logic happen.
+/// back to the ExprEngine to let the real evaluation logic happen.
class AggExprVisitor : public StmtVisitor<AggExprVisitor> {
const MemRegion *Dest;
ExplodedNode *Pred;
ExplodedNodeSet &DstSet;
- GRExprEngine &Eng;
+ ExprEngine &Eng;
public:
AggExprVisitor(const MemRegion *dest, ExplodedNode *N, ExplodedNodeSet &dst,
- GRExprEngine &eng)
+ ExprEngine &eng)
: Dest(dest), Pred(N), DstSet(dst), Eng(eng) {}
void VisitCastExpr(CastExpr *E);
@@ -57,7 +57,7 @@
Eng.VisitCXXConstructExpr(E, Dest, Pred, DstSet);
}
-void GRExprEngine::VisitAggExpr(const Expr *E, const MemRegion *Dest,
+void ExprEngine::VisitAggExpr(const Expr *E, const MemRegion *Dest,
ExplodedNode *Pred, ExplodedNodeSet &Dst) {
AggExprVisitor(Dest, Pred, Dst, *this).Visit(const_cast<Expr *>(E));
}
diff --git a/lib/GR/AnalysisConsumer.cpp b/lib/GR/AnalysisConsumer.cpp
index 0b28451..f8a4339 100644
--- a/lib/GR/AnalysisConsumer.cpp
+++ b/lib/GR/AnalysisConsumer.cpp
@@ -25,13 +25,13 @@
#include "clang/GR/BugReporter/PathDiagnostic.h"
#include "clang/GR/PathSensitive/AnalysisManager.h"
#include "clang/GR/BugReporter/BugReporter.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
-#include "clang/GR/PathSensitive/GRTransferFuncs.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
+#include "clang/GR/PathSensitive/TransferFuncs.h"
#include "clang/GR/PathDiagnosticClients.h"
// FIXME: Restructure checker registration.
-#include "Checkers/GRExprEngineExperimentalChecks.h"
-#include "Checkers/GRExprEngineInternalChecks.h"
+#include "Checkers/ExprEngineExperimentalChecks.h"
+#include "Checkers/ExprEngineInternalChecks.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
@@ -328,18 +328,18 @@
}
-static void ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr,
+static void ActionExprEngine(AnalysisConsumer &C, AnalysisManager& mgr,
Decl *D,
- GRTransferFuncs* tf) {
+ TransferFuncs* tf) {
- llvm::OwningPtr<GRTransferFuncs> TF(tf);
+ llvm::OwningPtr<TransferFuncs> TF(tf);
// Construct the analysis engine. We first query for the LiveVariables
// information to see if the CFG is valid.
// FIXME: Inter-procedural analysis will need to handle invalid CFGs.
if (!mgr.getLiveVariables(D))
return;
- GRExprEngine Eng(mgr, TF.take());
+ ExprEngine Eng(mgr, TF.take());
if (C.Opts.EnableExperimentalInternalChecks)
RegisterExperimentalInternalChecks(Eng);
@@ -384,11 +384,11 @@
static void ActionObjCMemCheckerAux(AnalysisConsumer &C, AnalysisManager& mgr,
Decl *D, bool GCEnabled) {
- GRTransferFuncs* TF = MakeCFRefCountTF(mgr.getASTContext(),
+ TransferFuncs* TF = MakeCFRefCountTF(mgr.getASTContext(),
GCEnabled,
mgr.getLangOptions());
- ActionGRExprEngine(C, mgr, D, TF);
+ ActionExprEngine(C, mgr, D, TF);
}
static void ActionObjCMemChecker(AnalysisConsumer &C, AnalysisManager& mgr,
diff --git a/lib/GR/AnalyzerStatsChecker.cpp b/lib/GR/AnalyzerStatsChecker.cpp
index cc9fcb7..c60b450 100644
--- a/lib/GR/AnalyzerStatsChecker.cpp
+++ b/lib/GR/AnalyzerStatsChecker.cpp
@@ -14,7 +14,7 @@
#include "clang/GR/BugReporter/BugReporter.h"
// FIXME: Restructure checker registration.
-#include "Checkers/GRExprEngineExperimentalChecks.h"
+#include "Checkers/ExprEngineExperimentalChecks.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/SmallPtrSet.h"
@@ -26,7 +26,7 @@
class AnalyzerStatsChecker : public CheckerVisitor<AnalyzerStatsChecker> {
public:
static void *getTag();
- void VisitEndAnalysis(ExplodedGraph &G, BugReporter &B, GRExprEngine &Eng);
+ void VisitEndAnalysis(ExplodedGraph &G, BugReporter &B, ExprEngine &Eng);
private:
llvm::SmallPtrSet<const CFGBlock*, 256> reachable;
@@ -38,13 +38,13 @@
return &x;
}
-void GR::RegisterAnalyzerStatsChecker(GRExprEngine &Eng) {
+void GR::RegisterAnalyzerStatsChecker(ExprEngine &Eng) {
Eng.registerCheck(new AnalyzerStatsChecker());
}
void AnalyzerStatsChecker::VisitEndAnalysis(ExplodedGraph &G,
BugReporter &B,
- GRExprEngine &Eng) {
+ ExprEngine &Eng) {
const CFG *C = 0;
const Decl *D = 0;
const LocationContext *LC = 0;
@@ -109,8 +109,8 @@
D->getLocation());
// Emit warning for each block we bailed out on
- typedef GRCoreEngine::BlocksAborted::const_iterator AbortedIterator;
- const GRCoreEngine &CE = Eng.getCoreEngine();
+ typedef CoreEngine::BlocksAborted::const_iterator AbortedIterator;
+ const CoreEngine &CE = Eng.getCoreEngine();
for (AbortedIterator I = CE.blocks_aborted_begin(),
E = CE.blocks_aborted_end(); I != E; ++I) {
const BlockEdge &BE = I->first;
diff --git a/lib/GR/BasicConstraintManager.cpp b/lib/GR/BasicConstraintManager.cpp
index ac289b8..2de0d9a 100644
--- a/lib/GR/BasicConstraintManager.cpp
+++ b/lib/GR/BasicConstraintManager.cpp
@@ -15,7 +15,7 @@
#include "SimpleConstraintManager.h"
#include "clang/GR/PathSensitive/GRState.h"
#include "clang/GR/PathSensitive/GRStateTrait.h"
-#include "clang/GR/PathSensitive/GRTransferFuncs.h"
+#include "clang/GR/PathSensitive/TransferFuncs.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
@@ -52,7 +52,7 @@
: public SimpleConstraintManager {
GRState::IntSetTy::Factory ISetFactory;
public:
- BasicConstraintManager(GRStateManager &statemgr, GRSubEngine &subengine)
+ BasicConstraintManager(GRStateManager &statemgr, SubEngine &subengine)
: SimpleConstraintManager(subengine),
ISetFactory(statemgr.getAllocator()) {}
@@ -99,7 +99,7 @@
} // end anonymous namespace
ConstraintManager* GR::CreateBasicConstraintManager(GRStateManager& statemgr,
- GRSubEngine &subengine) {
+ SubEngine &subengine) {
return new BasicConstraintManager(statemgr, subengine);
}
diff --git a/lib/GR/BasicStore.cpp b/lib/GR/BasicStore.cpp
index 2a673e2..1c8ab11 100644
--- a/lib/GR/BasicStore.cpp
+++ b/lib/GR/BasicStore.cpp
@@ -68,7 +68,7 @@
return store;
}
- /// ArrayToPointer - Used by GRExprEngine::VistCast to handle implicit
+ /// ArrayToPointer - Used by ExprEngine::VistCast to handle implicit
/// conversions between arrays and pointers.
SVal ArrayToPointer(Loc Array) { return Array; }
diff --git a/lib/GR/BasicValueFactory.cpp b/lib/GR/BasicValueFactory.cpp
index 6e94a2a..7e45a15 100644
--- a/lib/GR/BasicValueFactory.cpp
+++ b/lib/GR/BasicValueFactory.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
// This file defines BasicValueFactory, a class that manages the lifetime
-// of APSInt objects and symbolic constraints used by GRExprEngine
+// of APSInt objects and symbolic constraints used by ExprEngine
// and related classes.
//
//===----------------------------------------------------------------------===//
diff --git a/lib/GR/GRBlockCounter.cpp b/lib/GR/BlockCounter.cpp
similarity index 74%
rename from lib/GR/GRBlockCounter.cpp
rename to lib/GR/BlockCounter.cpp
index 8a026b1..ee76e7a 100644
--- a/lib/GR/GRBlockCounter.cpp
+++ b/lib/GR/BlockCounter.cpp
@@ -1,4 +1,4 @@
-//==- GRBlockCounter.h - ADT for counting block visits -------------*- C++ -*-//
+//==- BlockCounter.h - ADT for counting block visits -------------*- C++ -*-//
//
// The LLVM Compiler Infrastructure
//
@@ -7,13 +7,13 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines GRBlockCounter, an abstract data type used to count
+// This file defines BlockCounter, an abstract data type used to count
// the number of times a given block has been visited along a path
-// analyzed by GRCoreEngine.
+// analyzed by CoreEngine.
//
//===----------------------------------------------------------------------===//
-#include "clang/GR/PathSensitive/GRBlockCounter.h"
+#include "clang/GR/PathSensitive/BlockCounter.h"
#include "llvm/ADT/ImmutableMap.h"
using namespace clang;
@@ -56,31 +56,31 @@
return *static_cast<CountMap::Factory*>(F);
}
-unsigned GRBlockCounter::getNumVisited(const StackFrameContext *CallSite,
+unsigned BlockCounter::getNumVisited(const StackFrameContext *CallSite,
unsigned BlockID) const {
CountMap M = GetMap(Data);
CountMap::data_type* T = M.lookup(CountKey(CallSite, BlockID));
return T ? *T : 0;
}
-GRBlockCounter::Factory::Factory(llvm::BumpPtrAllocator& Alloc) {
+BlockCounter::Factory::Factory(llvm::BumpPtrAllocator& Alloc) {
F = new CountMap::Factory(Alloc);
}
-GRBlockCounter::Factory::~Factory() {
+BlockCounter::Factory::~Factory() {
delete static_cast<CountMap::Factory*>(F);
}
-GRBlockCounter
-GRBlockCounter::Factory::IncrementCount(GRBlockCounter BC,
+BlockCounter
+BlockCounter::Factory::IncrementCount(BlockCounter BC,
const StackFrameContext *CallSite,
unsigned BlockID) {
- return GRBlockCounter(GetFactory(F).add(GetMap(BC.Data),
+ return BlockCounter(GetFactory(F).add(GetMap(BC.Data),
CountKey(CallSite, BlockID),
BC.getNumVisited(CallSite, BlockID)+1).getRoot());
}
-GRBlockCounter
-GRBlockCounter::Factory::GetEmptyCounter() {
- return GRBlockCounter(GetFactory(F).getEmptyMap().getRoot());
+BlockCounter
+BlockCounter::Factory::GetEmptyCounter() {
+ return BlockCounter(GetFactory(F).getEmptyMap().getRoot());
}
diff --git a/lib/GR/BugReporter.cpp b/lib/GR/BugReporter.cpp
index 4321823..dedbd70 100644
--- a/lib/GR/BugReporter.cpp
+++ b/lib/GR/BugReporter.cpp
@@ -14,7 +14,7 @@
#include "clang/GR/BugReporter/BugReporter.h"
#include "clang/GR/BugReporter/BugType.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/AST/ASTContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/AST/Expr.h"
diff --git a/lib/GR/CFRefCount.cpp b/lib/GR/CFRefCount.cpp
index 55d11a5..a99019c 100644
--- a/lib/GR/CFRefCount.cpp
+++ b/lib/GR/CFRefCount.cpp
@@ -21,9 +21,9 @@
#include "clang/GR/Checkers/LocalCheckers.h"
#include "clang/Analysis/DomainSpecific/CocoaConventions.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngineBuilders.h"
+#include "clang/GR/PathSensitive/ExprEngineBuilders.h"
#include "clang/GR/PathSensitive/GRStateTrait.h"
-#include "clang/GR/PathSensitive/GRTransferFuncs.h"
+#include "clang/GR/PathSensitive/TransferFuncs.h"
#include "clang/GR/PathSensitive/SymbolManager.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
@@ -92,16 +92,16 @@
namespace {
class GenericNodeBuilder {
- GRStmtNodeBuilder *SNB;
+ StmtNodeBuilder *SNB;
const Stmt *S;
const void *tag;
- GREndPathNodeBuilder *ENB;
+ EndPathNodeBuilder *ENB;
public:
- GenericNodeBuilder(GRStmtNodeBuilder &snb, const Stmt *s,
+ GenericNodeBuilder(StmtNodeBuilder &snb, const Stmt *s,
const void *t)
: SNB(&snb), S(s), tag(t), ENB(0) {}
- GenericNodeBuilder(GREndPathNodeBuilder &enb)
+ GenericNodeBuilder(EndPathNodeBuilder &enb)
: SNB(0), S(0), tag(0), ENB(&enb) {}
ExplodedNode *MakeNode(const GRState *state, ExplodedNode *Pred) {
@@ -1620,7 +1620,7 @@
namespace {
-class CFRefCount : public GRTransferFuncs {
+class CFRefCount : public TransferFuncs {
public:
class BindingsPrinter : public GRState::Printer {
public:
@@ -1648,7 +1648,7 @@
RefVal::Kind& hasErr);
void ProcessNonLeakError(ExplodedNodeSet& Dst,
- GRStmtNodeBuilder& Builder,
+ StmtNodeBuilder& Builder,
const Expr* NodeExpr, SourceRange ErrorRange,
ExplodedNode* Pred,
const GRState* St,
@@ -1660,7 +1660,7 @@
ExplodedNode* ProcessLeaks(const GRState * state,
llvm::SmallVectorImpl<SymbolRef> &Leaked,
GenericNodeBuilder &Builder,
- GRExprEngine &Eng,
+ ExprEngine &Eng,
ExplodedNode *Pred = 0);
public:
@@ -1673,7 +1673,7 @@
virtual ~CFRefCount() {}
- void RegisterChecks(GRExprEngine &Eng);
+ void RegisterChecks(ExprEngine &Eng);
virtual void RegisterPrinters(std::vector<GRState::Printer*>& Printers) {
Printers.push_back(new BindingsPrinter());
@@ -1690,8 +1690,8 @@
// Calls.
void evalSummary(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
const Expr* Ex,
InstanceReceiver Receiver,
const RetainSummary& Summ,
@@ -1700,42 +1700,42 @@
ExplodedNode* Pred, const GRState *state);
virtual void evalCall(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
const CallExpr* CE, SVal L,
ExplodedNode* Pred);
virtual void evalObjCMessageExpr(ExplodedNodeSet& Dst,
- GRExprEngine& Engine,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Engine,
+ StmtNodeBuilder& Builder,
const ObjCMessageExpr* ME,
ExplodedNode* Pred,
const GRState *state);
// Stores.
- virtual void evalBind(GRStmtNodeBuilderRef& B, SVal location, SVal val);
+ virtual void evalBind(StmtNodeBuilderRef& B, SVal location, SVal val);
// End-of-path.
- virtual void evalEndPath(GRExprEngine& Engine,
- GREndPathNodeBuilder& Builder);
+ virtual void evalEndPath(ExprEngine& Engine,
+ EndPathNodeBuilder& Builder);
virtual void evalDeadSymbols(ExplodedNodeSet& Dst,
- GRExprEngine& Engine,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Engine,
+ StmtNodeBuilder& Builder,
ExplodedNode* Pred,
const GRState* state,
SymbolReaper& SymReaper);
std::pair<ExplodedNode*, const GRState *>
HandleAutoreleaseCounts(const GRState * state, GenericNodeBuilder Bd,
- ExplodedNode* Pred, GRExprEngine &Eng,
+ ExplodedNode* Pred, ExprEngine &Eng,
SymbolRef Sym, RefVal V, bool &stop);
// Return statements.
virtual void evalReturn(ExplodedNodeSet& Dst,
- GRExprEngine& Engine,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Engine,
+ StmtNodeBuilder& Builder,
const ReturnStmt* S,
ExplodedNode* Pred);
@@ -1949,7 +1949,7 @@
public:
CFRefLeakReport(CFRefBug& D, const CFRefCount &tf,
ExplodedNode *n, SymbolRef sym,
- GRExprEngine& Eng);
+ ExprEngine& Eng);
PathDiagnosticPiece* getEndPath(BugReporterContext& BRC,
const ExplodedNode* N);
@@ -2407,7 +2407,7 @@
CFRefLeakReport::CFRefLeakReport(CFRefBug& D, const CFRefCount &tf,
ExplodedNode *n,
- SymbolRef sym, GRExprEngine& Eng)
+ SymbolRef sym, ExprEngine& Eng)
: CFRefReport(D, tf, n, sym) {
// Most bug reports are cached at the location where they occured.
@@ -2474,8 +2474,8 @@
}
void CFRefCount::evalSummary(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
const Expr* Ex,
InstanceReceiver Receiver,
const RetainSummary& Summ,
@@ -2736,8 +2736,8 @@
void CFRefCount::evalCall(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
const CallExpr* CE, SVal L,
ExplodedNode* Pred) {
@@ -2761,8 +2761,8 @@
}
void CFRefCount::evalObjCMessageExpr(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
const ObjCMessageExpr* ME,
ExplodedNode* Pred,
const GRState *state) {
@@ -2792,7 +2792,7 @@
} // end anonymous namespace
-void CFRefCount::evalBind(GRStmtNodeBuilderRef& B, SVal location, SVal val) {
+void CFRefCount::evalBind(StmtNodeBuilderRef& B, SVal location, SVal val) {
// Are we storing to something that causes the value to "escape"?
bool escapes = false;
@@ -2832,8 +2832,8 @@
// Return statements.
void CFRefCount::evalReturn(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
const ReturnStmt* S,
ExplodedNode* Pred) {
@@ -3141,7 +3141,7 @@
std::pair<ExplodedNode*, const GRState *>
CFRefCount::HandleAutoreleaseCounts(const GRState * state, GenericNodeBuilder Bd,
ExplodedNode* Pred,
- GRExprEngine &Eng,
+ ExprEngine &Eng,
SymbolRef Sym, RefVal V, bool &stop) {
unsigned ACnt = V.getAutoreleaseCount();
@@ -3225,7 +3225,7 @@
CFRefCount::ProcessLeaks(const GRState * state,
llvm::SmallVectorImpl<SymbolRef> &Leaked,
GenericNodeBuilder &Builder,
- GRExprEngine& Eng,
+ ExprEngine& Eng,
ExplodedNode *Pred) {
if (Leaked.empty())
@@ -3249,8 +3249,8 @@
return N;
}
-void CFRefCount::evalEndPath(GRExprEngine& Eng,
- GREndPathNodeBuilder& Builder) {
+void CFRefCount::evalEndPath(ExprEngine& Eng,
+ EndPathNodeBuilder& Builder) {
const GRState *state = Builder.getState();
GenericNodeBuilder Bd(Builder);
@@ -3277,8 +3277,8 @@
}
void CFRefCount::evalDeadSymbols(ExplodedNodeSet& Dst,
- GRExprEngine& Eng,
- GRStmtNodeBuilder& Builder,
+ ExprEngine& Eng,
+ StmtNodeBuilder& Builder,
ExplodedNode* Pred,
const GRState* state,
SymbolReaper& SymReaper) {
@@ -3331,7 +3331,7 @@
}
void CFRefCount::ProcessNonLeakError(ExplodedNodeSet& Dst,
- GRStmtNodeBuilder& Builder,
+ StmtNodeBuilder& Builder,
const Expr* NodeExpr,
SourceRange ErrorRange,
ExplodedNode* Pred,
@@ -3430,7 +3430,7 @@
// Transfer function creation for external clients.
//===----------------------------------------------------------------------===//
-void CFRefCount::RegisterChecks(GRExprEngine& Eng) {
+void CFRefCount::RegisterChecks(ExprEngine& Eng) {
BugReporter &BR = Eng.getBugReporter();
useAfterRelease = new UseAfterRelease(this);
@@ -3488,13 +3488,13 @@
// Save the reference to the BugReporter.
this->BR = &BR;
- // Register the RetainReleaseChecker with the GRExprEngine object.
+ // Register the RetainReleaseChecker with the ExprEngine object.
// Functionality in CFRefCount will be migrated to RetainReleaseChecker
// over time.
Eng.registerCheck(new RetainReleaseChecker(this));
}
-GRTransferFuncs* GR::MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
+TransferFuncs* GR::MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
const LangOptions& lopts) {
return new CFRefCount(Ctx, GCEnabled, lopts);
}
diff --git a/lib/GR/CMakeLists.txt b/lib/GR/CMakeLists.txt
index 9cf7a3d..3b44fe3 100644
--- a/lib/GR/CMakeLists.txt
+++ b/lib/GR/CMakeLists.txt
@@ -19,10 +19,10 @@
ExplodedGraph.cpp
FlatStore.cpp
FrontendActions.cpp
- GRBlockCounter.cpp
- GRCXXExprEngine.cpp
- GRCoreEngine.cpp
- GRExprEngine.cpp
+ BlockCounter.cpp
+ CXXExprEngine.cpp
+ CoreEngine.cpp
+ ExprEngine.cpp
GRState.cpp
HTMLDiagnostics.cpp
ManagerRegistry.cpp
diff --git a/lib/GR/GRCXXExprEngine.cpp b/lib/GR/CXXExprEngine.cpp
similarity index 92%
rename from lib/GR/GRCXXExprEngine.cpp
rename to lib/GR/CXXExprEngine.cpp
index 2462955..b1111c9 100644
--- a/lib/GR/GRCXXExprEngine.cpp
+++ b/lib/GR/CXXExprEngine.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "clang/GR/PathSensitive/AnalysisManager.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/AST/DeclCXX.h"
using namespace clang;
@@ -29,7 +29,7 @@
};
}
-void GRExprEngine::evalArguments(ConstExprIterator AI, ConstExprIterator AE,
+void ExprEngine::evalArguments(ConstExprIterator AI, ConstExprIterator AE,
const FunctionProtoType *FnType,
ExplodedNode *Pred, ExplodedNodeSet &Dst,
bool FstArgAsLValue) {
@@ -67,20 +67,20 @@
}
}
-const CXXThisRegion *GRExprEngine::getCXXThisRegion(const CXXRecordDecl *D,
+const CXXThisRegion *ExprEngine::getCXXThisRegion(const CXXRecordDecl *D,
const StackFrameContext *SFC) {
Type *T = D->getTypeForDecl();
QualType PT = getContext().getPointerType(QualType(T, 0));
return svalBuilder.getRegionManager().getCXXThisRegion(PT, SFC);
}
-const CXXThisRegion *GRExprEngine::getCXXThisRegion(const CXXMethodDecl *decl,
+const CXXThisRegion *ExprEngine::getCXXThisRegion(const CXXMethodDecl *decl,
const StackFrameContext *frameCtx) {
return svalBuilder.getRegionManager().
getCXXThisRegion(decl->getThisType(getContext()), frameCtx);
}
-void GRExprEngine::CreateCXXTemporaryObject(const Expr *Ex, ExplodedNode *Pred,
+void ExprEngine::CreateCXXTemporaryObject(const Expr *Ex, ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
ExplodedNodeSet Tmp;
Visit(Ex, Pred, Tmp);
@@ -100,7 +100,7 @@
}
}
-void GRExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *E,
+void ExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *E,
const MemRegion *Dest,
ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
@@ -147,7 +147,7 @@
}
}
-void GRExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD,
+void ExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD,
const MemRegion *Dest,
const Stmt *S,
ExplodedNode *Pred,
@@ -171,7 +171,7 @@
Dst.Add(N);
}
-void GRExprEngine::VisitCXXMemberCallExpr(const CXXMemberCallExpr *MCE,
+void ExprEngine::VisitCXXMemberCallExpr(const CXXMemberCallExpr *MCE,
ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
// Get the method type.
@@ -200,7 +200,7 @@
evalMethodCall(MCE, MD, ObjArgExpr, Pred, AllargsEvaluated, Dst);
}
-void GRExprEngine::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *C,
+void ExprEngine::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *C,
ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
const CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(C->getCalleeDecl());
@@ -225,7 +225,7 @@
evalMethodCall(C, MD, C->getArg(0), Pred, argsEvaluated, Dst);
}
-void GRExprEngine::evalMethodCall(const CallExpr *MCE, const CXXMethodDecl *MD,
+void ExprEngine::evalMethodCall(const CallExpr *MCE, const CXXMethodDecl *MD,
const Expr *ThisExpr, ExplodedNode *Pred,
ExplodedNodeSet &Src, ExplodedNodeSet &Dst) {
// Allow checkers to pre-visit the member call.
@@ -254,7 +254,7 @@
}
}
-void GRExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred,
+void ExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
if (CNE->isArray()) {
// FIXME: allocating an array has not been handled.
@@ -302,7 +302,7 @@
}
}
-void GRExprEngine::VisitCXXDeleteExpr(const CXXDeleteExpr *CDE,
+void ExprEngine::VisitCXXDeleteExpr(const CXXDeleteExpr *CDE,
ExplodedNode *Pred,ExplodedNodeSet &Dst) {
// Should do more checking.
ExplodedNodeSet Argevaluated;
@@ -314,7 +314,7 @@
}
}
-void GRExprEngine::VisitCXXThisExpr(const CXXThisExpr *TE, ExplodedNode *Pred,
+void ExprEngine::VisitCXXThisExpr(const CXXThisExpr *TE, ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
// Get the this object region from StoreManager.
const MemRegion *R =
diff --git a/lib/GR/Checkers/AdjustedReturnValueChecker.cpp b/lib/GR/Checkers/AdjustedReturnValueChecker.cpp
index d9cfd3c..3c78b39 100644
--- a/lib/GR/Checkers/AdjustedReturnValueChecker.cpp
+++ b/lib/GR/Checkers/AdjustedReturnValueChecker.cpp
@@ -13,9 +13,9 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugReporter.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
using namespace clang;
@@ -35,7 +35,7 @@
};
}
-void GR::RegisterAdjustedReturnValueChecker(GRExprEngine &Eng) {
+void GR::RegisterAdjustedReturnValueChecker(ExprEngine &Eng) {
Eng.registerCheck(new AdjustedReturnValueChecker());
}
diff --git a/lib/GR/Checkers/ArrayBoundChecker.cpp b/lib/GR/Checkers/ArrayBoundChecker.cpp
index f97adf3..9dc53a2 100644
--- a/lib/GR/Checkers/ArrayBoundChecker.cpp
+++ b/lib/GR/Checkers/ArrayBoundChecker.cpp
@@ -12,10 +12,10 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -31,7 +31,7 @@
};
}
-void GR::RegisterArrayBoundChecker(GRExprEngine &Eng) {
+void GR::RegisterArrayBoundChecker(ExprEngine &Eng) {
Eng.registerCheck(new ArrayBoundChecker());
}
diff --git a/lib/GR/Checkers/AttrNonNullChecker.cpp b/lib/GR/Checkers/AttrNonNullChecker.cpp
index baf209e..74eb882 100644
--- a/lib/GR/Checkers/AttrNonNullChecker.cpp
+++ b/lib/GR/Checkers/AttrNonNullChecker.cpp
@@ -7,12 +7,12 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines AttrNonNullChecker, a builtin check in GRExprEngine that
+// This defines AttrNonNullChecker, a builtin check in ExprEngine that
// performs checks for arguments declared to have nonnull attribute.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -33,7 +33,7 @@
};
} // end anonymous namespace
-void GR::RegisterAttrNonNullChecker(GRExprEngine &Eng) {
+void GR::RegisterAttrNonNullChecker(ExprEngine &Eng) {
Eng.registerCheck(new AttrNonNullChecker());
}
diff --git a/lib/GR/Checkers/BasicObjCFoundationChecks.cpp b/lib/GR/Checkers/BasicObjCFoundationChecks.cpp
index 93c8bab..33a58bd 100644
--- a/lib/GR/Checkers/BasicObjCFoundationChecks.cpp
+++ b/lib/GR/Checkers/BasicObjCFoundationChecks.cpp
@@ -17,7 +17,7 @@
#include "clang/GR/PathSensitive/ExplodedGraph.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/GR/PathSensitive/GRState.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/MemRegion.h"
@@ -511,7 +511,7 @@
// Check registration.
//===----------------------------------------------------------------------===//
-void GR::RegisterAppleChecks(GRExprEngine& Eng, const Decl &D) {
+void GR::RegisterAppleChecks(ExprEngine& Eng, const Decl &D) {
Eng.registerCheck(new NilArgChecker());
Eng.registerCheck(new CFNumberCreateChecker());
RegisterNSErrorChecks(Eng.getBugReporter(), Eng, D);
diff --git a/lib/GR/Checkers/BasicObjCFoundationChecks.h b/lib/GR/Checkers/BasicObjCFoundationChecks.h
index 7fdccdc..63143eb 100644
--- a/lib/GR/Checkers/BasicObjCFoundationChecks.h
+++ b/lib/GR/Checkers/BasicObjCFoundationChecks.h
@@ -24,10 +24,10 @@
namespace GR {
class BugReporter;
-class GRExprEngine;
+class ExprEngine;
-void RegisterNSErrorChecks(BugReporter& BR, GRExprEngine &Eng, const Decl &D);
-void RegisterNSAutoreleasePoolChecks(GRExprEngine &Eng);
+void RegisterNSErrorChecks(BugReporter& BR, ExprEngine &Eng, const Decl &D);
+void RegisterNSAutoreleasePoolChecks(ExprEngine &Eng);
} // end GR namespace
diff --git a/lib/GR/Checkers/BuiltinFunctionChecker.cpp b/lib/GR/Checkers/BuiltinFunctionChecker.cpp
index dc55a65..27162e4 100644
--- a/lib/GR/Checkers/BuiltinFunctionChecker.cpp
+++ b/lib/GR/Checkers/BuiltinFunctionChecker.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/PathSensitive/Checker.h"
#include "clang/Basic/Builtins.h"
@@ -28,7 +28,7 @@
}
-void GR::RegisterBuiltinFunctionChecker(GRExprEngine &Eng) {
+void GR::RegisterBuiltinFunctionChecker(ExprEngine &Eng) {
Eng.registerCheck(new BuiltinFunctionChecker());
}
diff --git a/lib/GR/Checkers/CMakeLists.txt b/lib/GR/Checkers/CMakeLists.txt
index 700adb5..cae050d 100644
--- a/lib/GR/Checkers/CMakeLists.txt
+++ b/lib/GR/Checkers/CMakeLists.txt
@@ -17,7 +17,7 @@
DereferenceChecker.cpp
DivZeroChecker.cpp
FixedAddressChecker.cpp
- GRExprEngineExperimentalChecks.cpp
+ ExprEngineExperimentalChecks.cpp
IdempotentOperationChecker.cpp
LLVMConventionsChecker.cpp
MacOSXAPIChecker.cpp
diff --git a/lib/GR/Checkers/CStringChecker.cpp b/lib/GR/Checkers/CStringChecker.cpp
index da0bba3..a9d3064 100644
--- a/lib/GR/Checkers/CStringChecker.cpp
+++ b/lib/GR/Checkers/CStringChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "clang/GR/PathSensitive/GRStateTrait.h"
@@ -109,7 +109,7 @@
}
}
-void GR::RegisterCStringChecker(GRExprEngine &Eng) {
+void GR::RegisterCStringChecker(ExprEngine &Eng) {
Eng.registerCheck(new CStringChecker());
}
diff --git a/lib/GR/Checkers/CallAndMessageChecker.cpp b/lib/GR/Checkers/CallAndMessageChecker.cpp
index 8b8f75f..f3306d1 100644
--- a/lib/GR/Checkers/CallAndMessageChecker.cpp
+++ b/lib/GR/Checkers/CallAndMessageChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/AST/ParentMap.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/GR/BugReporter/BugType.h"
@@ -62,7 +62,7 @@
};
} // end anonymous namespace
-void GR::RegisterCallAndMessageChecker(GRExprEngine &Eng) {
+void GR::RegisterCallAndMessageChecker(ExprEngine &Eng) {
Eng.registerCheck(new CallAndMessageChecker());
}
diff --git a/lib/GR/Checkers/CastSizeChecker.cpp b/lib/GR/Checkers/CastSizeChecker.cpp
index bcbb894..c17dc7a 100644
--- a/lib/GR/Checkers/CastSizeChecker.cpp
+++ b/lib/GR/Checkers/CastSizeChecker.cpp
@@ -14,7 +14,7 @@
#include "clang/AST/CharUnits.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
using namespace clang;
using namespace GR;
@@ -86,6 +86,6 @@
}
-void GR::RegisterCastSizeChecker(GRExprEngine &Eng) {
+void GR::RegisterCastSizeChecker(ExprEngine &Eng) {
Eng.registerCheck(new CastSizeChecker());
}
diff --git a/lib/GR/Checkers/CastToStructChecker.cpp b/lib/GR/Checkers/CastToStructChecker.cpp
index 0bcba28..7b07329 100644
--- a/lib/GR/Checkers/CastToStructChecker.cpp
+++ b/lib/GR/Checkers/CastToStructChecker.cpp
@@ -15,7 +15,7 @@
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
using namespace clang;
using namespace GR;
@@ -74,6 +74,6 @@
}
}
-void GR::RegisterCastToStructChecker(GRExprEngine &Eng) {
+void GR::RegisterCastToStructChecker(ExprEngine &Eng) {
Eng.registerCheck(new CastToStructChecker());
}
diff --git a/lib/GR/Checkers/CheckDeadStores.cpp b/lib/GR/Checkers/CheckDeadStores.cpp
index 44fdb3a..edcf57c 100644
--- a/lib/GR/Checkers/CheckDeadStores.cpp
+++ b/lib/GR/Checkers/CheckDeadStores.cpp
@@ -16,7 +16,7 @@
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/Visitors/CFGRecStmtVisitor.h"
#include "clang/GR/BugReporter/BugReporter.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/AST/ASTContext.h"
diff --git a/lib/GR/Checkers/ChrootChecker.cpp b/lib/GR/Checkers/ChrootChecker.cpp
index f93ee7b..58b34d0 100644
--- a/lib/GR/Checkers/ChrootChecker.cpp
+++ b/lib/GR/Checkers/ChrootChecker.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "clang/GR/PathSensitive/GRState.h"
@@ -59,7 +59,7 @@
} // end anonymous namespace
-void GR::RegisterChrootChecker(GRExprEngine &Eng) {
+void GR::RegisterChrootChecker(ExprEngine &Eng) {
Eng.registerCheck(new ChrootChecker());
}
diff --git a/lib/GR/Checkers/DereferenceChecker.cpp b/lib/GR/Checkers/DereferenceChecker.cpp
index 62b1f86..dbe0ab3 100644
--- a/lib/GR/Checkers/DereferenceChecker.cpp
+++ b/lib/GR/Checkers/DereferenceChecker.cpp
@@ -7,16 +7,16 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines NullDerefChecker, a builtin check in GRExprEngine that performs
+// This defines NullDerefChecker, a builtin check in ExprEngine that performs
// checks for null pointers at loads and stores.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/Checkers/DereferenceChecker.h"
#include "clang/GR/PathSensitive/Checker.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -43,12 +43,12 @@
};
} // end anonymous namespace
-void GR::RegisterDereferenceChecker(GRExprEngine &Eng) {
+void GR::RegisterDereferenceChecker(ExprEngine &Eng) {
Eng.registerCheck(new DereferenceChecker());
}
std::pair<ExplodedNode * const *, ExplodedNode * const *>
-GR::GetImplicitNullDereferences(GRExprEngine &Eng) {
+GR::GetImplicitNullDereferences(ExprEngine &Eng) {
DereferenceChecker *checker = Eng.getChecker<DereferenceChecker>();
if (!checker)
return std::make_pair((ExplodedNode * const *) 0,
diff --git a/lib/GR/Checkers/DivZeroChecker.cpp b/lib/GR/Checkers/DivZeroChecker.cpp
index a4cb1a4..1475a9e 100644
--- a/lib/GR/Checkers/DivZeroChecker.cpp
+++ b/lib/GR/Checkers/DivZeroChecker.cpp
@@ -7,12 +7,12 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines DivZeroChecker, a builtin check in GRExprEngine that performs
+// This defines DivZeroChecker, a builtin check in ExprEngine that performs
// checks for division by zeros.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -29,7 +29,7 @@
};
} // end anonymous namespace
-void GR::RegisterDivZeroChecker(GRExprEngine &Eng) {
+void GR::RegisterDivZeroChecker(ExprEngine &Eng) {
Eng.registerCheck(new DivZeroChecker());
}
diff --git a/lib/GR/Checkers/GRExprEngineExperimentalChecks.cpp b/lib/GR/Checkers/ExprEngineExperimentalChecks.cpp
similarity index 78%
rename from lib/GR/Checkers/GRExprEngineExperimentalChecks.cpp
rename to lib/GR/Checkers/ExprEngineExperimentalChecks.cpp
index fd9bf5d..d7ad99f 100644
--- a/lib/GR/Checkers/GRExprEngineExperimentalChecks.cpp
+++ b/lib/GR/Checkers/ExprEngineExperimentalChecks.cpp
@@ -1,4 +1,4 @@
-//=-- GRExprEngineExperimentalChecks.h ------------------------------*- C++ -*-=
+//=-- ExprEngineExperimentalChecks.h ------------------------------*- C++ -*-=
//
// The LLVM Compiler Infrastructure
//
@@ -8,20 +8,20 @@
//===----------------------------------------------------------------------===//
//
// This file defines functions to instantiate and register experimental
-// checks in GRExprEngine.
+// checks in ExprEngine.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineInternalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "clang/GR/Checkers/LocalCheckers.h"
using namespace clang;
using namespace GR;
-void GR::RegisterExperimentalChecks(GRExprEngine &Eng) {
+void GR::RegisterExperimentalChecks(ExprEngine &Eng) {
// These are checks that never belong as internal checks
- // within GRExprEngine.
+ // within ExprEngine.
RegisterCStringChecker(Eng);
RegisterChrootChecker(Eng);
RegisterMallocChecker(Eng);
@@ -30,7 +30,7 @@
RegisterUnreachableCodeChecker(Eng);
}
-void GR::RegisterExperimentalInternalChecks(GRExprEngine &Eng) {
+void GR::RegisterExperimentalInternalChecks(ExprEngine &Eng) {
// These are internal checks that should eventually migrate to
// RegisterInternalChecks() once they have been further tested.
diff --git a/lib/GR/Checkers/ExprEngineExperimentalChecks.h b/lib/GR/Checkers/ExprEngineExperimentalChecks.h
new file mode 100644
index 0000000..4a04fb9
--- /dev/null
+++ b/lib/GR/Checkers/ExprEngineExperimentalChecks.h
@@ -0,0 +1,37 @@
+//=-- ExprEngineExperimentalChecks.h ------------------------------*- C++ -*-=
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines functions to instantiate and register experimental
+// checks in ExprEngine.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_GR_ExprEngine_EXPERIMENTAL_CHECKS
+#define LLVM_CLANG_GR_ExprEngine_EXPERIMENTAL_CHECKS
+
+namespace clang {
+
+namespace GR {
+
+class ExprEngine;
+
+void RegisterAnalyzerStatsChecker(ExprEngine &Eng);
+void RegisterChrootChecker(ExprEngine &Eng);
+void RegisterCStringChecker(ExprEngine &Eng);
+void RegisterIdempotentOperationChecker(ExprEngine &Eng);
+void RegisterMallocChecker(ExprEngine &Eng);
+void RegisterPthreadLockChecker(ExprEngine &Eng);
+void RegisterStreamChecker(ExprEngine &Eng);
+void RegisterUnreachableCodeChecker(ExprEngine &Eng);
+
+} // end GR namespace
+
+} // end clang namespace
+
+#endif
diff --git a/lib/GR/Checkers/ExprEngineInternalChecks.h b/lib/GR/Checkers/ExprEngineInternalChecks.h
new file mode 100644
index 0000000..aa2f99b
--- /dev/null
+++ b/lib/GR/Checkers/ExprEngineInternalChecks.h
@@ -0,0 +1,58 @@
+//=-- ExprEngineInternalChecks.h- Builtin ExprEngine Checks -----*- C++ -*-=
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines functions to instantiate and register the "built-in"
+// checks in ExprEngine.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_GR_ExprEngine_INTERNAL_CHECKS
+#define LLVM_CLANG_GR_ExprEngine_INTERNAL_CHECKS
+
+namespace clang {
+
+namespace GR {
+
+class ExprEngine;
+
+// Foundational checks that handle basic semantics.
+void RegisterAdjustedReturnValueChecker(ExprEngine &Eng);
+void RegisterArrayBoundChecker(ExprEngine &Eng);
+void RegisterAttrNonNullChecker(ExprEngine &Eng);
+void RegisterBuiltinFunctionChecker(ExprEngine &Eng);
+void RegisterCallAndMessageChecker(ExprEngine &Eng);
+void RegisterCastToStructChecker(ExprEngine &Eng);
+void RegisterCastSizeChecker(ExprEngine &Eng);
+void RegisterDereferenceChecker(ExprEngine &Eng);
+void RegisterDivZeroChecker(ExprEngine &Eng);
+void RegisterFixedAddressChecker(ExprEngine &Eng);
+void RegisterNoReturnFunctionChecker(ExprEngine &Eng);
+void RegisterObjCAtSyncChecker(ExprEngine &Eng);
+void RegisterPointerArithChecker(ExprEngine &Eng);
+void RegisterPointerSubChecker(ExprEngine &Eng);
+void RegisterReturnPointerRangeChecker(ExprEngine &Eng);
+void RegisterReturnUndefChecker(ExprEngine &Eng);
+void RegisterStackAddrLeakChecker(ExprEngine &Eng);
+void RegisterUndefBranchChecker(ExprEngine &Eng);
+void RegisterUndefCapturedBlockVarChecker(ExprEngine &Eng);
+void RegisterUndefResultChecker(ExprEngine &Eng);
+void RegisterUndefinedArraySubscriptChecker(ExprEngine &Eng);
+void RegisterUndefinedAssignmentChecker(ExprEngine &Eng);
+void RegisterVLASizeChecker(ExprEngine &Eng);
+
+// API checks.
+void RegisterMacOSXAPIChecker(ExprEngine &Eng);
+void RegisterOSAtomicChecker(ExprEngine &Eng);
+void RegisterUnixAPIChecker(ExprEngine &Eng);
+
+} // end GR namespace
+
+} // end clang namespace
+
+#endif
diff --git a/lib/GR/Checkers/FixedAddressChecker.cpp b/lib/GR/Checkers/FixedAddressChecker.cpp
index 4c7086f..d7caad1 100644
--- a/lib/GR/Checkers/FixedAddressChecker.cpp
+++ b/lib/GR/Checkers/FixedAddressChecker.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -67,6 +67,6 @@
}
}
-void GR::RegisterFixedAddressChecker(GRExprEngine &Eng) {
+void GR::RegisterFixedAddressChecker(ExprEngine &Eng) {
Eng.registerCheck(new FixedAddressChecker());
}
diff --git a/lib/GR/Checkers/GRExprEngineExperimentalChecks.h b/lib/GR/Checkers/GRExprEngineExperimentalChecks.h
deleted file mode 100644
index 54a6125..0000000
--- a/lib/GR/Checkers/GRExprEngineExperimentalChecks.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//=-- GRExprEngineExperimentalChecks.h ------------------------------*- C++ -*-=
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines functions to instantiate and register experimental
-// checks in GRExprEngine.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_GR_GREXPRENGINE_EXPERIMENTAL_CHECKS
-#define LLVM_CLANG_GR_GREXPRENGINE_EXPERIMENTAL_CHECKS
-
-namespace clang {
-
-namespace GR {
-
-class GRExprEngine;
-
-void RegisterAnalyzerStatsChecker(GRExprEngine &Eng);
-void RegisterChrootChecker(GRExprEngine &Eng);
-void RegisterCStringChecker(GRExprEngine &Eng);
-void RegisterIdempotentOperationChecker(GRExprEngine &Eng);
-void RegisterMallocChecker(GRExprEngine &Eng);
-void RegisterPthreadLockChecker(GRExprEngine &Eng);
-void RegisterStreamChecker(GRExprEngine &Eng);
-void RegisterUnreachableCodeChecker(GRExprEngine &Eng);
-
-} // end GR namespace
-
-} // end clang namespace
-
-#endif
diff --git a/lib/GR/Checkers/GRExprEngineInternalChecks.h b/lib/GR/Checkers/GRExprEngineInternalChecks.h
deleted file mode 100644
index cba419a..0000000
--- a/lib/GR/Checkers/GRExprEngineInternalChecks.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//=-- GRExprEngineInternalChecks.h- Builtin GRExprEngine Checks -----*- C++ -*-=
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines functions to instantiate and register the "built-in"
-// checks in GRExprEngine.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_GR_GREXPRENGINE_INTERNAL_CHECKS
-#define LLVM_CLANG_GR_GREXPRENGINE_INTERNAL_CHECKS
-
-namespace clang {
-
-namespace GR {
-
-class GRExprEngine;
-
-// Foundational checks that handle basic semantics.
-void RegisterAdjustedReturnValueChecker(GRExprEngine &Eng);
-void RegisterArrayBoundChecker(GRExprEngine &Eng);
-void RegisterAttrNonNullChecker(GRExprEngine &Eng);
-void RegisterBuiltinFunctionChecker(GRExprEngine &Eng);
-void RegisterCallAndMessageChecker(GRExprEngine &Eng);
-void RegisterCastToStructChecker(GRExprEngine &Eng);
-void RegisterCastSizeChecker(GRExprEngine &Eng);
-void RegisterDereferenceChecker(GRExprEngine &Eng);
-void RegisterDivZeroChecker(GRExprEngine &Eng);
-void RegisterFixedAddressChecker(GRExprEngine &Eng);
-void RegisterNoReturnFunctionChecker(GRExprEngine &Eng);
-void RegisterObjCAtSyncChecker(GRExprEngine &Eng);
-void RegisterPointerArithChecker(GRExprEngine &Eng);
-void RegisterPointerSubChecker(GRExprEngine &Eng);
-void RegisterReturnPointerRangeChecker(GRExprEngine &Eng);
-void RegisterReturnUndefChecker(GRExprEngine &Eng);
-void RegisterStackAddrLeakChecker(GRExprEngine &Eng);
-void RegisterUndefBranchChecker(GRExprEngine &Eng);
-void RegisterUndefCapturedBlockVarChecker(GRExprEngine &Eng);
-void RegisterUndefResultChecker(GRExprEngine &Eng);
-void RegisterUndefinedArraySubscriptChecker(GRExprEngine &Eng);
-void RegisterUndefinedAssignmentChecker(GRExprEngine &Eng);
-void RegisterVLASizeChecker(GRExprEngine &Eng);
-
-// API checks.
-void RegisterMacOSXAPIChecker(GRExprEngine &Eng);
-void RegisterOSAtomicChecker(GRExprEngine &Eng);
-void RegisterUnixAPIChecker(GRExprEngine &Eng);
-
-} // end GR namespace
-
-} // end clang namespace
-
-#endif
diff --git a/lib/GR/Checkers/IdempotentOperationChecker.cpp b/lib/GR/Checkers/IdempotentOperationChecker.cpp
index b28edc3..15e9be9 100644
--- a/lib/GR/Checkers/IdempotentOperationChecker.cpp
+++ b/lib/GR/Checkers/IdempotentOperationChecker.cpp
@@ -42,14 +42,14 @@
// - Finer grained false positive control (levels)
// - Handling ~0 values
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "clang/Analysis/CFGStmtMap.h"
#include "clang/Analysis/Analyses/PseudoConstantAnalysis.h"
#include "clang/GR/BugReporter/BugReporter.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerHelpers.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRCoreEngine.h"
+#include "clang/GR/PathSensitive/CoreEngine.h"
#include "clang/GR/PathSensitive/SVals.h"
#include "clang/AST/Stmt.h"
#include "llvm/ADT/DenseMap.h"
@@ -67,7 +67,7 @@
static void *getTag();
void PreVisitBinaryOperator(CheckerContext &C, const BinaryOperator *B);
void PostVisitBinaryOperator(CheckerContext &C, const BinaryOperator *B);
- void VisitEndAnalysis(ExplodedGraph &G, BugReporter &B, GRExprEngine &Eng);
+ void VisitEndAnalysis(ExplodedGraph &G, BugReporter &B, ExprEngine &Eng);
private:
// Our assumption about a particular operation.
@@ -84,7 +84,7 @@
bool PathWasCompletelyAnalyzed(const CFG *C,
const CFGBlock *CB,
const CFGStmtMap *CBM,
- const GRCoreEngine &CE);
+ const CoreEngine &CE);
static bool CanVary(const Expr *Ex,
AnalysisContext *AC);
static bool isConstantOrPseudoConstant(const DeclRefExpr *DR,
@@ -130,7 +130,7 @@
return &x;
}
-void GR::RegisterIdempotentOperationChecker(GRExprEngine &Eng) {
+void GR::RegisterIdempotentOperationChecker(ExprEngine &Eng) {
Eng.registerCheck(new IdempotentOperationChecker());
}
@@ -364,7 +364,7 @@
void IdempotentOperationChecker::VisitEndAnalysis(ExplodedGraph &G,
BugReporter &BR,
- GRExprEngine &Eng) {
+ ExprEngine &Eng) {
BugType *BT = new BugType("Idempotent operation", "Dead code");
// Iterate over the hash to see if we have any paths with definite
// idempotent operations.
@@ -553,9 +553,9 @@
const CFG *C,
const CFGBlock *CB,
const CFGStmtMap *CBM,
- const GRCoreEngine &CE) {
+ const CoreEngine &CE) {
// Test for reachability from any aborted blocks to this block
- typedef GRCoreEngine::BlocksAborted::const_iterator AbortedIterator;
+ typedef CoreEngine::BlocksAborted::const_iterator AbortedIterator;
for (AbortedIterator I = CE.blocks_aborted_begin(),
E = CE.blocks_aborted_end(); I != E; ++I) {
const BlockEdge &BE = I->first;
@@ -569,7 +569,7 @@
// For the items still on the worklist, see if they are in blocks that
// can eventually reach 'CB'.
- class VisitWL : public GRWorkList::Visitor {
+ class VisitWL : public WorkList::Visitor {
const CFGStmtMap *CBM;
const CFGBlock *TargetBlock;
CFGReachabilityAnalysis &CRA;
@@ -577,7 +577,7 @@
VisitWL(const CFGStmtMap *cbm, const CFGBlock *targetBlock,
CFGReachabilityAnalysis &cra)
: CBM(cbm), TargetBlock(targetBlock), CRA(cra) {}
- virtual bool Visit(const GRWorkListUnit &U) {
+ virtual bool Visit(const WorkListUnit &U) {
ProgramPoint P = U.getNode()->getLocation();
const CFGBlock *B = 0;
if (StmtPoint *SP = dyn_cast<StmtPoint>(&P)) {
diff --git a/lib/GR/Checkers/MacOSXAPIChecker.cpp b/lib/GR/Checkers/MacOSXAPIChecker.cpp
index 316e37a..d772871 100644
--- a/lib/GR/Checkers/MacOSXAPIChecker.cpp
+++ b/lib/GR/Checkers/MacOSXAPIChecker.cpp
@@ -15,7 +15,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -45,7 +45,7 @@
};
} //end anonymous namespace
-void GR::RegisterMacOSXAPIChecker(GRExprEngine &Eng) {
+void GR::RegisterMacOSXAPIChecker(ExprEngine &Eng) {
if (Eng.getContext().Target.getTriple().getVendor() == llvm::Triple::Apple)
Eng.registerCheck(new MacOSXAPIChecker());
}
diff --git a/lib/GR/Checkers/MallocChecker.cpp b/lib/GR/Checkers/MallocChecker.cpp
index cd5f636..bbfc7b0 100644
--- a/lib/GR/Checkers/MallocChecker.cpp
+++ b/lib/GR/Checkers/MallocChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "clang/GR/PathSensitive/GRState.h"
@@ -78,7 +78,7 @@
static void *getTag();
bool evalCallExpr(CheckerContext &C, const CallExpr *CE);
void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper);
- void evalEndPath(GREndPathNodeBuilder &B, void *tag, GRExprEngine &Eng);
+ void evalEndPath(EndPathNodeBuilder &B, void *tag, ExprEngine &Eng);
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S);
const GRState *evalAssume(const GRState *state, SVal Cond, bool Assumption,
bool *respondsToCallback);
@@ -126,7 +126,7 @@
}
}
-void GR::RegisterMallocChecker(GRExprEngine &Eng) {
+void GR::RegisterMallocChecker(ExprEngine &Eng) {
Eng.registerCheck(new MallocChecker());
}
@@ -593,8 +593,8 @@
C.generateNode(state->set<RegionState>(RS));
}
-void MallocChecker::evalEndPath(GREndPathNodeBuilder &B, void *tag,
- GRExprEngine &Eng) {
+void MallocChecker::evalEndPath(EndPathNodeBuilder &B, void *tag,
+ ExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
RegionStateTy M = state->get<RegionState>();
diff --git a/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp b/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp
index d6701c7..beb4a81 100644
--- a/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp
+++ b/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp
@@ -16,7 +16,7 @@
//===----------------------------------------------------------------------===//
#include "clang/GR/BugReporter/BugReporter.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "BasicObjCFoundationChecks.h"
#include "clang/AST/DeclObjC.h"
@@ -45,7 +45,7 @@
} // end anonymous namespace
-void GR::RegisterNSAutoreleasePoolChecks(GRExprEngine &Eng) {
+void GR::RegisterNSAutoreleasePoolChecks(ExprEngine &Eng) {
ASTContext &Ctx = Eng.getContext();
if (Ctx.getLangOptions().getGCMode() != LangOptions::NonGC) {
Eng.registerCheck(new NSAutoreleasePoolChecker(GetNullarySelector("release",
diff --git a/lib/GR/Checkers/NSErrorChecker.cpp b/lib/GR/Checkers/NSErrorChecker.cpp
index 44715bf..3cfb044 100644
--- a/lib/GR/Checkers/NSErrorChecker.cpp
+++ b/lib/GR/Checkers/NSErrorChecker.cpp
@@ -17,7 +17,7 @@
#include "clang/GR/Checkers/LocalCheckers.h"
#include "clang/GR/BugReporter/BugType.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/GR/Checkers/DereferenceChecker.h"
#include "BasicObjCFoundationChecks.h"
#include "clang/AST/DeclObjC.h"
@@ -32,7 +32,7 @@
const Decl &CodeDecl;
const bool isNSErrorWarning;
IdentifierInfo * const II;
- GRExprEngine &Eng;
+ ExprEngine &Eng;
void CheckSignature(const ObjCMethodDecl& MD, QualType& ResultTy,
llvm::SmallVectorImpl<VarDecl*>& ErrorParams);
@@ -49,7 +49,7 @@
void EmitRetTyWarning(BugReporter& BR, const Decl& CodeDecl);
public:
- NSErrorChecker(const Decl &D, bool isNSError, GRExprEngine& eng)
+ NSErrorChecker(const Decl &D, bool isNSError, ExprEngine& eng)
: BugType(isNSError ? "NSError** null dereference"
: "CFErrorRef* null dereference",
"Coding conventions (Apple)"),
@@ -63,7 +63,7 @@
} // end anonymous namespace
-void GR::RegisterNSErrorChecks(BugReporter& BR, GRExprEngine &Eng,
+void GR::RegisterNSErrorChecks(BugReporter& BR, ExprEngine &Eng,
const Decl &D) {
BR.Register(new NSErrorChecker(D, true, Eng));
BR.Register(new NSErrorChecker(D, false, Eng));
diff --git a/lib/GR/Checkers/NoReturnFunctionChecker.cpp b/lib/GR/Checkers/NoReturnFunctionChecker.cpp
index 739460f..f6d33db 100644
--- a/lib/GR/Checkers/NoReturnFunctionChecker.cpp
+++ b/lib/GR/Checkers/NoReturnFunctionChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "llvm/ADT/StringSwitch.h"
@@ -29,7 +29,7 @@
}
-void GR::RegisterNoReturnFunctionChecker(GRExprEngine &Eng) {
+void GR::RegisterNoReturnFunctionChecker(ExprEngine &Eng) {
Eng.registerCheck(new NoReturnFunctionChecker());
}
diff --git a/lib/GR/Checkers/OSAtomicChecker.cpp b/lib/GR/Checkers/OSAtomicChecker.cpp
index 7df7a9e..c27e508 100644
--- a/lib/GR/Checkers/OSAtomicChecker.cpp
+++ b/lib/GR/Checkers/OSAtomicChecker.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/PathSensitive/Checker.h"
#include "clang/Basic/Builtins.h"
@@ -31,7 +31,7 @@
}
-void GR::RegisterOSAtomicChecker(GRExprEngine &Eng) {
+void GR::RegisterOSAtomicChecker(ExprEngine &Eng) {
Eng.registerCheck(new OSAtomicChecker());
}
@@ -97,7 +97,7 @@
const void *OSAtomicStoreTag = &magic_store;
// Load 'theValue'.
- GRExprEngine &Engine = C.getEngine();
+ ExprEngine &Engine = C.getEngine();
const GRState *state = C.getState();
ExplodedNodeSet Tmp;
SVal location = state->getSVal(theValueExpr);
diff --git a/lib/GR/Checkers/ObjCAtSyncChecker.cpp b/lib/GR/Checkers/ObjCAtSyncChecker.cpp
index a393862..40619a2 100644
--- a/lib/GR/Checkers/ObjCAtSyncChecker.cpp
+++ b/lib/GR/Checkers/ObjCAtSyncChecker.cpp
@@ -12,11 +12,11 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/Checkers/DereferenceChecker.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -33,7 +33,7 @@
};
} // end anonymous namespace
-void GR::RegisterObjCAtSyncChecker(GRExprEngine &Eng) {
+void GR::RegisterObjCAtSyncChecker(ExprEngine &Eng) {
// @synchronized is an Objective-C 2 feature.
if (Eng.getContext().getLangOptions().ObjC2)
Eng.registerCheck(new ObjCAtSyncChecker());
diff --git a/lib/GR/Checkers/PointerArithChecker.cpp b/lib/GR/Checkers/PointerArithChecker.cpp
index 485144a..1f87005 100644
--- a/lib/GR/Checkers/PointerArithChecker.cpp
+++ b/lib/GR/Checkers/PointerArithChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -67,6 +67,6 @@
}
}
-void GR::RegisterPointerArithChecker(GRExprEngine &Eng) {
+void GR::RegisterPointerArithChecker(ExprEngine &Eng) {
Eng.registerCheck(new PointerArithChecker());
}
diff --git a/lib/GR/Checkers/PointerSubChecker.cpp b/lib/GR/Checkers/PointerSubChecker.cpp
index 44e3d9f..57ab318 100644
--- a/lib/GR/Checkers/PointerSubChecker.cpp
+++ b/lib/GR/Checkers/PointerSubChecker.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -74,6 +74,6 @@
}
}
-void GR::RegisterPointerSubChecker(GRExprEngine &Eng) {
+void GR::RegisterPointerSubChecker(ExprEngine &Eng) {
Eng.registerCheck(new PointerSubChecker());
}
diff --git a/lib/GR/Checkers/PthreadLockChecker.cpp b/lib/GR/Checkers/PthreadLockChecker.cpp
index d880b06..ae58b78 100644
--- a/lib/GR/Checkers/PthreadLockChecker.cpp
+++ b/lib/GR/Checkers/PthreadLockChecker.cpp
@@ -8,14 +8,14 @@
//===----------------------------------------------------------------------===//
//
// This defines PthreadLockChecker, a simple lock -> unlock checker. Eventually
-// this shouldn't be registered with GRExprEngineInternalChecks.
+// this shouldn't be registered with ExprEngineInternalChecks.
//
//===----------------------------------------------------------------------===//
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "clang/GR/BugReporter/BugReporter.h"
#include "clang/GR/PathSensitive/GRStateTrait.h"
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "llvm/ADT/ImmutableSet.h"
using namespace clang;
@@ -53,7 +53,7 @@
} // end GR namespace
} // end clang namespace
-void GR::RegisterPthreadLockChecker(GRExprEngine &Eng) {
+void GR::RegisterPthreadLockChecker(ExprEngine &Eng) {
Eng.registerCheck(new PthreadLockChecker());
}
diff --git a/lib/GR/Checkers/ReturnPointerRangeChecker.cpp b/lib/GR/Checkers/ReturnPointerRangeChecker.cpp
index 98b4ea5..4ef5737f 100644
--- a/lib/GR/Checkers/ReturnPointerRangeChecker.cpp
+++ b/lib/GR/Checkers/ReturnPointerRangeChecker.cpp
@@ -12,10 +12,10 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -31,7 +31,7 @@
};
}
-void GR::RegisterReturnPointerRangeChecker(GRExprEngine &Eng) {
+void GR::RegisterReturnPointerRangeChecker(ExprEngine &Eng) {
Eng.registerCheck(new ReturnPointerRangeChecker());
}
diff --git a/lib/GR/Checkers/ReturnUndefChecker.cpp b/lib/GR/Checkers/ReturnUndefChecker.cpp
index addae5b..2a1027a 100644
--- a/lib/GR/Checkers/ReturnUndefChecker.cpp
+++ b/lib/GR/Checkers/ReturnUndefChecker.cpp
@@ -13,10 +13,10 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -32,7 +32,7 @@
};
}
-void GR::RegisterReturnUndefChecker(GRExprEngine &Eng) {
+void GR::RegisterReturnUndefChecker(ExprEngine &Eng) {
Eng.registerCheck(new ReturnUndefChecker());
}
diff --git a/lib/GR/Checkers/StackAddrLeakChecker.cpp b/lib/GR/Checkers/StackAddrLeakChecker.cpp
index 87f5819..3ef78a4 100644
--- a/lib/GR/Checkers/StackAddrLeakChecker.cpp
+++ b/lib/GR/Checkers/StackAddrLeakChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "clang/GR/PathSensitive/GRState.h"
@@ -33,7 +33,7 @@
return &x;
}
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *RS);
- void evalEndPath(GREndPathNodeBuilder &B, void *tag, GRExprEngine &Eng);
+ void evalEndPath(EndPathNodeBuilder &B, void *tag, ExprEngine &Eng);
private:
void EmitStackError(CheckerContext &C, const MemRegion *R, const Expr *RetE);
SourceRange GenName(llvm::raw_ostream &os, const MemRegion *R,
@@ -41,7 +41,7 @@
};
}
-void GR::RegisterStackAddrLeakChecker(GRExprEngine &Eng) {
+void GR::RegisterStackAddrLeakChecker(ExprEngine &Eng) {
Eng.registerCheck(new StackAddrLeakChecker());
}
@@ -130,8 +130,8 @@
}
}
-void StackAddrLeakChecker::evalEndPath(GREndPathNodeBuilder &B, void *tag,
- GRExprEngine &Eng) {
+void StackAddrLeakChecker::evalEndPath(EndPathNodeBuilder &B, void *tag,
+ ExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
diff --git a/lib/GR/Checkers/StreamChecker.cpp b/lib/GR/Checkers/StreamChecker.cpp
index 01186b5..73c2920 100644
--- a/lib/GR/Checkers/StreamChecker.cpp
+++ b/lib/GR/Checkers/StreamChecker.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
#include "clang/GR/PathSensitive/GRState.h"
@@ -75,7 +75,7 @@
virtual bool evalCallExpr(CheckerContext &C, const CallExpr *CE);
void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper);
- void evalEndPath(GREndPathNodeBuilder &B, void *tag, GRExprEngine &Eng);
+ void evalEndPath(EndPathNodeBuilder &B, void *tag, ExprEngine &Eng);
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S);
private:
@@ -114,7 +114,7 @@
}
}
-void GR::RegisterStreamChecker(GRExprEngine &Eng) {
+void GR::RegisterStreamChecker(ExprEngine &Eng) {
Eng.registerCheck(new StreamChecker());
}
@@ -421,8 +421,8 @@
}
}
-void StreamChecker::evalEndPath(GREndPathNodeBuilder &B, void *tag,
- GRExprEngine &Eng) {
+void StreamChecker::evalEndPath(EndPathNodeBuilder &B, void *tag,
+ ExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
typedef llvm::ImmutableMap<SymbolRef, StreamState> SymMap;
diff --git a/lib/GR/Checkers/UndefBranchChecker.cpp b/lib/GR/Checkers/UndefBranchChecker.cpp
index fa3dfa5..e999d8b 100644
--- a/lib/GR/Checkers/UndefBranchChecker.cpp
+++ b/lib/GR/Checkers/UndefBranchChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/Checker.h"
@@ -50,13 +50,13 @@
public:
UndefBranchChecker() : BT(0) {}
static void *getTag();
- void VisitBranchCondition(GRBranchNodeBuilder &Builder, GRExprEngine &Eng,
+ void VisitBranchCondition(BranchNodeBuilder &Builder, ExprEngine &Eng,
const Stmt *Condition, void *tag);
};
}
-void GR::RegisterUndefBranchChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefBranchChecker(ExprEngine &Eng) {
Eng.registerCheck(new UndefBranchChecker());
}
@@ -65,8 +65,8 @@
return &x;
}
-void UndefBranchChecker::VisitBranchCondition(GRBranchNodeBuilder &Builder,
- GRExprEngine &Eng,
+void UndefBranchChecker::VisitBranchCondition(BranchNodeBuilder &Builder,
+ ExprEngine &Eng,
const Stmt *Condition, void *tag){
const GRState *state = Builder.getState();
SVal X = state->getSVal(Condition);
diff --git a/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp b/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp
index 8a1c285..2b45c95 100644
--- a/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp
+++ b/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/GR/BugReporter/BugType.h"
#include "llvm/Support/raw_ostream.h"
@@ -32,7 +32,7 @@
};
} // end anonymous namespace
-void GR::RegisterUndefCapturedBlockVarChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefCapturedBlockVarChecker(ExprEngine &Eng) {
Eng.registerCheck(new UndefCapturedBlockVarChecker());
}
diff --git a/lib/GR/Checkers/UndefResultChecker.cpp b/lib/GR/Checkers/UndefResultChecker.cpp
index f4d3035..348573d 100644
--- a/lib/GR/Checkers/UndefResultChecker.cpp
+++ b/lib/GR/Checkers/UndefResultChecker.cpp
@@ -7,15 +7,15 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines UndefResultChecker, a builtin check in GRExprEngine that
+// This defines UndefResultChecker, a builtin check in ExprEngine that
// performs checks for undefined results of non-assignment binary operators.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -33,7 +33,7 @@
};
} // end anonymous namespace
-void GR::RegisterUndefResultChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefResultChecker(ExprEngine &Eng) {
Eng.registerCheck(new UndefResultChecker());
}
diff --git a/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp b/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp
index 8946de3..0a3cee4 100644
--- a/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp
+++ b/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp
@@ -7,12 +7,12 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines UndefinedArraySubscriptChecker, a builtin check in GRExprEngine
+// This defines UndefinedArraySubscriptChecker, a builtin check in ExprEngine
// that performs checks for undefined array subscripts.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -34,7 +34,7 @@
};
} // end anonymous namespace
-void GR::RegisterUndefinedArraySubscriptChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefinedArraySubscriptChecker(ExprEngine &Eng) {
Eng.registerCheck(new UndefinedArraySubscriptChecker());
}
diff --git a/lib/GR/Checkers/UndefinedAssignmentChecker.cpp b/lib/GR/Checkers/UndefinedAssignmentChecker.cpp
index b1eb387..fa43350 100644
--- a/lib/GR/Checkers/UndefinedAssignmentChecker.cpp
+++ b/lib/GR/Checkers/UndefinedAssignmentChecker.cpp
@@ -7,12 +7,12 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines UndefinedAssginmentChecker, a builtin check in GRExprEngine that
+// This defines UndefinedAssginmentChecker, a builtin check in ExprEngine that
// checks for assigning undefined values.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -31,7 +31,7 @@
};
}
-void GR::RegisterUndefinedAssignmentChecker(GRExprEngine &Eng){
+void GR::RegisterUndefinedAssignmentChecker(ExprEngine &Eng){
Eng.registerCheck(new UndefinedAssignmentChecker());
}
diff --git a/lib/GR/Checkers/UnixAPIChecker.cpp b/lib/GR/Checkers/UnixAPIChecker.cpp
index f4c75f7..c365e30 100644
--- a/lib/GR/Checkers/UnixAPIChecker.cpp
+++ b/lib/GR/Checkers/UnixAPIChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
@@ -46,7 +46,7 @@
};
} //end anonymous namespace
-void GR::RegisterUnixAPIChecker(GRExprEngine &Eng) {
+void GR::RegisterUnixAPIChecker(ExprEngine &Eng) {
Eng.registerCheck(new UnixAPIChecker());
}
@@ -74,7 +74,7 @@
else {
// FIXME: We need a more general way of getting the O_CREAT value.
// We could possibly grovel through the preprocessor state, but
- // that would require passing the Preprocessor object to the GRExprEngine.
+ // that would require passing the Preprocessor object to the ExprEngine.
return;
}
}
diff --git a/lib/GR/Checkers/UnreachableCodeChecker.cpp b/lib/GR/Checkers/UnreachableCodeChecker.cpp
index 0ab97c2..97a2ff5 100644
--- a/lib/GR/Checkers/UnreachableCodeChecker.cpp
+++ b/lib/GR/Checkers/UnreachableCodeChecker.cpp
@@ -21,7 +21,7 @@
#include "clang/GR/PathSensitive/SVals.h"
#include "clang/GR/PathSensitive/CheckerHelpers.h"
#include "clang/GR/BugReporter/BugReporter.h"
-#include "GRExprEngineExperimentalChecks.h"
+#include "ExprEngineExperimentalChecks.h"
#include "llvm/ADT/SmallPtrSet.h"
// The number of CFGBlock pointers we want to reserve memory for. This is used
@@ -37,7 +37,7 @@
static void *getTag();
void VisitEndAnalysis(ExplodedGraph &G,
BugReporter &B,
- GRExprEngine &Eng);
+ ExprEngine &Eng);
private:
static inline const Stmt *getUnreachableStmt(const CFGBlock *CB);
void FindUnreachableEntryPoints(const CFGBlock *CB);
@@ -54,13 +54,13 @@
return &x;
}
-void GR::RegisterUnreachableCodeChecker(GRExprEngine &Eng) {
+void GR::RegisterUnreachableCodeChecker(ExprEngine &Eng) {
Eng.registerCheck(new UnreachableCodeChecker());
}
void UnreachableCodeChecker::VisitEndAnalysis(ExplodedGraph &G,
BugReporter &B,
- GRExprEngine &Eng) {
+ ExprEngine &Eng) {
// Bail out if we didn't cover all paths
if (Eng.hasWorkRemaining())
return;
diff --git a/lib/GR/Checkers/VLASizeChecker.cpp b/lib/GR/Checkers/VLASizeChecker.cpp
index d4e9d35..b2ca2db 100644
--- a/lib/GR/Checkers/VLASizeChecker.cpp
+++ b/lib/GR/Checkers/VLASizeChecker.cpp
@@ -7,18 +7,18 @@
//
//===----------------------------------------------------------------------===//
//
-// This defines VLASizeChecker, a builtin check in GRExprEngine that
+// This defines VLASizeChecker, a builtin check in ExprEngine that
// performs checks for declaration of VLA of undefined or zero size.
// In addition, VLASizeChecker is responsible for defining the extent
// of the MemRegion that represents a VLA.
//
//===----------------------------------------------------------------------===//
-#include "GRExprEngineInternalChecks.h"
+#include "ExprEngineInternalChecks.h"
#include "clang/AST/CharUnits.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/CheckerVisitor.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
using namespace clang;
using namespace GR;
@@ -35,7 +35,7 @@
};
} // end anonymous namespace
-void GR::RegisterVLASizeChecker(GRExprEngine &Eng) {
+void GR::RegisterVLASizeChecker(ExprEngine &Eng) {
Eng.registerCheck(new VLASizeChecker());
}
diff --git a/lib/GR/GRCoreEngine.cpp b/lib/GR/CoreEngine.cpp
similarity index 82%
rename from lib/GR/GRCoreEngine.cpp
rename to lib/GR/CoreEngine.cpp
index 092cb46..a086c91 100644
--- a/lib/GR/GRCoreEngine.cpp
+++ b/lib/GR/CoreEngine.cpp
@@ -1,4 +1,4 @@
-//==- GRCoreEngine.cpp - Path-Sensitive Dataflow Engine ------------*- C++ -*-//
+//==- CoreEngine.cpp - Path-Sensitive Dataflow Engine ------------*- C++ -*-//
//
// The LLVM Compiler Infrastructure
//
@@ -13,8 +13,8 @@
//===----------------------------------------------------------------------===//
#include "clang/GR/PathSensitive/AnalysisManager.h"
-#include "clang/GR/PathSensitive/GRCoreEngine.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/CoreEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/Index/TranslationUnit.h"
#include "clang/AST/Expr.h"
#include "llvm/Support/Casting.h"
@@ -30,7 +30,7 @@
// This should be removed in the future.
namespace clang {
namespace GR {
-GRTransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
+TransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
const LangOptions& lopts);
}
}
@@ -39,29 +39,29 @@
// Worklist classes for exploration of reachable states.
//===----------------------------------------------------------------------===//
-GRWorkList::Visitor::~Visitor() {}
+WorkList::Visitor::~Visitor() {}
namespace {
-class DFS : public GRWorkList {
- llvm::SmallVector<GRWorkListUnit,20> Stack;
+class DFS : public WorkList {
+ llvm::SmallVector<WorkListUnit,20> Stack;
public:
virtual bool hasWork() const {
return !Stack.empty();
}
- virtual void Enqueue(const GRWorkListUnit& U) {
+ virtual void Enqueue(const WorkListUnit& U) {
Stack.push_back(U);
}
- virtual GRWorkListUnit Dequeue() {
+ virtual WorkListUnit Dequeue() {
assert (!Stack.empty());
- const GRWorkListUnit& U = Stack.back();
+ const WorkListUnit& U = Stack.back();
Stack.pop_back(); // This technically "invalidates" U, but we are fine.
return U;
}
virtual bool VisitItemsInWorkList(Visitor &V) {
- for (llvm::SmallVectorImpl<GRWorkListUnit>::iterator
+ for (llvm::SmallVectorImpl<WorkListUnit>::iterator
I = Stack.begin(), E = Stack.end(); I != E; ++I) {
if (V.Visit(*I))
return true;
@@ -70,25 +70,25 @@
}
};
-class BFS : public GRWorkList {
- std::deque<GRWorkListUnit> Queue;
+class BFS : public WorkList {
+ std::deque<WorkListUnit> Queue;
public:
virtual bool hasWork() const {
return !Queue.empty();
}
- virtual void Enqueue(const GRWorkListUnit& U) {
+ virtual void Enqueue(const WorkListUnit& U) {
Queue.push_front(U);
}
- virtual GRWorkListUnit Dequeue() {
- GRWorkListUnit U = Queue.front();
+ virtual WorkListUnit Dequeue() {
+ WorkListUnit U = Queue.front();
Queue.pop_front();
return U;
}
virtual bool VisitItemsInWorkList(Visitor &V) {
- for (std::deque<GRWorkListUnit>::iterator
+ for (std::deque<WorkListUnit>::iterator
I = Queue.begin(), E = Queue.end(); I != E; ++I) {
if (V.Visit(*I))
return true;
@@ -99,33 +99,33 @@
} // end anonymous namespace
-// Place the dstor for GRWorkList here because it contains virtual member
+// Place the dstor for WorkList here because it contains virtual member
// functions, and we the code for the dstor generated in one compilation unit.
-GRWorkList::~GRWorkList() {}
+WorkList::~WorkList() {}
-GRWorkList *GRWorkList::MakeDFS() { return new DFS(); }
-GRWorkList *GRWorkList::MakeBFS() { return new BFS(); }
+WorkList *WorkList::MakeDFS() { return new DFS(); }
+WorkList *WorkList::MakeBFS() { return new BFS(); }
namespace {
- class BFSBlockDFSContents : public GRWorkList {
- std::deque<GRWorkListUnit> Queue;
- llvm::SmallVector<GRWorkListUnit,20> Stack;
+ class BFSBlockDFSContents : public WorkList {
+ std::deque<WorkListUnit> Queue;
+ llvm::SmallVector<WorkListUnit,20> Stack;
public:
virtual bool hasWork() const {
return !Queue.empty() || !Stack.empty();
}
- virtual void Enqueue(const GRWorkListUnit& U) {
+ virtual void Enqueue(const WorkListUnit& U) {
if (isa<BlockEntrance>(U.getNode()->getLocation()))
Queue.push_front(U);
else
Stack.push_back(U);
}
- virtual GRWorkListUnit Dequeue() {
+ virtual WorkListUnit Dequeue() {
// Process all basic blocks to completion.
if (!Stack.empty()) {
- const GRWorkListUnit& U = Stack.back();
+ const WorkListUnit& U = Stack.back();
Stack.pop_back(); // This technically "invalidates" U, but we are fine.
return U;
}
@@ -133,17 +133,17 @@
assert(!Queue.empty());
// Don't use const reference. The subsequent pop_back() might make it
// unsafe.
- GRWorkListUnit U = Queue.front();
+ WorkListUnit U = Queue.front();
Queue.pop_front();
return U;
}
virtual bool VisitItemsInWorkList(Visitor &V) {
- for (llvm::SmallVectorImpl<GRWorkListUnit>::iterator
+ for (llvm::SmallVectorImpl<WorkListUnit>::iterator
I = Stack.begin(), E = Stack.end(); I != E; ++I) {
if (V.Visit(*I))
return true;
}
- for (std::deque<GRWorkListUnit>::iterator
+ for (std::deque<WorkListUnit>::iterator
I = Queue.begin(), E = Queue.end(); I != E; ++I) {
if (V.Visit(*I))
return true;
@@ -154,7 +154,7 @@
};
} // end anonymous namespace
-GRWorkList* GRWorkList::MakeBFSBlockDFSContents() {
+WorkList* WorkList::MakeBFSBlockDFSContents() {
return new BFSBlockDFSContents();
}
@@ -163,7 +163,7 @@
//===----------------------------------------------------------------------===//
/// ExecuteWorkList - Run the worklist algorithm for a maximum number of steps.
-bool GRCoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps,
+bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps,
const GRState *InitState) {
if (G->num_roots() == 0) { // Initialize the analysis by constructing
@@ -204,7 +204,7 @@
--Steps;
}
- const GRWorkListUnit& WU = WList->Dequeue();
+ const WorkListUnit& WU = WList->Dequeue();
// Set the current block counter.
WList->setBlockCounter(WU.getBlockCounter());
@@ -243,11 +243,11 @@
}
}
- SubEngine.ProcessEndWorklist(hasWorkRemaining());
+ SubEng.ProcessEndWorklist(hasWorkRemaining());
return WList->hasWork();
}
-void GRCoreEngine::ExecuteWorkListWithInitialState(const LocationContext *L,
+void CoreEngine::ExecuteWorkListWithInitialState(const LocationContext *L,
unsigned Steps,
const GRState *InitState,
ExplodedNodeSet &Dst) {
@@ -258,19 +258,19 @@
}
}
-void GRCoreEngine::HandleCallEnter(const CallEnter &L, const CFGBlock *Block,
+void CoreEngine::HandleCallEnter(const CallEnter &L, const CFGBlock *Block,
unsigned Index, ExplodedNode *Pred) {
- GRCallEnterNodeBuilder Builder(*this, Pred, L.getCallExpr(),
+ CallEnterNodeBuilder Builder(*this, Pred, L.getCallExpr(),
L.getCalleeContext(), Block, Index);
ProcessCallEnter(Builder);
}
-void GRCoreEngine::HandleCallExit(const CallExit &L, ExplodedNode *Pred) {
- GRCallExitNodeBuilder Builder(*this, Pred);
+void CoreEngine::HandleCallExit(const CallExit &L, ExplodedNode *Pred) {
+ CallExitNodeBuilder Builder(*this, Pred);
ProcessCallExit(Builder);
}
-void GRCoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
+void CoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
const CFGBlock* Blk = L.getDst();
@@ -281,7 +281,7 @@
&& "EXIT block cannot contain Stmts.");
// Process the final state transition.
- GREndPathNodeBuilder Builder(Blk, Pred, this);
+ EndPathNodeBuilder Builder(Blk, Pred, this);
ProcessEndPath(Builder);
// This path is done. Don't enqueue any more nodes.
@@ -298,11 +298,11 @@
}
}
-void GRCoreEngine::HandleBlockEntrance(const BlockEntrance& L,
+void CoreEngine::HandleBlockEntrance(const BlockEntrance& L,
ExplodedNode* Pred) {
// Increment the block counter.
- GRBlockCounter Counter = WList->getBlockCounter();
+ BlockCounter Counter = WList->getBlockCounter();
Counter = BCounterFactory.IncrementCount(Counter,
Pred->getLocationContext()->getCurrentStackFrame(),
L.getBlock()->getBlockID());
@@ -310,15 +310,15 @@
// Process the entrance of the block.
if (CFGElement E = L.getFirstElement()) {
- GRStmtNodeBuilder Builder(L.getBlock(), 0, Pred, this,
- SubEngine.getStateManager());
+ StmtNodeBuilder Builder(L.getBlock(), 0, Pred, this,
+ SubEng.getStateManager());
ProcessElement(E, Builder);
}
else
HandleBlockExit(L.getBlock(), Pred);
}
-void GRCoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) {
+void CoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) {
if (const Stmt* Term = B->getTerminator()) {
switch (Term->getStmtClass()) {
@@ -362,7 +362,7 @@
// Only 1 successor: the indirect goto dispatch block.
assert (B->succ_size() == 1);
- GRIndirectGotoNodeBuilder
+ IndirectGotoNodeBuilder
builder(Pred, B, cast<IndirectGotoStmt>(Term)->getTarget(),
*(B->succ_begin()), this);
@@ -386,7 +386,7 @@
}
case Stmt::SwitchStmtClass: {
- GRSwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(),
+ SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(),
this);
ProcessSwitch(builder);
@@ -406,33 +406,33 @@
Pred->State, Pred);
}
-void GRCoreEngine::HandleBranch(const Stmt* Cond, const Stmt* Term,
+void CoreEngine::HandleBranch(const Stmt* Cond, const Stmt* Term,
const CFGBlock * B, ExplodedNode* Pred) {
assert (B->succ_size() == 2);
- GRBranchNodeBuilder Builder(B, *(B->succ_begin()), *(B->succ_begin()+1),
+ BranchNodeBuilder Builder(B, *(B->succ_begin()), *(B->succ_begin()+1),
Pred, this);
ProcessBranch(Cond, Term, Builder);
}
-void GRCoreEngine::HandlePostStmt(const CFGBlock* B, unsigned StmtIdx,
+void CoreEngine::HandlePostStmt(const CFGBlock* B, unsigned StmtIdx,
ExplodedNode* Pred) {
assert (!B->empty());
if (StmtIdx == B->size())
HandleBlockExit(B, Pred);
else {
- GRStmtNodeBuilder Builder(B, StmtIdx, Pred, this,
- SubEngine.getStateManager());
+ StmtNodeBuilder Builder(B, StmtIdx, Pred, this,
+ SubEng.getStateManager());
ProcessElement((*B)[StmtIdx], Builder);
}
}
/// generateNode - Utility method to generate nodes, hook up successors,
/// and add nodes to the worklist.
-void GRCoreEngine::generateNode(const ProgramPoint& Loc,
- const GRState* State, ExplodedNode* Pred) {
+void CoreEngine::generateNode(const ProgramPoint& Loc,
+ const GRState* State, ExplodedNode* Pred) {
bool IsNew;
ExplodedNode* Node = G->getNode(Loc, State, &IsNew);
@@ -448,8 +448,8 @@
if (IsNew) WList->Enqueue(Node);
}
-GRStmtNodeBuilder::GRStmtNodeBuilder(const CFGBlock* b, unsigned idx,
- ExplodedNode* N, GRCoreEngine* e,
+StmtNodeBuilder::StmtNodeBuilder(const CFGBlock* b, unsigned idx,
+ ExplodedNode* N, CoreEngine* e,
GRStateManager &mgr)
: Eng(*e), B(*b), Idx(idx), Pred(N), Mgr(mgr),
PurgingDeadSymbols(false), BuildSinks(false), HasGeneratedNode(false),
@@ -458,13 +458,13 @@
CleanedState = Pred->getState();
}
-GRStmtNodeBuilder::~GRStmtNodeBuilder() {
+StmtNodeBuilder::~StmtNodeBuilder() {
for (DeferredTy::iterator I=Deferred.begin(), E=Deferred.end(); I!=E; ++I)
if (!(*I)->isSink())
GenerateAutoTransition(*I);
}
-void GRStmtNodeBuilder::GenerateAutoTransition(ExplodedNode* N) {
+void StmtNodeBuilder::GenerateAutoTransition(ExplodedNode* N) {
assert (!N->isSink());
// Check if this node entered a callee.
@@ -498,7 +498,7 @@
Eng.WList->Enqueue(Succ, &B, Idx+1);
}
-ExplodedNode* GRStmtNodeBuilder::MakeNode(ExplodedNodeSet& Dst, const Stmt* S,
+ExplodedNode* StmtNodeBuilder::MakeNode(ExplodedNodeSet& Dst, const Stmt* S,
ExplodedNode* Pred, const GRState* St,
ProgramPoint::Kind K) {
@@ -539,7 +539,7 @@
}
ExplodedNode*
-GRStmtNodeBuilder::generateNodeInternal(const Stmt* S, const GRState* state,
+StmtNodeBuilder::generateNodeInternal(const Stmt* S, const GRState* state,
ExplodedNode* Pred,
ProgramPoint::Kind K,
const void *tag) {
@@ -549,7 +549,7 @@
}
ExplodedNode*
-GRStmtNodeBuilder::generateNodeInternal(const ProgramPoint &Loc,
+StmtNodeBuilder::generateNodeInternal(const ProgramPoint &Loc,
const GRState* State,
ExplodedNode* Pred) {
bool IsNew;
@@ -565,7 +565,7 @@
return NULL;
}
-ExplodedNode* GRBranchNodeBuilder::generateNode(const GRState* State,
+ExplodedNode* BranchNodeBuilder::generateNode(const GRState* State,
bool branch) {
// If the branch has been marked infeasible we should not generate a node.
@@ -593,7 +593,7 @@
return NULL;
}
-GRBranchNodeBuilder::~GRBranchNodeBuilder() {
+BranchNodeBuilder::~BranchNodeBuilder() {
if (!GeneratedTrue) generateNode(Pred->State, true);
if (!GeneratedFalse) generateNode(Pred->State, false);
@@ -603,7 +603,7 @@
ExplodedNode*
-GRIndirectGotoNodeBuilder::generateNode(const iterator& I, const GRState* St,
+IndirectGotoNodeBuilder::generateNode(const iterator& I, const GRState* St,
bool isSink) {
bool IsNew;
@@ -627,7 +627,7 @@
ExplodedNode*
-GRSwitchNodeBuilder::generateCaseStmtNode(const iterator& I, const GRState* St){
+SwitchNodeBuilder::generateCaseStmtNode(const iterator& I, const GRState* St){
bool IsNew;
@@ -645,7 +645,7 @@
ExplodedNode*
-GRSwitchNodeBuilder::generateDefaultCaseNode(const GRState* St, bool isSink) {
+SwitchNodeBuilder::generateDefaultCaseNode(const GRState* St, bool isSink) {
// Get the block for the default case.
assert (Src->succ_rbegin() != Src->succ_rend());
@@ -669,7 +669,7 @@
return NULL;
}
-GREndPathNodeBuilder::~GREndPathNodeBuilder() {
+EndPathNodeBuilder::~EndPathNodeBuilder() {
// Auto-generate an EOP node if one has not been generated.
if (!HasGeneratedNode) {
// If we are in an inlined call, generate CallExit node.
@@ -681,7 +681,7 @@
}
ExplodedNode*
-GREndPathNodeBuilder::generateNode(const GRState* State, const void *tag,
+EndPathNodeBuilder::generateNode(const GRState* State, const void *tag,
ExplodedNode* P) {
HasGeneratedNode = true;
bool IsNew;
@@ -699,7 +699,7 @@
return NULL;
}
-void GREndPathNodeBuilder::GenerateCallExitNode(const GRState *state) {
+void EndPathNodeBuilder::GenerateCallExitNode(const GRState *state) {
HasGeneratedNode = true;
// Create a CallExit node and enqueue it.
const StackFrameContext *LocCtx
@@ -718,14 +718,14 @@
}
-void GRCallEnterNodeBuilder::generateNode(const GRState *state) {
+void CallEnterNodeBuilder::generateNode(const GRState *state) {
// Check if the callee is in the same translation unit.
if (CalleeCtx->getTranslationUnit() !=
Pred->getLocationContext()->getTranslationUnit()) {
// Create a new engine. We must be careful that the new engine should not
// reference data structures owned by the old engine.
- AnalysisManager &OldMgr = Eng.SubEngine.getAnalysisManager();
+ AnalysisManager &OldMgr = Eng.SubEng.getAnalysisManager();
// Get the callee's translation unit.
idx::TranslationUnit *TU = CalleeCtx->getTranslationUnit();
@@ -749,11 +749,11 @@
OldMgr.getAnalysisContextManager().getUseUnoptimizedCFG(),
OldMgr.getAnalysisContextManager().getAddImplicitDtors(),
OldMgr.getAnalysisContextManager().getAddInitializers());
- llvm::OwningPtr<GRTransferFuncs> TF(MakeCFRefCountTF(AMgr.getASTContext(),
+ llvm::OwningPtr<TransferFuncs> TF(MakeCFRefCountTF(AMgr.getASTContext(),
/* GCEnabled */ false,
AMgr.getLangOptions()));
// Create the new engine.
- GRExprEngine NewEng(AMgr, TF.take());
+ ExprEngine NewEng(AMgr, TF.take());
// Create the new LocationContext.
AnalysisContext *NewAnaCtx = AMgr.getAnalysisContext(CalleeCtx->getDecl(),
@@ -793,7 +793,7 @@
Eng.WList->Enqueue(Node);
}
-void GRCallExitNodeBuilder::generateNode(const GRState *state) {
+void CallExitNodeBuilder::generateNode(const GRState *state) {
// Get the callee's location context.
const StackFrameContext *LocCtx
= cast<StackFrameContext>(Pred->getLocationContext());
diff --git a/lib/GR/GRExprEngine.cpp b/lib/GR/ExprEngine.cpp
similarity index 94%
rename from lib/GR/GRExprEngine.cpp
rename to lib/GR/ExprEngine.cpp
index d6086c7..7cf9054 100644
--- a/lib/GR/GRExprEngine.cpp
+++ b/lib/GR/ExprEngine.cpp
@@ -1,4 +1,4 @@
-//=-- GRExprEngine.cpp - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=
+//=-- ExprEngine.cpp - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=
//
// The LLVM Compiler Infrastructure
//
@@ -14,12 +14,12 @@
//===----------------------------------------------------------------------===//
// FIXME: Restructure checker registration.
-#include "Checkers/GRExprEngineInternalChecks.h"
+#include "Checkers/ExprEngineInternalChecks.h"
#include "clang/GR/BugReporter/BugType.h"
#include "clang/GR/PathSensitive/AnalysisManager.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
-#include "clang/GR/PathSensitive/GRExprEngineBuilders.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngineBuilders.h"
#include "clang/GR/PathSensitive/Checker.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/ParentMap.h"
@@ -65,7 +65,7 @@
// Checker worklist routines.
//===----------------------------------------------------------------------===//
-void GRExprEngine::CheckerVisit(const Stmt *S, ExplodedNodeSet &Dst,
+void ExprEngine::CheckerVisit(const Stmt *S, ExplodedNodeSet &Dst,
ExplodedNodeSet &Src, CallbackKind Kind) {
// Determine if we already have a cached 'CheckersOrdered' vector
@@ -145,7 +145,7 @@
// automatically.
}
-void GRExprEngine::CheckerEvalNilReceiver(const ObjCMessageExpr *ME,
+void ExprEngine::CheckerEvalNilReceiver(const ObjCMessageExpr *ME,
ExplodedNodeSet &Dst,
const GRState *state,
ExplodedNode *Pred) {
@@ -174,7 +174,7 @@
// CheckerEvalCall returns true if one of the checkers processed the node.
// This may return void when all call evaluation logic goes to some checker
// in the future.
-bool GRExprEngine::CheckerEvalCall(const CallExpr *CE,
+bool ExprEngine::CheckerEvalCall(const CallExpr *CE,
ExplodedNodeSet &Dst,
ExplodedNode *Pred) {
bool evaluated = false;
@@ -202,7 +202,7 @@
// FIXME: This is largely copy-paste from CheckerVisit(). Need to
// unify.
-void GRExprEngine::CheckerVisitBind(const Stmt *StoreE, ExplodedNodeSet &Dst,
+void ExprEngine::CheckerVisitBind(const Stmt *StoreE, ExplodedNodeSet &Dst,
ExplodedNodeSet &Src, SVal location,
SVal val, bool isPrevisit) {
@@ -243,16 +243,16 @@
// Engine construction and deletion.
//===----------------------------------------------------------------------===//
-static void RegisterInternalChecks(GRExprEngine &Eng) {
+static void RegisterInternalChecks(ExprEngine &Eng) {
// Register internal "built-in" BugTypes with the BugReporter. These BugTypes
// are different than what probably many checks will do since they don't
- // create BugReports on-the-fly but instead wait until GRExprEngine finishes
+ // create BugReports on-the-fly but instead wait until ExprEngine finishes
// analyzing a function. Generation of BugReport objects is done via a call
// to 'FlushReports' from BugReporter.
// The following checks do not need to have their associated BugTypes
// explicitly registered with the BugReporter. If they issue any BugReports,
// their associated BugType will get registered with the BugReporter
- // automatically. Note that the check itself is owned by the GRExprEngine
+ // automatically. Note that the check itself is owned by the ExprEngine
// object.
RegisterAdjustedReturnValueChecker(Eng);
// CallAndMessageChecker should be registered before AttrNonNullChecker,
@@ -279,10 +279,10 @@
RegisterMacOSXAPIChecker(Eng);
}
-GRExprEngine::GRExprEngine(AnalysisManager &mgr, GRTransferFuncs *tf)
+ExprEngine::ExprEngine(AnalysisManager &mgr, TransferFuncs *tf)
: AMgr(mgr),
- CoreEngine(*this),
- G(CoreEngine.getGraph()),
+ Engine(*this),
+ G(Engine.getGraph()),
Builder(NULL),
StateMgr(getContext(), mgr.getStoreManagerCreator(),
mgr.getConstraintManagerCreator(), G.getAllocator(),
@@ -301,7 +301,7 @@
TF->RegisterPrinters(getStateManager().Printers);
}
-GRExprEngine::~GRExprEngine() {
+ExprEngine::~ExprEngine() {
BR.FlushReports();
delete [] NSExceptionInstanceRaiseSelectors;
@@ -318,7 +318,7 @@
// Utility methods.
//===----------------------------------------------------------------------===//
-const GRState* GRExprEngine::getInitialState(const LocationContext *InitLoc) {
+const GRState* ExprEngine::getInitialState(const LocationContext *InitLoc) {
const GRState *state = StateMgr.getInitialState(InitLoc);
// Preconditions.
@@ -384,7 +384,7 @@
/// evalAssume - Called by ConstraintManager. Used to call checker-specific
/// logic for handling assumptions on symbolic values.
-const GRState *GRExprEngine::ProcessAssume(const GRState *state, SVal cond,
+const GRState *ExprEngine::ProcessAssume(const GRState *state, SVal cond,
bool assumption) {
// Determine if we already have a cached 'CheckersOrdered' vector
// specifically tailored for processing assumptions. This
@@ -439,7 +439,7 @@
return TF->evalAssume(state, cond, assumption);
}
-bool GRExprEngine::WantsRegionChangeUpdate(const GRState* state) {
+bool ExprEngine::WantsRegionChangeUpdate(const GRState* state) {
CallbackTag K = GetCallbackTag(EvalRegionChangesCallback);
CheckersOrdered *CO = COCache[K];
@@ -456,7 +456,7 @@
}
const GRState *
-GRExprEngine::ProcessRegionChanges(const GRState *state,
+ExprEngine::ProcessRegionChanges(const GRState *state,
const MemRegion * const *Begin,
const MemRegion * const *End) {
// FIXME: Most of this method is copy-pasted from ProcessAssume.
@@ -508,15 +508,15 @@
return state;
}
-void GRExprEngine::ProcessEndWorklist(bool hasWorkRemaining) {
+void ExprEngine::ProcessEndWorklist(bool hasWorkRemaining) {
for (CheckersOrdered::iterator I = Checkers.begin(), E = Checkers.end();
I != E; ++I) {
I->second->VisitEndAnalysis(G, BR, *this);
}
}
-void GRExprEngine::ProcessElement(const CFGElement E,
- GRStmtNodeBuilder& builder) {
+void ExprEngine::ProcessElement(const CFGElement E,
+ StmtNodeBuilder& builder) {
switch (E.getKind()) {
case CFGElement::Statement:
ProcessStmt(E.getAs<CFGStmt>(), builder);
@@ -533,7 +533,7 @@
}
}
-void GRExprEngine::ProcessStmt(const CFGStmt S, GRStmtNodeBuilder& builder) {
+void ExprEngine::ProcessStmt(const CFGStmt S, StmtNodeBuilder& builder) {
currentStmt = S.getStmt();
PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
currentStmt->getLocStart(),
@@ -619,7 +619,7 @@
Visit(currentStmt, *I, Dst);
// Do we need to auto-generate a node? We only need to do this to generate
- // a node with a "cleaned" state; GRCoreEngine will actually handle
+ // a node with a "cleaned" state; CoreEngine will actually handle
// auto-transitions for other cases.
if (Dst.size() == 1 && *Dst.begin() == EntryNode
&& !Builder->HasGeneratedNode && !HasAutoGenerated) {
@@ -637,8 +637,8 @@
Builder = NULL;
}
-void GRExprEngine::ProcessInitializer(const CFGInitializer Init,
- GRStmtNodeBuilder &builder) {
+void ExprEngine::ProcessInitializer(const CFGInitializer Init,
+ StmtNodeBuilder &builder) {
// We don't set EntryNode and currentStmt. And we don't clean up state.
const CXXBaseOrMemberInitializer *BMI = Init.getInitializer();
@@ -674,8 +674,8 @@
}
}
-void GRExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D,
- GRStmtNodeBuilder &builder) {
+void ExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D,
+ StmtNodeBuilder &builder) {
Builder = &builder;
switch (D.getDtorKind()) {
@@ -696,8 +696,8 @@
}
}
-void GRExprEngine::ProcessAutomaticObjDtor(const CFGAutomaticObjDtor dtor,
- GRStmtNodeBuilder &builder) {
+void ExprEngine::ProcessAutomaticObjDtor(const CFGAutomaticObjDtor dtor,
+ StmtNodeBuilder &builder) {
ExplodedNode *pred = builder.getBasePredecessor();
const GRState *state = pred->getState();
const VarDecl *varDecl = dtor.getVarDecl();
@@ -718,19 +718,19 @@
dtor.getTriggerStmt(), pred, dstSet);
}
-void GRExprEngine::ProcessBaseDtor(const CFGBaseDtor D,
- GRStmtNodeBuilder &builder) {
+void ExprEngine::ProcessBaseDtor(const CFGBaseDtor D,
+ StmtNodeBuilder &builder) {
}
-void GRExprEngine::ProcessMemberDtor(const CFGMemberDtor D,
- GRStmtNodeBuilder &builder) {
+void ExprEngine::ProcessMemberDtor(const CFGMemberDtor D,
+ StmtNodeBuilder &builder) {
}
-void GRExprEngine::ProcessTemporaryDtor(const CFGTemporaryDtor D,
- GRStmtNodeBuilder &builder) {
+void ExprEngine::ProcessTemporaryDtor(const CFGTemporaryDtor D,
+ StmtNodeBuilder &builder) {
}
-void GRExprEngine::Visit(const Stmt* S, ExplodedNode* Pred,
+void ExprEngine::Visit(const Stmt* S, ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
S->getLocStart(),
@@ -1075,9 +1075,9 @@
// Block entrance. (Update counters).
//===----------------------------------------------------------------------===//
-bool GRExprEngine::ProcessBlockEntrance(const CFGBlock* B,
+bool ExprEngine::ProcessBlockEntrance(const CFGBlock* B,
const ExplodedNode *Pred,
- GRBlockCounter BC) {
+ BlockCounter BC) {
return BC.getNumVisited(Pred->getLocationContext()->getCurrentStackFrame(),
B->getBlockID()) < AMgr.getMaxVisit();
}
@@ -1086,10 +1086,10 @@
// Generic node creation.
//===----------------------------------------------------------------------===//
-ExplodedNode* GRExprEngine::MakeNode(ExplodedNodeSet& Dst, const Stmt* S,
+ExplodedNode* ExprEngine::MakeNode(ExplodedNodeSet& Dst, const Stmt* S,
ExplodedNode* Pred, const GRState* St,
ProgramPoint::Kind K, const void *tag) {
- assert (Builder && "GRStmtNodeBuilder not present.");
+ assert (Builder && "StmtNodeBuilder not present.");
SaveAndRestore<const void*> OldTag(Builder->Tag);
Builder->Tag = tag;
return Builder->MakeNode(Dst, S, Pred, St, K);
@@ -1099,7 +1099,7 @@
// Branch processing.
//===----------------------------------------------------------------------===//
-const GRState* GRExprEngine::MarkBranch(const GRState* state,
+const GRState* ExprEngine::MarkBranch(const GRState* state,
const Stmt* Terminator,
bool branchTaken) {
@@ -1193,8 +1193,8 @@
return state->getSVal(Ex);
}
-void GRExprEngine::ProcessBranch(const Stmt* Condition, const Stmt* Term,
- GRBranchNodeBuilder& builder) {
+void ExprEngine::ProcessBranch(const Stmt* Condition, const Stmt* Term,
+ BranchNodeBuilder& builder) {
// Check for NULL conditions; e.g. "for(;;)"
if (!Condition) {
@@ -1263,9 +1263,9 @@
}
}
-/// ProcessIndirectGoto - Called by GRCoreEngine. Used to generate successor
+/// ProcessIndirectGoto - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a computed goto jump.
-void GRExprEngine::ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder) {
+void ExprEngine::ProcessIndirectGoto(IndirectGotoNodeBuilder& builder) {
const GRState *state = builder.getState();
SVal V = state->getSVal(builder.getTarget());
@@ -1277,7 +1277,7 @@
// (3) We have no clue about the label. Dispatch to all targets.
//
- typedef GRIndirectGotoNodeBuilder::iterator iterator;
+ typedef IndirectGotoNodeBuilder::iterator iterator;
if (isa<loc::GotoLabel>(V)) {
const LabelStmt* L = cast<loc::GotoLabel>(V).getLabel();
@@ -1309,7 +1309,7 @@
}
-void GRExprEngine::VisitGuardedExpr(const Expr* Ex, const Expr* L,
+void ExprEngine::VisitGuardedExpr(const Expr* Ex, const Expr* L,
const Expr* R,
ExplodedNode* Pred, ExplodedNodeSet& Dst) {
@@ -1329,9 +1329,9 @@
MakeNode(Dst, Ex, Pred, state->BindExpr(Ex, X, true));
}
-/// ProcessEndPath - Called by GRCoreEngine. Used to generate end-of-path
+/// ProcessEndPath - Called by CoreEngine. Used to generate end-of-path
/// nodes when the control reaches the end of a function.
-void GRExprEngine::ProcessEndPath(GREndPathNodeBuilder& builder) {
+void ExprEngine::ProcessEndPath(EndPathNodeBuilder& builder) {
getTF().evalEndPath(*this, builder);
StateMgr.EndPath(builder.getState());
for (CheckersOrdered::iterator I=Checkers.begin(),E=Checkers.end(); I!=E;++I){
@@ -1341,10 +1341,10 @@
}
}
-/// ProcessSwitch - Called by GRCoreEngine. Used to generate successor
+/// ProcessSwitch - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a switch statement.
-void GRExprEngine::ProcessSwitch(GRSwitchNodeBuilder& builder) {
- typedef GRSwitchNodeBuilder::iterator iterator;
+void ExprEngine::ProcessSwitch(SwitchNodeBuilder& builder) {
+ typedef SwitchNodeBuilder::iterator iterator;
const GRState* state = builder.getState();
const Expr* CondE = builder.getCondition();
SVal CondV_untested = state->getSVal(CondE);
@@ -1452,12 +1452,12 @@
builder.generateDefaultCaseNode(DefaultSt);
}
-void GRExprEngine::ProcessCallEnter(GRCallEnterNodeBuilder &B) {
+void ExprEngine::ProcessCallEnter(CallEnterNodeBuilder &B) {
const GRState *state = B.getState()->EnterStackFrame(B.getCalleeContext());
B.generateNode(state);
}
-void GRExprEngine::ProcessCallExit(GRCallExitNodeBuilder &B) {
+void ExprEngine::ProcessCallExit(CallExitNodeBuilder &B) {
const GRState *state = B.getState();
const ExplodedNode *Pred = B.getPredecessor();
const StackFrameContext *calleeCtx =
@@ -1490,7 +1490,7 @@
// Transfer functions: logical operations ('&&', '||').
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitLogicalExpr(const BinaryOperator* B, ExplodedNode* Pred,
+void ExprEngine::VisitLogicalExpr(const BinaryOperator* B, ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
assert(B->getOpcode() == BO_LAnd ||
@@ -1544,7 +1544,7 @@
// Transfer functions: Loads and stores.
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitBlockExpr(const BlockExpr *BE, ExplodedNode *Pred,
+void ExprEngine::VisitBlockExpr(const BlockExpr *BE, ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
ExplodedNodeSet Tmp;
@@ -1560,9 +1560,9 @@
CheckerVisit(BE, Dst, Tmp, PostVisitStmtCallback);
}
-void GRExprEngine::VisitCommonDeclRefExpr(const Expr *Ex, const NamedDecl *D,
- ExplodedNode *Pred,
- ExplodedNodeSet &Dst) {
+void ExprEngine::VisitCommonDeclRefExpr(const Expr *Ex, const NamedDecl *D,
+ ExplodedNode *Pred,
+ ExplodedNodeSet &Dst) {
const GRState *state = GetState(Pred);
if (const VarDecl* VD = dyn_cast<VarDecl>(D)) {
@@ -1599,9 +1599,9 @@
}
/// VisitArraySubscriptExpr - Transfer function for array accesses
-void GRExprEngine::VisitLvalArraySubscriptExpr(const ArraySubscriptExpr* A,
- ExplodedNode* Pred,
- ExplodedNodeSet& Dst){
+void ExprEngine::VisitLvalArraySubscriptExpr(const ArraySubscriptExpr* A,
+ ExplodedNode* Pred,
+ ExplodedNodeSet& Dst){
const Expr* Base = A->getBase()->IgnoreParens();
const Expr* Idx = A->getIdx()->IgnoreParens();
@@ -1627,8 +1627,8 @@
}
/// VisitMemberExpr - Transfer function for member expressions.
-void GRExprEngine::VisitMemberExpr(const MemberExpr* M, ExplodedNode* Pred,
- ExplodedNodeSet& Dst) {
+void ExprEngine::VisitMemberExpr(const MemberExpr* M, ExplodedNode* Pred,
+ ExplodedNodeSet& Dst) {
Expr *baseExpr = M->getBase()->IgnoreParens();
ExplodedNodeSet dstBase;
@@ -1663,7 +1663,7 @@
/// evalBind - Handle the semantics of binding a value to a specific location.
/// This method is used by evalStore and (soon) VisitDeclStmt, and others.
-void GRExprEngine::evalBind(ExplodedNodeSet& Dst, const Stmt* StoreE,
+void ExprEngine::evalBind(ExplodedNodeSet& Dst, const Stmt* StoreE,
ExplodedNode* Pred, const GRState* state,
SVal location, SVal Val, bool atDeclInit) {
@@ -1701,14 +1701,14 @@
}
}
- // The next thing to do is check if the GRTransferFuncs object wants to
+ // The next thing to do is check if the TransferFuncs object wants to
// update the state based on the new binding. If the GRTransferFunc object
// doesn't do anything, just auto-propagate the current state.
// NOTE: We use 'AssignE' for the location of the PostStore if 'AssignE'
// is non-NULL. Checkers typically care about
- GRStmtNodeBuilderRef BuilderRef(Dst, *Builder, *this, *I, newState, StoreE,
+ StmtNodeBuilderRef BuilderRef(Dst, *Builder, *this, *I, newState, StoreE,
true);
getTF().evalBind(BuilderRef, location, Val);
@@ -1723,13 +1723,13 @@
/// @param state The current simulation state
/// @param location The location to store the value
/// @param Val The value to be stored
-void GRExprEngine::evalStore(ExplodedNodeSet& Dst, const Expr *AssignE,
+void ExprEngine::evalStore(ExplodedNodeSet& Dst, const Expr *AssignE,
const Expr* LocationE,
ExplodedNode* Pred,
const GRState* state, SVal location, SVal Val,
const void *tag) {
- assert(Builder && "GRStmtNodeBuilder must be defined.");
+ assert(Builder && "StmtNodeBuilder must be defined.");
// Evaluate the location (checks for bad dereferences).
ExplodedNodeSet Tmp;
@@ -1752,7 +1752,7 @@
evalBind(Dst, StoreE, *NI, GetState(*NI), location, Val);
}
-void GRExprEngine::evalLoad(ExplodedNodeSet& Dst, const Expr *Ex,
+void ExprEngine::evalLoad(ExplodedNodeSet& Dst, const Expr *Ex,
ExplodedNode* Pred,
const GRState* state, SVal location,
const void *tag, QualType LoadTy) {
@@ -1784,7 +1784,7 @@
evalLoadCommon(Dst, Ex, Pred, state, location, tag, LoadTy);
}
-void GRExprEngine::evalLoadCommon(ExplodedNodeSet& Dst, const Expr *Ex,
+void ExprEngine::evalLoadCommon(ExplodedNodeSet& Dst, const Expr *Ex,
ExplodedNode* Pred,
const GRState* state, SVal location,
const void *tag, QualType LoadTy) {
@@ -1820,7 +1820,7 @@
}
}
-void GRExprEngine::evalLocation(ExplodedNodeSet &Dst, const Stmt *S,
+void ExprEngine::evalLocation(ExplodedNodeSet &Dst, const Stmt *S,
ExplodedNode* Pred,
const GRState* state, SVal location,
const void *tag, bool isLoad) {
@@ -1861,7 +1861,7 @@
}
}
-bool GRExprEngine::InlineCall(ExplodedNodeSet &Dst, const CallExpr *CE,
+bool ExprEngine::InlineCall(ExplodedNodeSet &Dst, const CallExpr *CE,
ExplodedNode *Pred) {
const GRState *state = GetState(Pred);
const Expr *Callee = CE->getCallee();
@@ -1902,7 +1902,7 @@
return false;
}
-void GRExprEngine::VisitCall(const CallExpr* CE, ExplodedNode* Pred,
+void ExprEngine::VisitCall(const CallExpr* CE, ExplodedNode* Pred,
CallExpr::const_arg_iterator AI,
CallExpr::const_arg_iterator AE,
ExplodedNodeSet& Dst) {
@@ -1964,7 +1964,7 @@
// Dispatch to transfer function logic to handle the call itself.
// FIXME: Allow us to chain together transfer functions.
- assert(Builder && "GRStmtNodeBuilder must be defined.");
+ assert(Builder && "StmtNodeBuilder must be defined.");
getTF().evalCall(DstTmp3, *this, *Builder, CE, L, Pred);
// Handle the case where no nodes where generated. Auto-generate that
@@ -1988,7 +1988,7 @@
static std::pair<const void*,const void*> EagerlyAssumeTag
= std::pair<const void*,const void*>(&EagerlyAssumeTag,static_cast<void*>(0));
-void GRExprEngine::evalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
+void ExprEngine::evalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
const Expr *Ex) {
for (ExplodedNodeSet::iterator I=Src.begin(), E=Src.end(); I!=E; ++I) {
ExplodedNode *Pred = *I;
@@ -2032,7 +2032,7 @@
// Transfer function: Objective-C @synchronized.
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S,
+void ExprEngine::VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S,
ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
@@ -2049,9 +2049,9 @@
// Transfer function: Objective-C ivar references.
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr* Ex,
- ExplodedNode* Pred,
- ExplodedNodeSet& Dst) {
+void ExprEngine::VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr* Ex,
+ ExplodedNode* Pred,
+ ExplodedNodeSet& Dst) {
// Visit the base expression, which is needed for computing the lvalue
// of the ivar.
@@ -2074,7 +2074,7 @@
// Transfer function: Objective-C fast enumeration 'for' statements.
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitObjCForCollectionStmt(const ObjCForCollectionStmt* S,
+void ExprEngine::VisitObjCForCollectionStmt(const ObjCForCollectionStmt* S,
ExplodedNode* Pred, ExplodedNodeSet& Dst) {
// ObjCForCollectionStmts are processed in two places. This method
@@ -2121,7 +2121,7 @@
}
}
-void GRExprEngine::VisitObjCForCollectionStmtAux(const ObjCForCollectionStmt* S,
+void ExprEngine::VisitObjCForCollectionStmtAux(const ObjCForCollectionStmt* S,
ExplodedNode* Pred, ExplodedNodeSet& Dst,
SVal ElementV) {
@@ -2183,7 +2183,7 @@
};
} // end anonymous namespace
-void GRExprEngine::VisitObjCMessageExpr(const ObjCMessageExpr* ME,
+void ExprEngine::VisitObjCMessageExpr(const ObjCMessageExpr* ME,
ExplodedNode* Pred,
ExplodedNodeSet& Dst){
@@ -2339,8 +2339,8 @@
// Transfer functions: Miscellaneous statements.
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
- ExplodedNode *Pred, ExplodedNodeSet &Dst) {
+void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
+ ExplodedNode *Pred, ExplodedNodeSet &Dst) {
ExplodedNodeSet S1;
Visit(Ex, Pred, S1);
@@ -2465,7 +2465,7 @@
}
}
-void GRExprEngine::VisitCompoundLiteralExpr(const CompoundLiteralExpr* CL,
+void ExprEngine::VisitCompoundLiteralExpr(const CompoundLiteralExpr* CL,
ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
const InitListExpr* ILE
@@ -2487,7 +2487,7 @@
}
}
-void GRExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
+void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
ExplodedNodeSet& Dst) {
// The CFG has one DeclStmt per Decl.
@@ -2556,7 +2556,7 @@
}
}
-void GRExprEngine::VisitCondInit(const VarDecl *VD, const Stmt *S,
+void ExprEngine::VisitCondInit(const VarDecl *VD, const Stmt *S,
ExplodedNode *Pred, ExplodedNodeSet& Dst) {
const Expr* InitEx = VD->getInit();
@@ -2599,7 +2599,7 @@
}
-void GRExprEngine::VisitInitListExpr(const InitListExpr* E, ExplodedNode* Pred,
+void ExprEngine::VisitInitListExpr(const InitListExpr* E, ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
const GRState* state = GetState(Pred);
@@ -2677,7 +2677,7 @@
}
/// VisitSizeOfAlignOfExpr - Transfer function for sizeof(type).
-void GRExprEngine::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr* Ex,
+void ExprEngine::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr* Ex,
ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
QualType T = Ex->getTypeOfArgument();
@@ -2742,7 +2742,7 @@
svalBuilder.makeIntVal(amt.getQuantity(), Ex->getType())));
}
-void GRExprEngine::VisitOffsetOfExpr(const OffsetOfExpr* OOE,
+void ExprEngine::VisitOffsetOfExpr(const OffsetOfExpr* OOE,
ExplodedNode* Pred, ExplodedNodeSet& Dst) {
Expr::EvalResult Res;
if (OOE->Evaluate(Res, getContext()) && Res.Val.isInt()) {
@@ -2758,7 +2758,7 @@
Dst.Add(Pred);
}
-void GRExprEngine::VisitUnaryOperator(const UnaryOperator* U,
+void ExprEngine::VisitUnaryOperator(const UnaryOperator* U,
ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
@@ -2996,12 +2996,12 @@
}
}
-void GRExprEngine::VisitAsmStmt(const AsmStmt* A, ExplodedNode* Pred,
+void ExprEngine::VisitAsmStmt(const AsmStmt* A, ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
VisitAsmStmtHelperOutputs(A, A->begin_outputs(), A->end_outputs(), Pred, Dst);
}
-void GRExprEngine::VisitAsmStmtHelperOutputs(const AsmStmt* A,
+void ExprEngine::VisitAsmStmtHelperOutputs(const AsmStmt* A,
AsmStmt::const_outputs_iterator I,
AsmStmt::const_outputs_iterator E,
ExplodedNode* Pred, ExplodedNodeSet& Dst) {
@@ -3018,7 +3018,7 @@
VisitAsmStmtHelperOutputs(A, I, E, *NI, Dst);
}
-void GRExprEngine::VisitAsmStmtHelperInputs(const AsmStmt* A,
+void ExprEngine::VisitAsmStmtHelperInputs(const AsmStmt* A,
AsmStmt::const_inputs_iterator I,
AsmStmt::const_inputs_iterator E,
ExplodedNode* Pred,
@@ -3057,7 +3057,7 @@
VisitAsmStmtHelperInputs(A, I, E, *NI, Dst);
}
-void GRExprEngine::VisitReturnStmt(const ReturnStmt *RS, ExplodedNode *Pred,
+void ExprEngine::VisitReturnStmt(const ReturnStmt *RS, ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
ExplodedNodeSet Src;
if (const Expr *RetE = RS->getRetValue()) {
@@ -3084,7 +3084,7 @@
for (ExplodedNodeSet::iterator I = CheckedSet.begin(), E = CheckedSet.end();
I != E; ++I) {
- assert(Builder && "GRStmtNodeBuilder must be defined.");
+ assert(Builder && "StmtNodeBuilder must be defined.");
Pred = *I;
unsigned size = Dst.size();
@@ -3105,7 +3105,7 @@
// Transfer functions: Binary operators.
//===----------------------------------------------------------------------===//
-void GRExprEngine::VisitBinaryOperator(const BinaryOperator* B,
+void ExprEngine::VisitBinaryOperator(const BinaryOperator* B,
ExplodedNode* Pred,
ExplodedNodeSet& Dst) {
ExplodedNodeSet Tmp1;
@@ -3252,7 +3252,7 @@
// Checker registration/lookup.
//===----------------------------------------------------------------------===//
-Checker *GRExprEngine::lookupChecker(void *tag) const {
+Checker *ExprEngine::lookupChecker(void *tag) const {
CheckerMap::const_iterator I = CheckerM.find(tag);
return (I == CheckerM.end()) ? NULL : Checkers[I->second].second;
}
@@ -3262,7 +3262,7 @@
//===----------------------------------------------------------------------===//
#ifndef NDEBUG
-static GRExprEngine* GraphPrintCheckerState;
+static ExprEngine* GraphPrintCheckerState;
static SourceManager* GraphPrintSourceManager;
namespace llvm {
@@ -3272,7 +3272,7 @@
DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {}
- // FIXME: Since we do not cache error nodes in GRExprEngine now, this does not
+ // FIXME: Since we do not cache error nodes in ExprEngine now, this does not
// work.
static std::string getNodeAttributes(const ExplodedNode* N, void*) {
@@ -3460,7 +3460,7 @@
}
#endif
-void GRExprEngine::ViewGraph(bool trim) {
+void ExprEngine::ViewGraph(bool trim) {
#ifndef NDEBUG
if (trim) {
std::vector<ExplodedNode*> Src;
@@ -3487,7 +3487,7 @@
GraphPrintCheckerState = this;
GraphPrintSourceManager = &getContext().getSourceManager();
- llvm::ViewGraph(*G.roots_begin(), "GRExprEngine");
+ llvm::ViewGraph(*G.roots_begin(), "ExprEngine");
GraphPrintCheckerState = NULL;
GraphPrintSourceManager = NULL;
@@ -3495,7 +3495,7 @@
#endif
}
-void GRExprEngine::ViewGraph(ExplodedNode** Beg, ExplodedNode** End) {
+void ExprEngine::ViewGraph(ExplodedNode** Beg, ExplodedNode** End) {
#ifndef NDEBUG
GraphPrintCheckerState = this;
GraphPrintSourceManager = &getContext().getSourceManager();
@@ -3505,7 +3505,7 @@
if (!TrimmedG.get())
llvm::errs() << "warning: Trimmed ExplodedGraph is empty.\n";
else
- llvm::ViewGraph(*TrimmedG->roots_begin(), "TrimmedGRExprEngine");
+ llvm::ViewGraph(*TrimmedG->roots_begin(), "TrimmedExprEngine");
GraphPrintCheckerState = NULL;
GraphPrintSourceManager = NULL;
diff --git a/lib/GR/GRState.cpp b/lib/GR/GRState.cpp
index 993fa1a..3a4c15a 100644
--- a/lib/GR/GRState.cpp
+++ b/lib/GR/GRState.cpp
@@ -14,8 +14,8 @@
#include "clang/Analysis/CFG.h"
#include "clang/GR/PathSensitive/GRStateTrait.h"
#include "clang/GR/PathSensitive/GRState.h"
-#include "clang/GR/PathSensitive/GRSubEngine.h"
-#include "clang/GR/PathSensitive/GRTransferFuncs.h"
+#include "clang/GR/PathSensitive/SubEngine.h"
+#include "clang/GR/PathSensitive/TransferFuncs.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
@@ -114,7 +114,7 @@
StoreManager::InvalidatedSymbols *IS,
bool invalidateGlobals) const {
GRStateManager &Mgr = getStateManager();
- GRSubEngine &Eng = Mgr.getOwningEngine();
+ SubEngine &Eng = Mgr.getOwningEngine();
if (Eng.WantsRegionChangeUpdate(this)) {
StoreManager::InvalidatedRegions Regions;
diff --git a/lib/GR/RangeConstraintManager.cpp b/lib/GR/RangeConstraintManager.cpp
index 378cb6e..8f8528d 100644
--- a/lib/GR/RangeConstraintManager.cpp
+++ b/lib/GR/RangeConstraintManager.cpp
@@ -15,7 +15,7 @@
#include "SimpleConstraintManager.h"
#include "clang/GR/PathSensitive/GRState.h"
#include "clang/GR/PathSensitive/GRStateTrait.h"
-#include "clang/GR/PathSensitive/GRTransferFuncs.h"
+#include "clang/GR/PathSensitive/TransferFuncs.h"
#include "clang/GR/ManagerRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/FoldingSet.h"
@@ -208,7 +208,7 @@
class RangeConstraintManager : public SimpleConstraintManager{
RangeSet GetRange(const GRState *state, SymbolRef sym);
public:
- RangeConstraintManager(GRSubEngine &subengine)
+ RangeConstraintManager(SubEngine &subengine)
: SimpleConstraintManager(subengine) {}
const GRState *assumeSymNE(const GRState* state, SymbolRef sym,
@@ -255,7 +255,7 @@
} // end anonymous namespace
ConstraintManager* GR::CreateRangeConstraintManager(GRStateManager&,
- GRSubEngine &subeng) {
+ SubEngine &subeng) {
return new RangeConstraintManager(subeng);
}
diff --git a/lib/GR/RegionStore.cpp b/lib/GR/RegionStore.cpp
index f2c4737..2fa8a97 100644
--- a/lib/GR/RegionStore.cpp
+++ b/lib/GR/RegionStore.cpp
@@ -221,7 +221,7 @@
/// type. 'Array' represents the lvalue of the array being decayed
/// to a pointer, and the returned SVal represents the decayed
/// version of that lvalue (i.e., a pointer to the first element of
- /// the array). This is called by GRExprEngine when evaluating
+ /// the array). This is called by ExprEngine when evaluating
/// casts from arrays to pointers.
SVal ArrayToPointer(Loc Array);
@@ -787,7 +787,7 @@
/// type. 'Array' represents the lvalue of the array being decayed
/// to a pointer, and the returned SVal represents the decayed
/// version of that lvalue (i.e., a pointer to the first element of
-/// the array). This is called by GRExprEngine when evaluating casts
+/// the array). This is called by ExprEngine when evaluating casts
/// from arrays to pointers.
SVal RegionStoreManager::ArrayToPointer(Loc Array) {
if (!isa<loc::MemRegionVal>(Array))
diff --git a/lib/GR/SimpleConstraintManager.cpp b/lib/GR/SimpleConstraintManager.cpp
index 991d0e8..83e7955 100644
--- a/lib/GR/SimpleConstraintManager.cpp
+++ b/lib/GR/SimpleConstraintManager.cpp
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "SimpleConstraintManager.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
#include "clang/GR/PathSensitive/GRState.h"
#include "clang/GR/PathSensitive/Checker.h"
diff --git a/lib/GR/SimpleConstraintManager.h b/lib/GR/SimpleConstraintManager.h
index 442f0ca..6163693 100644
--- a/lib/GR/SimpleConstraintManager.h
+++ b/lib/GR/SimpleConstraintManager.h
@@ -22,9 +22,9 @@
namespace GR {
class SimpleConstraintManager : public ConstraintManager {
- GRSubEngine &SU;
+ SubEngine &SU;
public:
- SimpleConstraintManager(GRSubEngine &subengine) : SU(subengine) {}
+ SimpleConstraintManager(SubEngine &subengine) : SU(subengine) {}
virtual ~SimpleConstraintManager();
//===------------------------------------------------------------------===//
diff --git a/lib/GR/SimpleSValBuilder.cpp b/lib/GR/SimpleSValBuilder.cpp
index 03f8e30..2fc2347 100644
--- a/lib/GR/SimpleSValBuilder.cpp
+++ b/lib/GR/SimpleSValBuilder.cpp
@@ -358,7 +358,7 @@
case BO_XorAssign:
case BO_OrAssign:
case BO_Comma:
- assert(false && "'=' and ',' operators handled by GRExprEngine.");
+ assert(false && "'=' and ',' operators handled by ExprEngine.");
return UnknownVal();
case BO_PtrMemD:
case BO_PtrMemI:
diff --git a/lib/GR/SymbolManager.cpp b/lib/GR/SymbolManager.cpp
index 95df307..6d078f4 100644
--- a/lib/GR/SymbolManager.cpp
+++ b/lib/GR/SymbolManager.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
// This file defines SymbolManager, a class that manages symbolic values
-// created for use by GRExprEngine and related classes.
+// created for use by ExprEngine and related classes.
//
//===----------------------------------------------------------------------===//