]> granicus.if.org Git - clang/commitdiff
[analyzer] Refactoring: Drop the 'GR' prefix.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 22 Dec 2010 18:53:44 +0000 (18:53 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 22 Dec 2010 18:53:44 +0000 (18:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122424 91177308-0d34-0410-b5e6-96231b3b80d8

84 files changed:
examples/wpa/clang-wpa.cpp
include/clang/GR/BugReporter/BugReporter.h
include/clang/GR/BugReporter/BugType.h
include/clang/GR/Checkers/DereferenceChecker.h
include/clang/GR/Checkers/LocalCheckers.h
include/clang/GR/PathSensitive/BasicValueFactory.h
include/clang/GR/PathSensitive/BlockCounter.h [moved from include/clang/GR/PathSensitive/GRBlockCounter.h with 69% similarity]
include/clang/GR/PathSensitive/Checker.h
include/clang/GR/PathSensitive/ConstraintManager.h
include/clang/GR/PathSensitive/CoreEngine.h [moved from include/clang/GR/PathSensitive/GRCoreEngine.h with 76% similarity]
include/clang/GR/PathSensitive/ExplodedGraph.h
include/clang/GR/PathSensitive/ExprEngine.h [moved from include/clang/GR/PathSensitive/GRExprEngine.h with 86% similarity]
include/clang/GR/PathSensitive/ExprEngineBuilders.h [moved from include/clang/GR/PathSensitive/GRExprEngineBuilders.h with 72% similarity]
include/clang/GR/PathSensitive/GRState.h
include/clang/GR/PathSensitive/Store.h
include/clang/GR/PathSensitive/SubEngine.h [moved from include/clang/GR/PathSensitive/GRSubEngine.h with 65% similarity]
include/clang/GR/PathSensitive/SymbolManager.h
include/clang/GR/PathSensitive/TransferFuncs.h [moved from include/clang/GR/PathSensitive/GRTransferFuncs.h with 62% similarity]
include/clang/GR/PathSensitive/WorkList.h [moved from include/clang/GR/PathSensitive/GRWorkList.h with 53% similarity]
lib/GR/AggExprVisitor.cpp
lib/GR/AnalysisConsumer.cpp
lib/GR/AnalyzerStatsChecker.cpp
lib/GR/BasicConstraintManager.cpp
lib/GR/BasicStore.cpp
lib/GR/BasicValueFactory.cpp
lib/GR/BlockCounter.cpp [moved from lib/GR/GRBlockCounter.cpp with 74% similarity]
lib/GR/BugReporter.cpp
lib/GR/CFRefCount.cpp
lib/GR/CMakeLists.txt
lib/GR/CXXExprEngine.cpp [moved from lib/GR/GRCXXExprEngine.cpp with 92% similarity]
lib/GR/Checkers/AdjustedReturnValueChecker.cpp
lib/GR/Checkers/ArrayBoundChecker.cpp
lib/GR/Checkers/AttrNonNullChecker.cpp
lib/GR/Checkers/BasicObjCFoundationChecks.cpp
lib/GR/Checkers/BasicObjCFoundationChecks.h
lib/GR/Checkers/BuiltinFunctionChecker.cpp
lib/GR/Checkers/CMakeLists.txt
lib/GR/Checkers/CStringChecker.cpp
lib/GR/Checkers/CallAndMessageChecker.cpp
lib/GR/Checkers/CastSizeChecker.cpp
lib/GR/Checkers/CastToStructChecker.cpp
lib/GR/Checkers/CheckDeadStores.cpp
lib/GR/Checkers/ChrootChecker.cpp
lib/GR/Checkers/DereferenceChecker.cpp
lib/GR/Checkers/DivZeroChecker.cpp
lib/GR/Checkers/ExprEngineExperimentalChecks.cpp [moved from lib/GR/Checkers/GRExprEngineExperimentalChecks.cpp with 78% similarity]
lib/GR/Checkers/ExprEngineExperimentalChecks.h [new file with mode: 0644]
lib/GR/Checkers/ExprEngineInternalChecks.h [new file with mode: 0644]
lib/GR/Checkers/FixedAddressChecker.cpp
lib/GR/Checkers/GRExprEngineExperimentalChecks.h [deleted file]
lib/GR/Checkers/GRExprEngineInternalChecks.h [deleted file]
lib/GR/Checkers/IdempotentOperationChecker.cpp
lib/GR/Checkers/MacOSXAPIChecker.cpp
lib/GR/Checkers/MallocChecker.cpp
lib/GR/Checkers/NSAutoreleasePoolChecker.cpp
lib/GR/Checkers/NSErrorChecker.cpp
lib/GR/Checkers/NoReturnFunctionChecker.cpp
lib/GR/Checkers/OSAtomicChecker.cpp
lib/GR/Checkers/ObjCAtSyncChecker.cpp
lib/GR/Checkers/PointerArithChecker.cpp
lib/GR/Checkers/PointerSubChecker.cpp
lib/GR/Checkers/PthreadLockChecker.cpp
lib/GR/Checkers/ReturnPointerRangeChecker.cpp
lib/GR/Checkers/ReturnUndefChecker.cpp
lib/GR/Checkers/StackAddrLeakChecker.cpp
lib/GR/Checkers/StreamChecker.cpp
lib/GR/Checkers/UndefBranchChecker.cpp
lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp
lib/GR/Checkers/UndefResultChecker.cpp
lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp
lib/GR/Checkers/UndefinedAssignmentChecker.cpp
lib/GR/Checkers/UnixAPIChecker.cpp
lib/GR/Checkers/UnreachableCodeChecker.cpp
lib/GR/Checkers/VLASizeChecker.cpp
lib/GR/CoreEngine.cpp [moved from lib/GR/GRCoreEngine.cpp with 82% similarity]
lib/GR/ExprEngine.cpp [moved from lib/GR/GRExprEngine.cpp with 94% similarity]
lib/GR/GRState.cpp
lib/GR/RangeConstraintManager.cpp
lib/GR/RegionStore.cpp
lib/GR/SimpleConstraintManager.cpp
lib/GR/SimpleConstraintManager.h
lib/GR/SimpleSValBuilder.cpp
lib/GR/SymbolManager.cpp
test/SemaTemplate/instantiate-member-expr.cpp

index 45e889e170b800a04d7ac9b19b30941b14c0115e..41422b04ecf108523698dba8389f72ae29f83fca 100644 (file)
@@ -15,8 +15,8 @@
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/GR/PathSensitive/AnalysisManager.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/Checkers/LocalCheckers.h"
 #include "clang/Frontend/ASTUnit.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -140,9 +140,9 @@ int main(int argc, char **argv) {
                        /* TrimGraph */ false, /* InlineCall */ true, 
                        /* UseUnoptimizedCFG */ false);
 
-  GRTransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false,
+  TransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false,
                                          AMgr.getLangOptions());
-  GRExprEngine Eng(AMgr, TF);
+  ExprEngine Eng(AMgr, TF);
 
   Eng.ExecuteWorkList(AMgr.getStackFrame(FD, TU), AMgr.getMaxNodes());
   
index b0afc5fe7a5c9a324c48ccfa7a5c01c990f15de9..31487b6eb60b3433b26dd6d422cef00e7f080ab5 100644 (file)
@@ -39,7 +39,7 @@ class ExplodedNode;
 class ExplodedGraph;
 class BugReporter;
 class BugReporterContext;
-class GRExprEngine;
+class ExprEngine;
 class GRState;
 class BugType;
 
@@ -348,17 +348,17 @@ public:
 
 // FIXME: Get rid of GRBugReporter.  It's the wrong abstraction.
 class GRBugReporter : public BugReporter {
-  GRExprEngine& Eng;
+  ExprEngine& Eng;
   llvm::SmallSet<SymbolRef, 10> NotableSymbols;
 public:
-  GRBugReporter(BugReporterData& d, GRExprEngine& eng)
+  GRBugReporter(BugReporterData& d, ExprEngine& eng)
     : BugReporter(d, GRBugReporterKind), Eng(eng) {}
 
   virtual ~GRBugReporter();
 
   /// getEngine - Return the analysis engine used to analyze a given
   ///  function or method.
-  GRExprEngine &getEngine() { return Eng; }
+  ExprEngine &getEngine() { return Eng; }
 
   /// getGraph - Get the exploded graph created by the analysis engine
   ///  for the analyzed method or function.
index 0ed03c5488f8edf0bb4dc5604809de7ad6cae641..a18e59639cd04abab42e46c8a1dec59b471e106a 100644 (file)
@@ -23,7 +23,7 @@ namespace clang {
 namespace GR {
 
 class ExplodedNode;
-class GRExprEngine;
+class ExprEngine;
 
 class BugType {
 private:
index 163a4c9d0a23292adcfa17be712f1e42bb19339c..2ac45bf9ba521b92a3dcba42546f9572b6db3e9d 100644 (file)
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // This defines NullDerefChecker and UndefDerefChecker, two builtin checks
-// in GRExprEngine that check for null and undefined pointers at loads
+// in ExprEngine that check for null and undefined pointers at loads
 // and stores.
 //
 //===----------------------------------------------------------------------===//
@@ -22,11 +22,11 @@ namespace clang {
 
 namespace GR {
 
-class GRExprEngine;
+class ExprEngine;
 class ExplodedNode;
 
 std::pair<ExplodedNode * const *, ExplodedNode * const *>
-GetImplicitNullDereferences(GRExprEngine &Eng);
+GetImplicitNullDereferences(ExprEngine &Eng);
 
 } // end GR namespace
 
index ddb16c16c445322db3a350c4eede1b45eac89a89..d9352ee8bcab955c84d6764cf611cf247d40db3b 100644 (file)
@@ -31,15 +31,15 @@ class TranslationUnitDecl;
 namespace GR {
 
 class PathDiagnosticClient;
-class GRTransferFuncs;
+class TransferFuncs;
 class BugType;
 class BugReporter;
-class GRExprEngine;
+class ExprEngine;
 
 void CheckDeadStores(CFG &cfg, LiveVariables &L, ParentMap &map, 
                      BugReporter& BR);
 
-GRTransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
+TransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
                                   const LangOptions& lopts);
 
 void CheckObjCDealloc(const ObjCImplementationDecl* D, const LangOptions& L,
@@ -50,15 +50,15 @@ void CheckObjCInstMethSignature(const ObjCImplementationDecl *ID,
 
 void CheckObjCUnusedIvar(const ObjCImplementationDecl *D, BugReporter& BR);
 
-void RegisterAppleChecks(GRExprEngine& Eng, const Decl &D);
-void RegisterExperimentalChecks(GRExprEngine &Eng);
-void RegisterExperimentalInternalChecks(GRExprEngine &Eng);
+void RegisterAppleChecks(ExprEngine& Eng, const Decl &D);
+void RegisterExperimentalChecks(ExprEngine &Eng);
+void RegisterExperimentalInternalChecks(ExprEngine &Eng);
 
 void CheckLLVMConventions(TranslationUnitDecl &TU, BugReporter &BR);
 void CheckSecuritySyntaxOnly(const Decl *D, BugReporter &BR);
 void CheckSizeofPointer(const Decl *D, BugReporter &BR);
 
-void RegisterCallInliner(GRExprEngine &Eng);
+void RegisterCallInliner(ExprEngine &Eng);
 
 } // end GR namespace
 
index b95d7b271faa496fcea5d45d2f75576bc2f4a0a0..c310408ff8defda567516c80f53b860c1486d49c 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
similarity index 69%
rename from include/clang/GR/PathSensitive/GRBlockCounter.h
rename to include/clang/GR/PathSensitive/BlockCounter.h
index 7abc0349bc8be09d3d85f154bfbdb7388dc24024..071ccb09eeaf3d74c955efb59b00330675d56ddf 100644 (file)
@@ -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,14 +7,14 @@
 //
 //===----------------------------------------------------------------------===//
 //
-//  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.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_GR_GRBLOCKCOUNTER
-#define LLVM_CLANG_GR_GRBLOCKCOUNTER
+#ifndef LLVM_CLANG_GR_BLOCKCOUNTER
+#define LLVM_CLANG_GR_BLOCKCOUNTER
 
 namespace llvm {
   class BumpPtrAllocator;
@@ -26,13 +26,13 @@ class StackFrameContext;
 
 namespace GR {
 
-class GRBlockCounter {
+class BlockCounter {
   void* Data;
 
-  GRBlockCounter(void* D) : Data(D) {}
+  BlockCounter(void* D) : Data(D) {}
 
 public:
-  GRBlockCounter() : Data(0) {}
+  BlockCounter() : Data(0) {}
 
   unsigned getNumVisited(const StackFrameContext *CallSite, 
                          unsigned BlockID) const;
@@ -43,8 +43,8 @@ public:
     Factory(llvm::BumpPtrAllocator& Alloc);
     ~Factory();
 
-    GRBlockCounter GetEmptyCounter();
-    GRBlockCounter IncrementCount(GRBlockCounter BC, 
+    BlockCounter GetEmptyCounter();
+    BlockCounter IncrementCount(BlockCounter BC, 
                                   const StackFrameContext *CallSite,
                                   unsigned BlockID);
   };
index ac3fb183f29ecb716d8b8ee8c7e80c7f5fcfbb72..c1cac5776c808f9d2c328465bc0bd3b9fc8cbb51 100644 (file)
@@ -16,7 +16,7 @@
 #define LLVM_CLANG_GR_CHECKER
 
 #include "clang/Analysis/Support/SaveAndRestore.h"
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#include "clang/GR/PathSensitive/ExprEngine.h"
 
 //===----------------------------------------------------------------------===//
 // Checker interface.
@@ -28,8 +28,8 @@ namespace GR {
 
 class CheckerContext {
   ExplodedNodeSet &Dst;
-  GRStmtNodeBuilder &B;
-  GRExprEngine &Eng;
+  StmtNodeBuilder &B;
+  ExprEngine &Eng;
   ExplodedNode *Pred;
   SaveAndRestore<bool> OldSink;
   SaveAndRestore<const void*> OldTag;
@@ -41,8 +41,8 @@ class CheckerContext {
 public:
   bool *respondsToCallback;
 public:
-  CheckerContext(ExplodedNodeSet &dst, GRStmtNodeBuilder &builder,
-                 GRExprEngine &eng, ExplodedNode *pred,
+  CheckerContext(ExplodedNodeSet &dst, StmtNodeBuilder &builder,
+                 ExprEngine &eng, ExplodedNode *pred,
                  const void *tag, ProgramPoint::Kind K,
                  bool *respondsToCB = 0,
                  const Stmt *stmt = 0, const GRState *st = 0)
@@ -56,7 +56,7 @@ public:
 
   ~CheckerContext();
 
-  GRExprEngine &getEngine() {
+  ExprEngine &getEngine() {
     return Eng;
   }
 
@@ -73,7 +73,7 @@ public:
   }
 
   ExplodedNodeSet &getNodeSet() { return Dst; }
-  GRStmtNodeBuilder &getNodeBuilder() { return B; }
+  StmtNodeBuilder &getNodeBuilder() { return B; }
   ExplodedNode *&getPredecessor() { return Pred; }
   const GRState *getState() { return ST ? ST : B.GetState(Pred); }
 
@@ -152,7 +152,7 @@ public:
   }
 
   // Generate a node with a new program point different from the one that will
-  // be created by the GRStmtNodeBuilder.
+  // be created by the StmtNodeBuilder.
   void addTransition(const GRState *state, ProgramPoint Loc) {
     ExplodedNode *N = B.generateNode(Loc, state, Pred);
     if (N)
@@ -187,12 +187,12 @@ private:
 
 class Checker {
 private:
-  friend class GRExprEngine;
+  friend class ExprEngine;
 
   // FIXME: Remove the 'tag' option.
   void GR_Visit(ExplodedNodeSet &Dst,
-                GRStmtNodeBuilder &Builder,
-                GRExprEngine &Eng,
+                StmtNodeBuilder &Builder,
+                ExprEngine &Eng,
                 const Stmt *S,
                 ExplodedNode *Pred, void *tag, bool isPrevisit,
                 bool& respondsToCallback) {
@@ -205,16 +205,16 @@ private:
       _PostVisit(C, S);
   }
 
-  bool GR_evalNilReceiver(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder,
-                          GRExprEngine &Eng, const ObjCMessageExpr *ME,
+  bool GR_evalNilReceiver(ExplodedNodeSet &Dst, StmtNodeBuilder &Builder,
+                          ExprEngine &Eng, const ObjCMessageExpr *ME,
                           ExplodedNode *Pred, const GRState *state, void *tag) {
     CheckerContext C(Dst, Builder, Eng, Pred, tag, ProgramPoint::PostStmtKind,
                      0, ME, state);
     return evalNilReceiver(C, ME);
   }
 
-  bool GR_evalCallExpr(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder,
-                       GRExprEngine &Eng, const CallExpr *CE,
+  bool GR_evalCallExpr(ExplodedNodeSet &Dst, StmtNodeBuilder &Builder,
+                       ExprEngine &Eng, const CallExpr *CE,
                        ExplodedNode *Pred, void *tag) {
     CheckerContext C(Dst, Builder, Eng, Pred, tag, ProgramPoint::PostStmtKind,
                      0, CE);
@@ -223,7 +223,7 @@ private:
 
   // FIXME: Remove the 'tag' option.
   void GR_VisitBind(ExplodedNodeSet &Dst,
-                    GRStmtNodeBuilder &Builder, GRExprEngine &Eng,
+                    StmtNodeBuilder &Builder, ExprEngine &Eng,
                     const Stmt *StoreE, ExplodedNode *Pred, void *tag, 
                     SVal location, SVal val,
                     bool isPrevisit) {
@@ -236,8 +236,8 @@ private:
   
   // FIXME: Remove the 'tag' option.
   void GR_visitLocation(ExplodedNodeSet &Dst,
-                        GRStmtNodeBuilder &Builder,
-                        GRExprEngine &Eng,
+                        StmtNodeBuilder &Builder,
+                        ExprEngine &Eng,
                         const Stmt *S,
                         ExplodedNode *Pred, const GRState *state,
                         SVal location,
@@ -248,8 +248,8 @@ private:
     visitLocation(C, S, location);
   }
 
-  void GR_evalDeadSymbols(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder,
-                          GRExprEngine &Eng, const Stmt *S, ExplodedNode *Pred,
+  void GR_evalDeadSymbols(ExplodedNodeSet &Dst, StmtNodeBuilder &Builder,
+                          ExprEngine &Eng, const Stmt *S, ExplodedNode *Pred,
                           SymbolReaper &SymReaper, void *tag) {
     CheckerContext C(Dst, Builder, Eng, Pred, tag, 
                      ProgramPoint::PostPurgeDeadSymbolsKind, 0, S);
@@ -264,13 +264,13 @@ public:
   virtual void PreVisitBind(CheckerContext &C, const Stmt *StoreE,
                             SVal location, SVal val) {}
   virtual void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper) {}
-  virtual void evalEndPath(GREndPathNodeBuilder &B, void *tag,
-                           GRExprEngine &Eng) {}
+  virtual void evalEndPath(EndPathNodeBuilder &B, void *tag,
+                           ExprEngine &Eng) {}
 
   virtual void MarkLiveSymbols(const GRState *state, SymbolReaper &SymReaper) {}
 
-  virtual void VisitBranchCondition(GRBranchNodeBuilder &Builder,
-                                    GRExprEngine &Eng,
+  virtual void VisitBranchCondition(BranchNodeBuilder &Builder,
+                                    ExprEngine &Eng,
                                     const Stmt *Condition, void *tag) {}
 
   virtual bool evalNilReceiver(CheckerContext &C, const ObjCMessageExpr *ME) {
@@ -298,7 +298,7 @@ public:
   }
 
   virtual void VisitEndAnalysis(ExplodedGraph &G, BugReporter &B,
-                                GRExprEngine &Eng) {}
+                                ExprEngine &Eng) {}
 };
 
 } // end GR namespace
index 38d42938a4836581c7f1ba5c101bba9539efca7d..0cc023f5a1631830c78186d343c26e9b2323b68f 100644 (file)
@@ -27,7 +27,7 @@ namespace GR {
 
 class GRState;
 class GRStateManager;
-class GRSubEngine;
+class SubEngine;
 class SVal;
 
 class ConstraintManager {
@@ -59,15 +59,15 @@ public:
   /// canReasonAbout - Not all ConstraintManagers can accurately reason about
   ///  all SVal values.  This method returns true if the ConstraintManager can
   ///  reasonably handle a given SVal value.  This is typically queried by
-  ///  GRExprEngine to determine if the value should be replaced with a
+  ///  ExprEngine to determine if the value should be replaced with a
   ///  conjured symbolic value in order to recover some precision.
   virtual bool canReasonAbout(SVal X) const = 0;
 };
 
 ConstraintManager* CreateBasicConstraintManager(GRStateManager& statemgr,
-                                                GRSubEngine &subengine);
+                                                SubEngine &subengine);
 ConstraintManager* CreateRangeConstraintManager(GRStateManager& statemgr,
-                                                GRSubEngine &subengine);
+                                                SubEngine &subengine);
 
 } // end GR namespace
 
similarity index 76%
rename from include/clang/GR/PathSensitive/GRCoreEngine.h
rename to include/clang/GR/PathSensitive/CoreEngine.h
index 79e4827413658692b45ae70b8e32d6ebcf31ad70..c66d0ba907546210d9fde7af177918e5e24f75d4 100644 (file)
@@ -1,4 +1,4 @@
-//==- GRCoreEngine.h - Path-Sensitive Dataflow Engine --------------*- C++ -*-//
+//==- CoreEngine.h - Path-Sensitive Dataflow Engine ----------------*- C++ -*-//
 //
 //                     The LLVM Compiler Infrastructure
 //
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_GR_GRENGINE
-#define LLVM_CLANG_GR_GRENGINE
+#ifndef LLVM_CLANG_GR_COREENGINE
+#define LLVM_CLANG_GR_COREENGINE
 
 #include "clang/AST/Expr.h"
 #include "clang/GR/PathSensitive/ExplodedGraph.h"
-#include "clang/GR/PathSensitive/GRWorkList.h"
-#include "clang/GR/PathSensitive/GRBlockCounter.h"
-#include "clang/GR/PathSensitive/GRSubEngine.h"
+#include "clang/GR/PathSensitive/WorkList.h"
+#include "clang/GR/PathSensitive/BlockCounter.h"
+#include "clang/GR/PathSensitive/SubEngine.h"
 #include "llvm/ADT/OwningPtr.h"
 
 namespace clang {
@@ -27,29 +27,29 @@ namespace clang {
 namespace GR {
 
 //===----------------------------------------------------------------------===//
-/// GRCoreEngine - Implements the core logic of the graph-reachability
+/// CoreEngine - Implements the core logic of the graph-reachability
 ///   analysis. It traverses the CFG and generates the ExplodedGraph.
 ///   Program "states" are treated as opaque void pointers.
-///   The template class GRCoreEngine (which subclasses GRCoreEngine)
+///   The template class CoreEngine (which subclasses CoreEngine)
 ///   provides the matching component to the engine that knows the actual types
 ///   for states.  Note that this engine only dispatches to transfer functions
 ///   at the statement and block-level.  The analyses themselves must implement
 ///   any transfer function logic and the sub-expression level (if any).
-class GRCoreEngine {
-  friend class GRStmtNodeBuilder;
-  friend class GRBranchNodeBuilder;
-  friend class GRIndirectGotoNodeBuilder;
-  friend class GRSwitchNodeBuilder;
-  friend class GREndPathNodeBuilder;
-  friend class GRCallEnterNodeBuilder;
-  friend class GRCallExitNodeBuilder;
+class CoreEngine {
+  friend class StmtNodeBuilder;
+  friend class BranchNodeBuilder;
+  friend class IndirectGotoNodeBuilder;
+  friend class SwitchNodeBuilder;
+  friend class EndPathNodeBuilder;
+  friend class CallEnterNodeBuilder;
+  friend class CallExitNodeBuilder;
 
 public:
   typedef std::vector<std::pair<BlockEdge, const ExplodedNode*> >
             BlocksAborted;
 private:
 
-  GRSubEngine& SubEngine;
+  SubEngine& SubEng;
 
   /// G - The simulation graph.  Each node is a (location,state) pair.
   llvm::OwningPtr<ExplodedGraph> G;
@@ -57,12 +57,12 @@ private:
   /// WList - A set of queued nodes that need to be processed by the
   ///  worklist algorithm.  It is up to the implementation of WList to decide
   ///  the order that nodes are processed.
-  GRWorkList* WList;
+  WorkList* WList;
 
-  /// BCounterFactory - A factory object for created GRBlockCounter objects.
+  /// BCounterFactory - A factory object for created BlockCounter objects.
   ///   These are used to record for key nodes in the ExplodedGraph the
   ///   number of times different CFGBlocks have been visited along a path.
-  GRBlockCounter::Factory BCounterFactory;
+  BlockCounter::Factory BCounterFactory;
 
   /// The locations where we stopped doing work because we visited a location
   ///  too many times.
@@ -84,66 +84,66 @@ private:
 
   /// Get the initial state from the subengine.
   const GRState* getInitialState(const LocationContext *InitLoc) {
-    return SubEngine.getInitialState(InitLoc);
+    return SubEng.getInitialState(InitLoc);
   }
 
-  void ProcessEndPath(GREndPathNodeBuilder& Builder) {
-    SubEngine.ProcessEndPath(Builder);
+  void ProcessEndPath(EndPathNodeBuilder& Builder) {
+    SubEng.ProcessEndPath(Builder);
   }
 
-  void ProcessElement(const CFGElement E, GRStmtNodeBuilder& Builder) {
-    SubEngine.ProcessElement(E, Builder);
+  void ProcessElement(const CFGElement E, StmtNodeBuilder& Builder) {
+    SubEng.ProcessElement(E, Builder);
   }
 
   bool ProcessBlockEntrance(const CFGBlock* Blk, const ExplodedNode *Pred,
-                            GRBlockCounter BC) {
-    return SubEngine.ProcessBlockEntrance(Blk, Pred, BC);
+                            BlockCounter BC) {
+    return SubEng.ProcessBlockEntrance(Blk, Pred, BC);
   }
 
 
   void ProcessBranch(const Stmt* Condition, const Stmt* Terminator,
-                     GRBranchNodeBuilder& Builder) {
-    SubEngine.ProcessBranch(Condition, Terminator, Builder);
+                     BranchNodeBuilder& Builder) {
+    SubEng.ProcessBranch(Condition, Terminator, Builder);
   }
 
 
-  void ProcessIndirectGoto(GRIndirectGotoNodeBuilder& Builder) {
-    SubEngine.ProcessIndirectGoto(Builder);
+  void ProcessIndirectGoto(IndirectGotoNodeBuilder& Builder) {
+    SubEng.ProcessIndirectGoto(Builder);
   }
 
 
-  void ProcessSwitch(GRSwitchNodeBuilder& Builder) {
-    SubEngine.ProcessSwitch(Builder);
+  void ProcessSwitch(SwitchNodeBuilder& Builder) {
+    SubEng.ProcessSwitch(Builder);
   }
 
-  void ProcessCallEnter(GRCallEnterNodeBuilder &Builder) {
-    SubEngine.ProcessCallEnter(Builder);
+  void ProcessCallEnter(CallEnterNodeBuilder &Builder) {
+    SubEng.ProcessCallEnter(Builder);
   }
 
-  void ProcessCallExit(GRCallExitNodeBuilder &Builder) {
-    SubEngine.ProcessCallExit(Builder);
+  void ProcessCallExit(CallExitNodeBuilder &Builder) {
+    SubEng.ProcessCallExit(Builder);
   }
 
 private:
-  GRCoreEngine(const GRCoreEngine&); // Do not implement.
-  GRCoreEngine& operator=(const GRCoreEngine&);
+  CoreEngine(const CoreEngine&); // Do not implement.
+  CoreEngine& operator=(const CoreEngine&);
 
 public:
-  /// Construct a GRCoreEngine object to analyze the provided CFG using
+  /// Construct a CoreEngine object to analyze the provided CFG using
   ///  a DFS exploration of the exploded graph.
-  GRCoreEngine(GRSubEngine& subengine)
-    : SubEngine(subengine), G(new ExplodedGraph()),
-      WList(GRWorkList::MakeBFS()),
+  CoreEngine(SubEngine& subengine)
+    : SubEng(subengine), G(new ExplodedGraph()),
+      WList(WorkList::MakeBFS()),
       BCounterFactory(G->getAllocator()) {}
 
-  /// Construct a GRCoreEngine object to analyze the provided CFG and to
+  /// Construct a CoreEngine object to analyze the provided CFG and to
   ///  use the provided worklist object to execute the worklist algorithm.
-  ///  The GRCoreEngine object assumes ownership of 'wlist'.
-  GRCoreEngine(GRWorkList* wlist, GRSubEngine& subengine)
-    : SubEngine(subengine), G(new ExplodedGraph()), WList(wlist),
+  ///  The CoreEngine object assumes ownership of 'wlist'.
+  CoreEngine(WorkList* wlist, SubEngine& subengine)
+    : SubEng(subengine), G(new ExplodedGraph()), WList(wlist),
       BCounterFactory(G->getAllocator()) {}
 
-  ~GRCoreEngine() {
+  ~CoreEngine() {
     delete WList;
   }
 
@@ -166,7 +166,7 @@ public:
   bool wasBlockAborted() const { return !blocksAborted.empty(); }
   bool hasWorkRemaining() const { return wasBlockAborted() || WList->hasWork(); }
 
-  GRWorkList *getWorkList() const { return WList; }
+  WorkList *getWorkList() const { return WList; }
 
   BlocksAborted::const_iterator blocks_aborted_begin() const {
     return blocksAborted.begin();
@@ -176,8 +176,8 @@ public:
   }
 };
 
-class GRStmtNodeBuilder {
-  GRCoreEngine& Eng;
+class StmtNodeBuilder {
+  CoreEngine& Eng;
   const CFGBlock& B;
   const unsigned Idx;
   ExplodedNode* Pred;
@@ -199,21 +199,21 @@ public:
   void GenerateAutoTransition(ExplodedNode* N);
 
 public:
-  GRStmtNodeBuilder(const CFGBlock* b, unsigned idx, ExplodedNode* N,
-                    GRCoreEngine* e, GRStateManager &mgr);
+  StmtNodeBuilder(const CFGBlock* b, unsigned idx, ExplodedNode* N,
+                    CoreEngine* e, GRStateManager &mgr);
 
-  ~GRStmtNodeBuilder();
+  ~StmtNodeBuilder();
 
   ExplodedNode* getBasePredecessor() const { return Pred; }
 
   // FIXME: This should not be exposed.
-  GRWorkList *getWorkList() { return Eng.WList; }
+  WorkList *getWorkList() { return Eng.WList; }
 
   void SetCleanedState(const GRState* St) {
     CleanedState = St;
   }
 
-  GRBlockCounter getBlockCounter() const { return Eng.WList->getBlockCounter();}
+  BlockCounter getBlockCounter() const { return Eng.WList->getBlockCounter();}
 
   unsigned getCurrentBlockCount() const {
     return getBlockCounter().getNumVisited(
@@ -297,8 +297,8 @@ public:
   }
 };
 
-class GRBranchNodeBuilder {
-  GRCoreEngine& Eng;
+class BranchNodeBuilder {
+  CoreEngine& Eng;
   const CFGBlock* Src;
   const CFGBlock* DstT;
   const CFGBlock* DstF;
@@ -313,19 +313,19 @@ class GRBranchNodeBuilder {
   bool InFeasibleFalse;
 
 public:
-  GRBranchNodeBuilder(const CFGBlock* src, const CFGBlock* dstT, 
-                      const CFGBlock* dstF, ExplodedNode* pred, GRCoreEngine* e)
+  BranchNodeBuilder(const CFGBlock* src, const CFGBlock* dstT, 
+                      const CFGBlock* dstF, ExplodedNode* pred, CoreEngine* e)
   : Eng(*e), Src(src), DstT(dstT), DstF(dstF), Pred(pred),
     GeneratedTrue(false), GeneratedFalse(false),
     InFeasibleTrue(!DstT), InFeasibleFalse(!DstF) {}
 
-  ~GRBranchNodeBuilder();
+  ~BranchNodeBuilder();
 
   ExplodedNode* getPredecessor() const { return Pred; }
 
   const ExplodedGraph& getGraph() const { return *Eng.G; }
 
-  GRBlockCounter getBlockCounter() const { return Eng.WList->getBlockCounter();}
+  BlockCounter getBlockCounter() const { return Eng.WList->getBlockCounter();}
 
   ExplodedNode* generateNode(const GRState* State, bool branch);
 
@@ -349,22 +349,22 @@ public:
   }
 };
 
-class GRIndirectGotoNodeBuilder {
-  GRCoreEngine& Eng;
+class IndirectGotoNodeBuilder {
+  CoreEngine& Eng;
   const CFGBlock* Src;
   const CFGBlock& DispatchBlock;
   const Expr* E;
   ExplodedNode* Pred;
 
 public:
-  GRIndirectGotoNodeBuilder(ExplodedNode* pred, const CFGBlock* src, 
-                    const Expr* e, const CFGBlock* dispatch, GRCoreEngine* eng)
+  IndirectGotoNodeBuilder(ExplodedNode* pred, const CFGBlock* src, 
+                    const Expr* e, const CFGBlock* dispatch, CoreEngine* eng)
     : Eng(*eng), Src(src), DispatchBlock(*dispatch), E(e), Pred(pred) {}
 
   class iterator {
     CFGBlock::const_succ_iterator I;
 
-    friend class GRIndirectGotoNodeBuilder;
+    friend class IndirectGotoNodeBuilder;
     iterator(CFGBlock::const_succ_iterator i) : I(i) {}
   public:
 
@@ -391,21 +391,21 @@ public:
   const GRState* getState() const { return Pred->State; }
 };
 
-class GRSwitchNodeBuilder {
-  GRCoreEngine& Eng;
+class SwitchNodeBuilder {
+  CoreEngine& Eng;
   const CFGBlock* Src;
   const Expr* Condition;
   ExplodedNode* Pred;
 
 public:
-  GRSwitchNodeBuilder(ExplodedNode* pred, const CFGBlock* src,
-                      const Expr* condition, GRCoreEngine* eng)
+  SwitchNodeBuilder(ExplodedNode* pred, const CFGBlock* src,
+                      const Expr* condition, CoreEngine* eng)
   : Eng(*eng), Src(src), Condition(condition), Pred(pred) {}
 
   class iterator {
     CFGBlock::const_succ_reverse_iterator I;
 
-    friend class GRSwitchNodeBuilder;
+    friend class SwitchNodeBuilder;
     iterator(CFGBlock::const_succ_reverse_iterator i) : I(i) {}
 
   public:
@@ -439,8 +439,8 @@ public:
   const GRState* getState() const { return Pred->State; }
 };
 
-class GREndPathNodeBuilder {
-  GRCoreEngine &Eng;
+class EndPathNodeBuilder {
+  CoreEngine &Eng;
   const CFGBlock& B;
   ExplodedNode* Pred;
 
@@ -448,16 +448,16 @@ public:
   bool HasGeneratedNode;
 
 public:
-  GREndPathNodeBuilder(const CFGBlock* b, ExplodedNode* N, GRCoreEngine* e)
+  EndPathNodeBuilder(const CFGBlock* b, ExplodedNode* N, CoreEngine* e)
     : Eng(*e), B(*b), Pred(N), HasGeneratedNode(false) {}
 
-  ~GREndPathNodeBuilder();
+  ~EndPathNodeBuilder();
 
-  GRWorkList &getWorkList() { return *Eng.WList; }
+  WorkList &getWorkList() { return *Eng.WList; }
 
   ExplodedNode* getPredecessor() const { return Pred; }
 
-  GRBlockCounter getBlockCounter() const {
+  BlockCounter getBlockCounter() const {
     return Eng.WList->getBlockCounter();
   }
 
@@ -479,8 +479,8 @@ public:
   }
 };
 
-class GRCallEnterNodeBuilder {
-  GRCoreEngine &Eng;
+class CallEnterNodeBuilder {
+  CoreEngine &Eng;
 
   const ExplodedNode *Pred;
 
@@ -498,7 +498,7 @@ class GRCallEnterNodeBuilder {
   unsigned Index;
 
 public:
-  GRCallEnterNodeBuilder(GRCoreEngine &eng, const ExplodedNode *pred, 
+  CallEnterNodeBuilder(CoreEngine &eng, const ExplodedNode *pred, 
                          const Stmt *s, const StackFrameContext *callee, 
                          const CFGBlock *blk, unsigned idx)
     : Eng(eng), Pred(pred), CE(s), CalleeCtx(callee), Block(blk), Index(idx) {}
@@ -520,12 +520,12 @@ public:
   void generateNode(const GRState *state);
 };
 
-class GRCallExitNodeBuilder {
-  GRCoreEngine &Eng;
+class CallExitNodeBuilder {
+  CoreEngine &Eng;
   const ExplodedNode *Pred;
 
 public:
-  GRCallExitNodeBuilder(GRCoreEngine &eng, const ExplodedNode *pred)
+  CallExitNodeBuilder(CoreEngine &eng, const ExplodedNode *pred)
     : Eng(eng), Pred(pred) {}
 
   const ExplodedNode *getPredecessor() const { return Pred; }
index 778d509e68d1328d8cf2d424e5cd8732e1951a19..a185a13b3aa7aaf5f82aa2f7a2d32334d75aeb98 100644 (file)
@@ -49,12 +49,12 @@ class ExplodedGraph;
 
 class ExplodedNode : public llvm::FoldingSetNode {
   friend class ExplodedGraph;
-  friend class GRCoreEngine;
-  friend class GRStmtNodeBuilder;
-  friend class GRBranchNodeBuilder;
-  friend class GRIndirectGotoNodeBuilder;
-  friend class GRSwitchNodeBuilder;
-  friend class GREndPathNodeBuilder;
+  friend class CoreEngine;
+  friend class StmtNodeBuilder;
+  friend class BranchNodeBuilder;
+  friend class IndirectGotoNodeBuilder;
+  friend class SwitchNodeBuilder;
+  friend class EndPathNodeBuilder;
 
   class NodeGroup {
     enum { Size1 = 0x0, SizeOther = 0x1, AuxFlag = 0x2, Mask = 0x3 };
@@ -219,7 +219,7 @@ public:
 
 class ExplodedGraph {
 protected:
-  friend class GRCoreEngine;
+  friend class CoreEngine;
 
   // Type definitions.
   typedef llvm::SmallVector<ExplodedNode*,2>    RootsTy;
similarity index 86%
rename from include/clang/GR/PathSensitive/GRExprEngine.h
rename to include/clang/GR/PathSensitive/ExprEngine.h
index 8498065ce3c54d37d0a00b21e9c1f2c9edd2be95..c61c251e12907f8fceaf4de2fb7702b95968fed8 100644 (file)
@@ -1,4 +1,4 @@
-//===-- GRExprEngine.h - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=
+//===-- ExprEngine.h - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -8,19 +8,19 @@
 //===----------------------------------------------------------------------===//
 //
 //  This file defines a meta-engine for path-sensitive dataflow analysis that
-//  is built on GRCoreEngine, but provides the boilerplate to execute transfer
+//  is built on CoreEngine, but provides the boilerplate to execute transfer
 //  functions and build the ExplodedGraph at the expression level.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_GR_GREXPRENGINE
-#define LLVM_CLANG_GR_GREXPRENGINE
+#ifndef LLVM_CLANG_GR_EXPRENGINE
+#define LLVM_CLANG_GR_EXPRENGINE
 
 #include "clang/GR/PathSensitive/AnalysisManager.h"
-#include "clang/GR/PathSensitive/GRSubEngine.h"
-#include "clang/GR/PathSensitive/GRCoreEngine.h"
+#include "clang/GR/PathSensitive/SubEngine.h"
+#include "clang/GR/PathSensitive/CoreEngine.h"
 #include "clang/GR/PathSensitive/GRState.h"
-#include "clang/GR/PathSensitive/GRTransferFuncs.h"
+#include "clang/GR/PathSensitive/TransferFuncs.h"
 #include "clang/GR/BugReporter/BugReporter.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/ExprObjC.h"
@@ -36,17 +36,17 @@ namespace GR {
 class AnalysisManager;
 class Checker;
 
-class GRExprEngine : public GRSubEngine {
+class ExprEngine : public SubEngine {
   AnalysisManager &AMgr;
 
-  GRCoreEngine CoreEngine;
+  CoreEngine Engine;
 
   /// G - the simulation graph.
   ExplodedGraph& G;
 
-  /// Builder - The current GRStmtNodeBuilder which is used when building the
+  /// Builder - The current StmtNodeBuilder which is used when building the
   ///  nodes for a given statement.
-  GRStmtNodeBuilder* Builder;
+  StmtNodeBuilder* Builder;
 
   /// StateMgr - Object that manages the data for all created states.
   GRStateManager StateMgr;
@@ -109,18 +109,18 @@ class GRExprEngine : public GRSubEngine {
 
   /// The BugReporter associated with this engine.  It is important that
   ///  this object be placed at the very end of member variables so that its
-  ///  destructor is called before the rest of the GRExprEngine is destroyed.
+  ///  destructor is called before the rest of the ExprEngine is destroyed.
   GRBugReporter BR;
   
-  llvm::OwningPtr<GRTransferFuncs> TF;
+  llvm::OwningPtr<TransferFuncs> TF;
 
 public:
-  GRExprEngine(AnalysisManager &mgr, GRTransferFuncs *tf);
+  ExprEngine(AnalysisManager &mgr, TransferFuncs *tf);
 
-  ~GRExprEngine();
+  ~ExprEngine();
 
   void ExecuteWorkList(const LocationContext *L, unsigned Steps = 150000) {
-    CoreEngine.ExecuteWorkList(L, Steps, 0);
+    Engine.ExecuteWorkList(L, Steps, 0);
   }
 
   /// Execute the work list with an initial state. Nodes that reaches the exit
@@ -129,7 +129,7 @@ public:
   void ExecuteWorkListWithInitialState(const LocationContext *L, unsigned Steps,
                                        const GRState *InitState, 
                                        ExplodedNodeSet &Dst) {
-    CoreEngine.ExecuteWorkListWithInitialState(L, Steps, InitState, Dst);
+    Engine.ExecuteWorkListWithInitialState(L, Steps, InitState, Dst);
   }
 
   /// getContext - Return the ASTContext associated with this analysis.
@@ -139,14 +139,14 @@ public:
 
   SValBuilder &getSValBuilder() { return svalBuilder; }
 
-  GRTransferFuncs& getTF() { return *TF; }
+  TransferFuncs& getTF() { return *TF; }
 
   BugReporter& getBugReporter() { return BR; }
 
-  GRStmtNodeBuilder &getBuilder() { assert(Builder); return *Builder; }
+  StmtNodeBuilder &getBuilder() { assert(Builder); return *Builder; }
 
-  // FIXME: Remove once GRTransferFuncs is no longer referenced.
-  void setTransferFunction(GRTransferFuncs* tf);
+  // FIXME: Remove once TransferFuncs is no longer referenced.
+  void setTransferFunction(TransferFuncs* tf);
 
   /// ViewGraph - Visualize the ExplodedGraph created by executing the
   ///  simulation.
@@ -176,53 +176,53 @@ public:
      return static_cast<CHECKER*>(lookupChecker(CHECKER::getTag()));
   }
 
-  /// ProcessElement - Called by GRCoreEngine. Used to generate new successor
+  /// ProcessElement - Called by CoreEngine. Used to generate new successor
   ///  nodes by processing the 'effects' of a CFG element.
-  void ProcessElement(const CFGElement E, GRStmtNodeBuilder& builder);
+  void ProcessElement(const CFGElement E, StmtNodeBuilder& builder);
 
-  void ProcessStmt(const CFGStmt S, GRStmtNodeBuilder &builder);
+  void ProcessStmt(const CFGStmt S, StmtNodeBuilder &builder);
 
-  void ProcessInitializer(const CFGInitializer I, GRStmtNodeBuilder &builder);
+  void ProcessInitializer(const CFGInitializer I, StmtNodeBuilder &builder);
 
-  void ProcessImplicitDtor(const CFGImplicitDtor D, GRStmtNodeBuilder &builder);
+  void ProcessImplicitDtor(const CFGImplicitDtor D, StmtNodeBuilder &builder);
 
   void ProcessAutomaticObjDtor(const CFGAutomaticObjDtor D, 
-                            GRStmtNodeBuilder &builder);
-  void ProcessBaseDtor(const CFGBaseDtor D, GRStmtNodeBuilder &builder);
-  void ProcessMemberDtor(const CFGMemberDtor D, GRStmtNodeBuilder &builder);
+                            StmtNodeBuilder &builder);
+  void ProcessBaseDtor(const CFGBaseDtor D, StmtNodeBuilder &builder);
+  void ProcessMemberDtor(const CFGMemberDtor D, StmtNodeBuilder &builder);
   void ProcessTemporaryDtor(const CFGTemporaryDtor D, 
-                            GRStmtNodeBuilder &builder);
+                            StmtNodeBuilder &builder);
 
-  /// ProcessBlockEntrance - Called by GRCoreEngine when start processing
+  /// ProcessBlockEntrance - Called by CoreEngine when start processing
   ///  a CFGBlock.  This method returns true if the analysis should continue
   ///  exploring the given path, and false otherwise.
   bool ProcessBlockEntrance(const CFGBlock* B, const ExplodedNode *Pred,
-                            GRBlockCounter BC);
+                            BlockCounter BC);
 
-  /// ProcessBranch - Called by GRCoreEngine.  Used to generate successor
+  /// ProcessBranch - Called by CoreEngine.  Used to generate successor
   ///  nodes by processing the 'effects' of a branch condition.
   void ProcessBranch(const Stmt* Condition, const Stmt* Term, 
-                     GRBranchNodeBuilder& builder);
+                     BranchNodeBuilder& builder);
 
-  /// 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 ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder);
+  void ProcessIndirectGoto(IndirectGotoNodeBuilder& builder);
 
-  /// 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 ProcessSwitch(GRSwitchNodeBuilder& builder);
+  void ProcessSwitch(SwitchNodeBuilder& builder);
 
-  /// 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 ProcessEndPath(GREndPathNodeBuilder& builder);
+  void ProcessEndPath(EndPathNodeBuilder& builder);
 
   /// Generate the entry node of the callee.
-  void ProcessCallEnter(GRCallEnterNodeBuilder &builder);
+  void ProcessCallEnter(CallEnterNodeBuilder &builder);
 
   /// Generate the first post callsite node.
-  void ProcessCallExit(GRCallExitNodeBuilder &builder);
+  void ProcessCallExit(CallExitNodeBuilder &builder);
 
-  /// Called by GRCoreEngine when the analysis worklist has terminated.
+  /// Called by CoreEngine when the analysis worklist has terminated.
   void ProcessEndWorklist(bool hasWorkRemaining);
 
   /// evalAssume - Callback function invoked by the ConstraintManager when
@@ -260,13 +260,13 @@ public:
   const SymbolManager& getSymbolManager() const { return SymMgr; }
 
   // Functions for external checking of whether we have unfinished work
-  bool wasBlockAborted() const { return CoreEngine.wasBlockAborted(); }
-  bool hasEmptyWorkList() const { return !CoreEngine.getWorkList()->hasWork(); }
+  bool wasBlockAborted() const { return Engine.wasBlockAborted(); }
+  bool hasEmptyWorkList() const { return !Engine.getWorkList()->hasWork(); }
   bool hasWorkRemaining() const {
-    return wasBlockAborted() || CoreEngine.getWorkList()->hasWork();
+    return wasBlockAborted() || Engine.getWorkList()->hasWork();
   }
 
-  const GRCoreEngine &getCoreEngine() const { return CoreEngine; }
+  const CoreEngine &getCoreEngine() const { return Engine; }
 
 protected:
   const GRState* GetState(ExplodedNode* N) {
@@ -494,7 +494,7 @@ public:
 protected:
   void evalObjCMessageExpr(ExplodedNodeSet& Dst, const ObjCMessageExpr* ME, 
                            ExplodedNode* Pred, const GRState *state) {
-    assert (Builder && "GRStmtNodeBuilder must be defined.");
+    assert (Builder && "StmtNodeBuilder must be defined.");
     getTF().evalObjCMessageExpr(Dst, *this, *Builder, ME, Pred, state);
   }
 
similarity index 72%
rename from include/clang/GR/PathSensitive/GRExprEngineBuilders.h
rename to include/clang/GR/PathSensitive/ExprEngineBuilders.h
index bb104f4fb3fdf2ab439b41e41bf12f2b464163cb..e6af5a821502aafb5ea218623f752c101823dd84 100644 (file)
@@ -1,4 +1,4 @@
-//===-- GRExprEngineBuilders.h - "Builder" classes for GRExprEngine -*- C++ -*-=
+//===-- ExprEngineBuilders.h - "Builder" classes for ExprEngine ---*- C++ -*-=//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -8,23 +8,23 @@
 //===----------------------------------------------------------------------===//
 //
 //  This file defines smart builder "references" which are used to marshal
-//  builders between GRExprEngine objects and their related components.
+//  builders between ExprEngine objects and their related components.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_GR_GREXPRENGINE_BUILDERS
-#define LLVM_CLANG_GR_GREXPRENGINE_BUILDERS
-#include "clang/GR/PathSensitive/GRExprEngine.h"
+#ifndef LLVM_CLANG_GR_EXPRENGINE_BUILDERS
+#define LLVM_CLANG_GR_EXPRENGINE_BUILDERS
+#include "clang/GR/PathSensitive/ExprEngine.h"
 #include "clang/Analysis/Support/SaveAndRestore.h"
 
 namespace clang {
 
 namespace GR {
 
-class GRStmtNodeBuilderRef {
+class StmtNodeBuilderRef {
   ExplodedNodeSet &Dst;
-  GRStmtNodeBuilder &B;
-  GRExprEngine& Eng;
+  StmtNodeBuilder &B;
+  ExprEngine& Eng;
   ExplodedNode* Pred;
   const GRState* state;
   const Stmt* stmt;
@@ -35,14 +35,14 @@ class GRStmtNodeBuilderRef {
   SaveOr OldHasGen;
 
 private:
-  friend class GRExprEngine;
+  friend class ExprEngine;
 
-  GRStmtNodeBuilderRef(); // do not implement
-  void operator=(const GRStmtNodeBuilderRef&); // do not implement
+  StmtNodeBuilderRef(); // do not implement
+  void operator=(const StmtNodeBuilderRef&); // do not implement
 
-  GRStmtNodeBuilderRef(ExplodedNodeSet &dst,
-                       GRStmtNodeBuilder &builder,
-                       GRExprEngine& eng,
+  StmtNodeBuilderRef(ExplodedNodeSet &dst,
+                       StmtNodeBuilder &builder,
+                       ExprEngine& eng,
                        ExplodedNode* pred,
                        const GRState *st,
                        const Stmt* s, bool auto_create_node)
@@ -52,7 +52,7 @@ private:
 
 public:
 
-  ~GRStmtNodeBuilderRef() {
+  ~StmtNodeBuilderRef() {
     // Handle the case where no nodes where generated.  Auto-generate that
     // contains the updated state if we aren't generating sinks.
     if (!B.BuildSinks && Dst.size() == OldSize && !B.HasGeneratedNode) {
index 4dfa65b5e42f03a9554479c3c27dfffd75dce851..f540fd2ee253868f793c978ce8c501699e7694c0 100644 (file)
@@ -37,7 +37,7 @@ class GRStateManager;
 class Checker;
 
 typedef ConstraintManager* (*ConstraintManagerCreator)(GRStateManager&,
-                                                       GRSubEngine&);
+                                                       SubEngine&);
 typedef StoreManager* (*StoreManagerCreator)(GRStateManager&);
 
 //===----------------------------------------------------------------------===//
@@ -153,7 +153,7 @@ public:
   // As constraints gradually accrue on symbolic values, added constraints
   // may conflict and indicate that a state is infeasible (as no real values
   // could satisfy all the constraints).  This is the principal mechanism
-  // for modeling path-sensitivity in GRExprEngine/GRState.
+  // for modeling path-sensitivity in ExprEngine/GRState.
   //
   // Various "assume" methods form the interface for adding constraints to
   // symbolic values.  A call to 'assume' indicates an assumption being placed
@@ -403,10 +403,10 @@ public:
 
 class GRStateManager {
   friend class GRState;
-  friend class GRExprEngine; // FIXME: Remove.
+  friend class ExprEngine; // FIXME: Remove.
 private:
-  /// Eng - The GRSubEngine that owns this state manager.
-  GRSubEngine &Eng;
+  /// Eng - The SubEngine that owns this state manager.
+  SubEngine &Eng;
 
   EnvironmentManager                   EnvMgr;
   llvm::OwningPtr<StoreManager>        StoreMgr;
@@ -436,7 +436,7 @@ public:
                  StoreManagerCreator CreateStoreManager,
                  ConstraintManagerCreator CreateConstraintManager,
                  llvm::BumpPtrAllocator& alloc,
-                 GRSubEngine &subeng)
+                 SubEngine &subeng)
     : Eng(subeng),
       EnvMgr(alloc),
       GDMFactory(alloc),
@@ -482,7 +482,7 @@ public:
 
   StoreManager& getStoreManager() { return *StoreMgr; }
   ConstraintManager& getConstraintManager() { return *ConstraintMgr; }
-  GRSubEngine& getOwningEngine() { return Eng; }
+  SubEngine& getOwningEngine() { return Eng; }
 
   const GRState* RemoveDeadBindings(const GRState* St,
                                     const StackFrameContext *LCtx,
index 34f2b4d6885db9805533dc6d55c766a458bf9fe9..446ea080fde9a93efb8304debeea46e6b9f73570 100644 (file)
@@ -128,7 +128,7 @@ public:
     return UnknownVal();
   }
 
-  /// ArrayToPointer - Used by GRExprEngine::VistCast to handle implicit
+  /// ArrayToPointer - Used by ExprEngine::VistCast to handle implicit
   ///  conversions between arrays and pointers.
   virtual SVal ArrayToPointer(Loc Array) = 0;
 
@@ -148,7 +148,7 @@ public:
 
   const ElementRegion *GetElementZeroRegion(const MemRegion *R, QualType T);
 
-  /// CastRegion - Used by GRExprEngine::VisitCast to handle casts from
+  /// CastRegion - Used by ExprEngine::VisitCast to handle casts from
   ///  a MemRegion* to a specific location type.  'R' is the region being
   ///  casted and 'CastToTy' the result type of the cast.
   const MemRegion *CastRegion(const MemRegion *region, QualType CastToTy);
similarity index 65%
rename from include/clang/GR/PathSensitive/GRSubEngine.h
rename to include/clang/GR/PathSensitive/SubEngine.h
index 5c74968b91ace8fe58119d394342fa3e5fb29233..0539e7a4f779d293e42349184263f7395b21b58f 100644 (file)
@@ -1,4 +1,4 @@
-//== GRSubEngine.h - Interface of the subengine of GRCoreEngine ----*- C++ -*-//
+//== SubEngine.h - Interface of the subengine of CoreEngine --------*- C++ -*-//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,11 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file defines the interface of a subengine of the GRCoreEngine.
+// This file defines the interface of a subengine of the CoreEngine.
 //
 //===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_GR_GRSUBENGINE_H
-#define LLVM_CLANG_GR_GRSUBENGINE_H
+#ifndef LLVM_CLANG_GR_SUBENGINE_H
+#define LLVM_CLANG_GR_SUBENGINE_H
 
 #include "clang/GR/PathSensitive/SVals.h"
 
@@ -28,19 +28,19 @@ class AnalysisManager;
 class ExplodedNode;
 class GRState;
 class GRStateManager;
-class GRBlockCounter;
-class GRStmtNodeBuilder;
-class GRBranchNodeBuilder;
-class GRIndirectGotoNodeBuilder;
-class GRSwitchNodeBuilder;
-class GREndPathNodeBuilder;
-class GRCallEnterNodeBuilder;
-class GRCallExitNodeBuilder;
+class BlockCounter;
+class StmtNodeBuilder;
+class BranchNodeBuilder;
+class IndirectGotoNodeBuilder;
+class SwitchNodeBuilder;
+class EndPathNodeBuilder;
+class CallEnterNodeBuilder;
+class CallExitNodeBuilder;
 class MemRegion;
 
-class GRSubEngine {
+class SubEngine {
 public:
-  virtual ~GRSubEngine() {}
+  virtual ~SubEngine() {}
 
   virtual const GRState* getInitialState(const LocationContext *InitLoc) = 0;
 
@@ -48,38 +48,38 @@ public:
 
   virtual GRStateManager &getStateManager() = 0;
 
-  /// Called by GRCoreEngine. Used to generate new successor
+  /// Called by CoreEngine. Used to generate new successor
   /// nodes by processing the 'effects' of a block-level statement.
-  virtual void ProcessElement(const CFGElement E, GRStmtNodeBuilder& builder)=0;
+  virtual void ProcessElement(const CFGElement E, StmtNodeBuilder& builder)=0;
 
-  /// Called by GRCoreEngine when start processing
+  /// Called by CoreEngine when start processing
   /// a CFGBlock.  This method returns true if the analysis should continue
   /// exploring the given path, and false otherwise.
   virtual bool ProcessBlockEntrance(const CFGBlock* B, const ExplodedNode *Pred,
-                                    GRBlockCounter BC) = 0;
+                                    BlockCounter BC) = 0;
 
-  /// Called by GRCoreEngine.  Used to generate successor
+  /// Called by CoreEngine.  Used to generate successor
   ///  nodes by processing the 'effects' of a branch condition.
   virtual void ProcessBranch(const Stmt* Condition, const Stmt* Term,
-                             GRBranchNodeBuilder& builder) = 0;
+                             BranchNodeBuilder& builder) = 0;
 
-  /// Called by GRCoreEngine.  Used to generate successor
+  /// Called by CoreEngine.  Used to generate successor
   /// nodes by processing the 'effects' of a computed goto jump.
-  virtual void ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder) = 0;
+  virtual void ProcessIndirectGoto(IndirectGotoNodeBuilder& builder) = 0;
 
-  /// Called by GRCoreEngine.  Used to generate successor
+  /// Called by CoreEngine.  Used to generate successor
   /// nodes by processing the 'effects' of a switch statement.
-  virtual void ProcessSwitch(GRSwitchNodeBuilder& builder) = 0;
+  virtual void ProcessSwitch(SwitchNodeBuilder& builder) = 0;
 
-  /// 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.
-  virtual void ProcessEndPath(GREndPathNodeBuilder& builder) = 0;
+  virtual void ProcessEndPath(EndPathNodeBuilder& builder) = 0;
 
   // Generate the entry node of the callee.
-  virtual void ProcessCallEnter(GRCallEnterNodeBuilder &builder) = 0;
+  virtual void ProcessCallEnter(CallEnterNodeBuilder &builder) = 0;
 
   // Generate the first post callsite node.
-  virtual void ProcessCallExit(GRCallExitNodeBuilder &builder) = 0;
+  virtual void ProcessCallExit(CallExitNodeBuilder &builder) = 0;
 
   /// Called by ConstraintManager. Used to call checker-specific
   /// logic for handling assumptions on symbolic values.
@@ -101,7 +101,7 @@ public:
     return ProcessRegionChanges(state, &MR, &MR+1);
   }
 
-  /// Called by GRCoreEngine when the analysis worklist is either empty or the
+  /// Called by CoreEngine when the analysis worklist is either empty or the
   //  maximum number of analysis steps have been reached.
   virtual void ProcessEndWorklist(bool hasWorkRemaining) = 0;
 };
index 045534bf25cd7c09204495045f9062086ab057b6..cab35057b042519ea0f0671253e16f788a4f0d29 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
 
similarity index 62%
rename from include/clang/GR/PathSensitive/GRTransferFuncs.h
rename to include/clang/GR/PathSensitive/TransferFuncs.h
index 268f168b46cb7fdfa3edb42bde0a808141f33d6a..10f46c440c2c5292056c46e15ac6c80695d08b1f 100644 (file)
@@ -1,4 +1,4 @@
-//== GRTransferFuncs.h - Path-Sens. Transfer Functions Interface -*- C++ -*--=//
+//== TransferFuncs.h - Path-Sens. Transfer Functions Interface ---*- C++ -*--=//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 //
-//  This file defines GRTransferFuncs, which provides a base-class that
-//  defines an interface for transfer functions used by GRExprEngine.
+//  This file defines TransferFuncs, which provides a base-class that
+//  defines an interface for transfer functions used by ExprEngine.
 //
 //===----------------------------------------------------------------------===//
 
@@ -25,56 +25,56 @@ class ObjCMessageExpr;
 namespace GR {
 class ExplodedNode;
 class ExplodedNodeSet;
-class GREndPathNodeBuilder;
-class GRExprEngine;
-class GRStmtNodeBuilder;
-class GRStmtNodeBuilderRef;
+class EndPathNodeBuilder;
+class ExprEngine;
+class StmtNodeBuilder;
+class StmtNodeBuilderRef;
 
-class GRTransferFuncs {
+class TransferFuncs {
 public:
-  GRTransferFuncs() {}
-  virtual ~GRTransferFuncs() {}
+  TransferFuncs() {}
+  virtual ~TransferFuncs() {}
 
   virtual void RegisterPrinters(std::vector<GRState::Printer*>& Printers) {}
-  virtual void RegisterChecks(GRExprEngine& Eng) {}
+  virtual void RegisterChecks(ExprEngine& Eng) {}
 
 
   // Calls.
 
   virtual void evalCall(ExplodedNodeSet& Dst,
-                        GRExprEngine& Engine,
-                        GRStmtNodeBuilder& Builder,
+                        ExprEngine& Engine,
+                        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 and dead symbol notification.
 
-  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) {}
 
   // Return statements.
   virtual void evalReturn(ExplodedNodeSet& Dst,
-                          GRExprEngine& Engine,
-                          GRStmtNodeBuilder& Builder,
+                          ExprEngine& Engine,
+                          StmtNodeBuilder& Builder,
                           const ReturnStmt* S,
                           ExplodedNode* Pred) {}
 
similarity index 53%
rename from include/clang/GR/PathSensitive/GRWorkList.h
rename to include/clang/GR/PathSensitive/WorkList.h
index 87a3b364b6a4514ac3d9becdc25c536fed05d1c1..6e354008cc4324c1ac7c59b94e3ce0cd0441bb13 100644 (file)
@@ -1,4 +1,4 @@
-//==- GRWorkList.h - Worklist class used by GRCoreEngine -----------*- C++ -*-//
+//==- WorkList.h - Worklist class used by CoreEngine ---------------*- C++ -*-//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,15 +7,15 @@
 //
 //===----------------------------------------------------------------------===//
 //
-//  This file defines GRWorkList, a pure virtual class that represents an opaque
-//  worklist used by GRCoreEngine to explore the reachability state space.
+//  This file defines WorkList, a pure virtual class that represents an opaque
+//  worklist used by CoreEngine to explore the reachability state space.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_GR_GRWORKLIST
-#define LLVM_CLANG_GR_GRWORKLIST
+#ifndef LLVM_CLANG_GR_WORKLIST
+#define LLVM_CLANG_GR_WORKLIST
 
-#include "clang/GR/PathSensitive/GRBlockCounter.h"
+#include "clang/GR/PathSensitive/BlockCounter.h"
 #include <cstddef>
 
 namespace clang {
@@ -27,64 +27,64 @@ namespace GR {
 class ExplodedNode;
 class ExplodedNodeImpl;
 
-class GRWorkListUnit {
+class WorkListUnit {
   ExplodedNode* Node;
-  GRBlockCounter Counter;
+  BlockCounter Counter;
   const CFGBlock* Block;
   unsigned BlockIdx; // This is the index of the next statement.
 
 public:
-  GRWorkListUnit(ExplodedNode* N, GRBlockCounter C,
+  WorkListUnit(ExplodedNode* N, BlockCounter C,
                  const CFGBlock* B, unsigned idx)
   : Node(N),
     Counter(C),
     Block(B),
     BlockIdx(idx) {}
 
-  explicit GRWorkListUnit(ExplodedNode* N, GRBlockCounter C)
+  explicit WorkListUnit(ExplodedNode* N, BlockCounter C)
   : Node(N),
     Counter(C),
     Block(NULL),
     BlockIdx(0) {}
 
   ExplodedNode* getNode()         const { return Node; }
-  GRBlockCounter    getBlockCounter() const { return Counter; }
+  BlockCounter    getBlockCounter() const { return Counter; }
   const CFGBlock*   getBlock()        const { return Block; }
   unsigned          getIndex()        const { return BlockIdx; }
 };
 
-class GRWorkList {
-  GRBlockCounter CurrentCounter;
+class WorkList {
+  BlockCounter CurrentCounter;
 public:
-  virtual ~GRWorkList();
+  virtual ~WorkList();
   virtual bool hasWork() const = 0;
 
-  virtual void Enqueue(const GRWorkListUnit& U) = 0;
+  virtual void Enqueue(const WorkListUnit& U) = 0;
 
   void Enqueue(ExplodedNode* N, const CFGBlock* B, unsigned idx) {
-    Enqueue(GRWorkListUnit(N, CurrentCounter, B, idx));
+    Enqueue(WorkListUnit(N, CurrentCounter, B, idx));
   }
 
   void Enqueue(ExplodedNode* N) {
-    Enqueue(GRWorkListUnit(N, CurrentCounter));
+    Enqueue(WorkListUnit(N, CurrentCounter));
   }
 
-  virtual GRWorkListUnit Dequeue() = 0;
+  virtual WorkListUnit Dequeue() = 0;
 
-  void setBlockCounter(GRBlockCounter C) { CurrentCounter = C; }
-  GRBlockCounter getBlockCounter() const { return CurrentCounter; }
+  void setBlockCounter(BlockCounter C) { CurrentCounter = C; }
+  BlockCounter getBlockCounter() const { return CurrentCounter; }
 
   class Visitor {
   public:
     Visitor() {}
     virtual ~Visitor();
-    virtual bool Visit(const GRWorkListUnit &U) = 0;
+    virtual bool Visit(const WorkListUnit &U) = 0;
   };
   virtual bool VisitItemsInWorkList(Visitor &V) = 0;
   
-  static GRWorkList *MakeDFS();
-  static GRWorkList *MakeBFS();
-  static GRWorkList *MakeBFSBlockDFSContents();
+  static WorkList *MakeDFS();
+  static WorkList *MakeBFS();
+  static WorkList *MakeBFSBlockDFSContents();
 };
 
 } // end GR namespace
index 7f873bc14d5fdc1af3042c90f8725116f6c75fa7..45022986de7cbc979562758c6be65436d71fc002 100644 (file)
@@ -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 @@ namespace {
 /// 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 @@ void AggExprVisitor::VisitCXXConstructExpr(CXXConstructExpr *E) {
   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));
 }
index 0b2845119ab4e5409c79370029879c68c5ae3a64..f8a433943a1d1785b55a36727c46f6e244ae7fae 100644 (file)
 #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 ActionWarnUninitVals(AnalysisConsumer &C, AnalysisManager& mgr,
 }
 
 
-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 ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr,
 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,
index cc9fcb7a472cdd7e4366bfa44407f041fa720e76..c60b4504b2a6e2d94949faf7aef97531e18fcd82 100644 (file)
@@ -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 @@ namespace {
 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 @@ void *AnalyzerStatsChecker::getTag() {
   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 @@ void AnalyzerStatsChecker::VisitEndAnalysis(ExplodedGraph &G,
       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;
index ac289b89c2eb13159a3b16dd3828f2d241eba16e..2de0d9a23cc44657d568939fe577489cf27d1410 100644 (file)
@@ -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 @@ class BasicConstraintManager
   : 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 @@ public:
 } // end anonymous namespace
 
 ConstraintManager* GR::CreateBasicConstraintManager(GRStateManager& statemgr,
-                                                       GRSubEngine &subengine) {
+                                                       SubEngine &subengine) {
   return new BasicConstraintManager(statemgr, subengine);
 }
 
index 2a673e249662a9a4b86f1e758335359c69538ec8..1c8ab11a96b685c1041f9c63ca75385c57dbd8e8 100644 (file)
@@ -68,7 +68,7 @@ public:
     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; }
 
index 6e94a2a91e17eba7876d98a0b98870266ce4ccce..7e45a15a9c0a41b16aebfa8a51b2ec6e64322107 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
similarity index 74%
rename from lib/GR/GRBlockCounter.cpp
rename to lib/GR/BlockCounter.cpp
index 8a026b1ed4b3932ea67bde70a2c6d8cfaed15481..ee76e7a2bc1db71db0cbe65eca621d2a894bdc8f 100644 (file)
@@ -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 @@ static inline CountMap::Factory& GetFactory(void* F) {
   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());
 }
index 432182313b1b3539d6dff76d395c1d3d896fa85f..dedbd702bc8f682635b176103c02e94f813b1e9a 100644 (file)
@@ -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"
index 55d11a57b43929e4e55cda1ecac3b9e5dde39b65..a99019cf373b63584262808f82f54aae69bead70 100644 (file)
@@ -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 @@ ResolveToInterfaceMethodDecl(const ObjCMethodDecl *MD) {
 
 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 @@ static const GRState * SendAutorelease(const GRState *state,
 
 namespace {
 
-class CFRefCount : public GRTransferFuncs {
+class CFRefCount : public TransferFuncs {
 public:
   class BindingsPrinter : public GRState::Printer {
   public:
@@ -1648,7 +1648,7 @@ private:
                     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 @@ private:
   ExplodedNode* ProcessLeaks(const GRState * state,
                                       llvm::SmallVectorImpl<SymbolRef> &Leaked,
                                       GenericNodeBuilder &Builder,
-                                      GRExprEngine &Eng,
+                                      ExprEngine &Eng,
                                       ExplodedNode *Pred = 0);
 
 public:
@@ -1673,7 +1673,7 @@ public:
 
   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 @@ public:
   // 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 @@ public:
                    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 @@ namespace {
   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::getEndPath(BugReporterContext& BRC,
 
 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 @@ static QualType GetReturnType(const Expr* RetE, ASTContext& Ctx) {
 }
 
 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::evalSummary(ExplodedNodeSet& Dst,
 
 
 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::evalCall(ExplodedNodeSet& Dst,
 }
 
 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 @@ public:
 } // 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 @@ void CFRefCount::evalBind(GRStmtNodeBuilderRef& B, SVal location, SVal val) {
  // Return statements.
 
 void CFRefCount::evalReturn(ExplodedNodeSet& Dst,
-                            GRExprEngine& Eng,
-                            GRStmtNodeBuilder& Builder,
+                            ExprEngine& Eng,
+                            StmtNodeBuilder& Builder,
                             const ReturnStmt* S,
                             ExplodedNode* Pred) {
 
@@ -3141,7 +3141,7 @@ const GRState * CFRefCount::Update(const GRState * state, SymbolRef sym,
 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 @@ ExplodedNode*
 CFRefCount::ProcessLeaks(const GRState * state,
                          llvm::SmallVectorImpl<SymbolRef> &Leaked,
                          GenericNodeBuilder &Builder,
-                         GRExprEngine& Eng,
+                         ExprEngine& Eng,
                          ExplodedNode *Pred) {
 
   if (Leaked.empty())
@@ -3249,8 +3249,8 @@ CFRefCount::ProcessLeaks(const GRState * state,
   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::evalEndPath(GRExprEngine& Eng,
 }
 
 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::evalDeadSymbols(ExplodedNodeSet& Dst,
 }
 
 void CFRefCount::ProcessNonLeakError(ExplodedNodeSet& Dst,
-                                     GRStmtNodeBuilder& Builder,
+                                     StmtNodeBuilder& Builder,
                                      const Expr* NodeExpr, 
                                      SourceRange ErrorRange,
                                      ExplodedNode* Pred,
@@ -3430,7 +3430,7 @@ void RetainReleaseChecker::PostVisitBlockExpr(CheckerContext &C,
 // 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 @@ void CFRefCount::RegisterChecks(GRExprEngine& Eng) {
   // 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);
 }
index 9cf7a3dcb2e0eb06d02c37e5d543251905ec24ee..3b44fe3e4651c4f377c79daad77308b3bf3bc458 100644 (file)
@@ -19,10 +19,10 @@ add_clang_library(clangGRCore
   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
similarity index 92%
rename from lib/GR/GRCXXExprEngine.cpp
rename to lib/GR/CXXExprEngine.cpp
index 24629551793bedde19102c07c8f4765ecb861898..b1111c90fe503167e3be587ad008fd2aceeb3b49 100644 (file)
@@ -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 @@ public:
 };
 }
 
-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 @@ void GRExprEngine::evalArguments(ConstExprIterator AI, ConstExprIterator AE,
   }
 }
 
-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::CreateCXXTemporaryObject(const Expr *Ex, ExplodedNode *Pred,
   }
 }
 
-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::VisitCXXConstructExpr(const CXXConstructExpr *E,
   }
 }
 
-void GRExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD,
+void ExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD,
                                       const MemRegion *Dest,
                                       const Stmt *S,
                                       ExplodedNode *Pred, 
@@ -171,7 +171,7 @@ void GRExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD,
     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 @@ void GRExprEngine::VisitCXXMemberCallExpr(const CXXMemberCallExpr *MCE,
   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 @@ void GRExprEngine::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *C,
   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::evalMethodCall(const CallExpr *MCE, const CXXMethodDecl *MD,
   }
 }
 
-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::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred,
   }
 }
 
-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::VisitCXXDeleteExpr(const CXXDeleteExpr *CDE,
   }
 }
 
-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 =
index d9cfd3cac845d00662ba7318e270464b0b3020ae..3c78b39d207793e8583bb06515b3126a71dc7ef7 100644 (file)
@@ -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 @@ public:
 };
 }
 
-void GR::RegisterAdjustedReturnValueChecker(GRExprEngine &Eng) {
+void GR::RegisterAdjustedReturnValueChecker(ExprEngine &Eng) {
   Eng.registerCheck(new AdjustedReturnValueChecker());
 }
 
index f97adf3d145c96f893840c96f603cc04846b3b39..9dc53a2360b96d879ec38539645e41dba7486c71 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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 @@ public:
 };
 }
 
-void GR::RegisterArrayBoundChecker(GRExprEngine &Eng) {
+void GR::RegisterArrayBoundChecker(ExprEngine &Eng) {
   Eng.registerCheck(new ArrayBoundChecker());
 }
 
index baf209e3c866cd4183a207c5782d561023f802e5..74eb882d545c2ef9e76ad4d9091da5527c838708 100644 (file)
@@ -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 @@ public:
 };
 } // end anonymous namespace
 
-void GR::RegisterAttrNonNullChecker(GRExprEngine &Eng) {
+void GR::RegisterAttrNonNullChecker(ExprEngine &Eng) {
   Eng.registerCheck(new AttrNonNullChecker());
 }
 
index 93c8babde133b9e3ca4d715c1318822e2aec215d..33a58bdec9ab76cb8bba8a425781a39ad90ecbf3 100644 (file)
@@ -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 @@ void ClassReleaseChecker::PreVisitObjCMessageExpr(CheckerContext &C,
 // 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);
index 7fdccdcacb8a8b732ad244b949ba9efc18ccd539..63143ebe252620d358fecab3f7a764adb6afc3c3 100644 (file)
@@ -24,10 +24,10 @@ class Decl;
 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
 
index dc55a65ff5a4fee4a2bf968a906fbc3de294cb68..27162e40af9ddd88858e4a398a5a616d2f7d432b 100644 (file)
@@ -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 @@ public:
 
 }
 
-void GR::RegisterBuiltinFunctionChecker(GRExprEngine &Eng) {
+void GR::RegisterBuiltinFunctionChecker(ExprEngine &Eng) {
   Eng.registerCheck(new BuiltinFunctionChecker());
 }
 
index 700adb544b8d214cd568ac47b236eb1a402c5920..cae050d94cbcca0be1529ccfa4b1e597d4357fd2 100644 (file)
@@ -17,7 +17,7 @@ add_clang_library(clangGRCheckers
   DereferenceChecker.cpp
   DivZeroChecker.cpp
   FixedAddressChecker.cpp
-  GRExprEngineExperimentalChecks.cpp
+  ExprEngineExperimentalChecks.cpp
   IdempotentOperationChecker.cpp
   LLVMConventionsChecker.cpp
   MacOSXAPIChecker.cpp
index da0bba3741659aef14941e58f10baeca551b27f2..a9d3064fcaf0bcabf8036cf10523ed5ace3231fd 100644 (file)
@@ -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 @@ namespace GR {
 }
 }
 
-void GR::RegisterCStringChecker(GRExprEngine &Eng) {
+void GR::RegisterCStringChecker(ExprEngine &Eng) {
   Eng.registerCheck(new CStringChecker());
 }
 
index 8b8f75faf68e5828d66a05d98928a94ca05e27b7..f3306d136bc0c7b544125f585b7d7fcd78ac77c4 100644 (file)
@@ -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 @@ private:
 };
 } // end anonymous namespace
 
-void GR::RegisterCallAndMessageChecker(GRExprEngine &Eng) {
+void GR::RegisterCallAndMessageChecker(ExprEngine &Eng) {
   Eng.registerCheck(new CallAndMessageChecker());
 }
 
index bcbb89441f46ad888351eedcfa9275afc2ca3495..c17dc7a266e90dde04a615956aa2f326bca29247 100644 (file)
@@ -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 CastSizeChecker::PreVisitCastExpr(CheckerContext &C, const CastExpr *CE) {
 }
 
 
-void GR::RegisterCastSizeChecker(GRExprEngine &Eng) {
+void GR::RegisterCastSizeChecker(ExprEngine &Eng) {
   Eng.registerCheck(new CastSizeChecker());
 }
index 0bcba284b86ed85d9d081bae3e5e14aa51a29db9..7b0732938c190495d0f13f5877eff54aeb100118 100644 (file)
@@ -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 CastToStructChecker::PreVisitCastExpr(CheckerContext &C,
   }
 }
 
-void GR::RegisterCastToStructChecker(GRExprEngine &Eng) {
+void GR::RegisterCastToStructChecker(ExprEngine &Eng) {
   Eng.registerCheck(new CastToStructChecker());
 }
index 44fdb3afbba59d4c897f41c7aca5df8aaeeac435..edcf57ceca203e3aee7b684e3e10c30ab2b9012d 100644 (file)
@@ -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"
index f93ee7b94160b5da90b5709bc81bab366ce6223e..58b34d08520f1c325b2c05fa282c5a839fbb18ff 100644 (file)
@@ -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 @@ private:
 
 } // end anonymous namespace
 
-void GR::RegisterChrootChecker(GRExprEngine &Eng) {
+void GR::RegisterChrootChecker(ExprEngine &Eng) {
   Eng.registerCheck(new ChrootChecker());
 }
 
index 62b1f86fb48976b1202f0685b56df43dda9a1548..dbe0ab3262e4d7509709dad5a5ec00b907c340c6 100644 (file)
@@ -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 @@ public:
 };
 } // 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,
index a4cb1a4a13060eec1f568fd3abde4539aab1b731..1475a9e1cd3618c39d2e14f4ca558278c979b088 100644 (file)
@@ -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 @@ public:
 };  
 } // end anonymous namespace
 
-void GR::RegisterDivZeroChecker(GRExprEngine &Eng) {
+void GR::RegisterDivZeroChecker(ExprEngine &Eng) {
   Eng.registerCheck(new DivZeroChecker());
 }
 
similarity index 78%
rename from lib/GR/Checkers/GRExprEngineExperimentalChecks.cpp
rename to lib/GR/Checkers/ExprEngineExperimentalChecks.cpp
index fd9bf5dd52086a745d80f7a70f1bd40b747d9bc7..d7ad99ffc22680ff895f8514497140539d48e5c4 100644 (file)
@@ -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 @@ void GR::RegisterExperimentalChecks(GRExprEngine &Eng) {
   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 (file)
index 0000000..4a04fb9
--- /dev/null
@@ -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 (file)
index 0000000..aa2f99b
--- /dev/null
@@ -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
index 4c7086f4f1e99ef8f4d60f87f033dbea396cb27c..d7caad17dab8eb7619055be1dfeb0f1e211f6539 100644 (file)
@@ -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 FixedAddressChecker::PreVisitBinaryOperator(CheckerContext &C,
   }
 }
 
-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 (file)
index 54a6125..0000000
+++ /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 (file)
index cba419a..0000000
+++ /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
index b28edc3b12dbe90afb39c5760e92cce20a8d3919..15e9be9580405dd60fc85fca3e7fbd85a06d4493 100644 (file)
 // - 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 @@ public:
   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 @@ private:
   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 @@ void *IdempotentOperationChecker::getTag() {
   return &x;
 }
 
-void GR::RegisterIdempotentOperationChecker(GRExprEngine &Eng) {
+void GR::RegisterIdempotentOperationChecker(ExprEngine &Eng) {
   Eng.registerCheck(new IdempotentOperationChecker());
 }
 
@@ -364,7 +364,7 @@ void IdempotentOperationChecker::PostVisitBinaryOperator(
 
 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 @@ bool IdempotentOperationChecker::PathWasCompletelyAnalyzed(
                                                        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 @@ bool IdempotentOperationChecker::PathWasCompletelyAnalyzed(
   
   // 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 @@ bool IdempotentOperationChecker::PathWasCompletelyAnalyzed(
     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)) {
index 316e37a40f48fa068857b4ff7f80da99ecd9a5fb..d7728713f885917b707d9133783731639d2d16c7 100644 (file)
@@ -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 @@ public:
 };
 } //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());
 }
index cd5f636e961a32ed445b1c0da9842085cded8229..bbfc7b076d316cc8ce9aaadfe6f2f12933ab1c63 100644 (file)
@@ -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 @@ public:
   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 @@ namespace GR {
 }
 }
 
-void GR::RegisterMallocChecker(GRExprEngine &Eng) {
+void GR::RegisterMallocChecker(ExprEngine &Eng) {
   Eng.registerCheck(new MallocChecker());
 }
 
@@ -593,8 +593,8 @@ void MallocChecker::evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper)
   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>();
index d6701c7142c9952f55e9c147822afb026c0ec1e1..beb4a81743b7b92f3208fed05df4d65da866f8a9 100644 (file)
@@ -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 @@ public:
 } // 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",
index 44715bf9f94f13cc9bbeb742e88e15cd8af0b2d8..3cfb044d6f89304f6bd510fd19a6b728167d785d 100644 (file)
@@ -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 @@ class NSErrorChecker : public BugType {
   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 @@ class NSErrorChecker : public BugType {
   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 @@ public:
 
 } // 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));
index 739460f781d7f0c712f65529df318cd8aa03e678..f6d33dbda8dae8ac2b47ef8ae9f0fda8d4edf24e 100644 (file)
@@ -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 @@ public:
 
 }
 
-void GR::RegisterNoReturnFunctionChecker(GRExprEngine &Eng) {
+void GR::RegisterNoReturnFunctionChecker(ExprEngine &Eng) {
   Eng.registerCheck(new NoReturnFunctionChecker());
 }
 
index 7df7a9eec040ce47652efee82bdd4fd5b904d4f5..c27e50880e1be03177d612ea77a3a3c077112202 100644 (file)
@@ -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 @@ private:
 
 }
 
-void GR::RegisterOSAtomicChecker(GRExprEngine &Eng) {
+void GR::RegisterOSAtomicChecker(ExprEngine &Eng) {
   Eng.registerCheck(new OSAtomicChecker());
 }
 
@@ -97,7 +97,7 @@ bool OSAtomicChecker::evalOSAtomicCompareAndSwap(CheckerContext &C,
   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);
index a3938627b1fdb9d85cacc216c5c63b894dce292e..40619a2a85326d36be74bc7252613ab322b4d57d 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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 @@ public:
 };
 } // 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());
index 485144a14217f7052445b9593fd4501779b75dc8..1f870052c161aa6d3aa757c40ba02669c81864fb 100644 (file)
@@ -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 PointerArithChecker::PreVisitBinaryOperator(CheckerContext &C,
   }
 }
 
-void GR::RegisterPointerArithChecker(GRExprEngine &Eng) {
+void GR::RegisterPointerArithChecker(ExprEngine &Eng) {
   Eng.registerCheck(new PointerArithChecker());
 }
index 44e3d9f009070da354c2d6233bb849209b9bee91..57ab31803ce080bc9fbbf435be8f6daae600f612 100644 (file)
@@ -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 PointerSubChecker::PreVisitBinaryOperator(CheckerContext &C,
   }
 }
 
-void GR::RegisterPointerSubChecker(GRExprEngine &Eng) {
+void GR::RegisterPointerSubChecker(ExprEngine &Eng) {
   Eng.registerCheck(new PointerSubChecker());
 }
index d880b066bc88c5dae57be358c97561345e056f54..ae58b78fb8a11e897d1b76627fec1c7da543b7de 100644 (file)
@@ -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 @@ template <> struct GRStateTrait<LockSet> :
 } // end GR namespace
 } // end clang namespace
 
-void GR::RegisterPthreadLockChecker(GRExprEngine &Eng) {
+void GR::RegisterPthreadLockChecker(ExprEngine &Eng) {
   Eng.registerCheck(new PthreadLockChecker());
 }
 
index 98b4ea544d75d3e6d26f3263ce4379fa29db3b2d..4ef5737f3546d1ea2e58969bf2637908a9bb99e9 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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 @@ public:
 };
 }
 
-void GR::RegisterReturnPointerRangeChecker(GRExprEngine &Eng) {
+void GR::RegisterReturnPointerRangeChecker(ExprEngine &Eng) {
   Eng.registerCheck(new ReturnPointerRangeChecker());
 }
 
index addae5b1c01097b7d750a6b52f2b08e793d5e079..2a1027a9301c633c4746ea4ac6b13c402c33170e 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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 @@ public:
 };
 }
 
-void GR::RegisterReturnUndefChecker(GRExprEngine &Eng) {
+void GR::RegisterReturnUndefChecker(ExprEngine &Eng) {
   Eng.registerCheck(new ReturnUndefChecker());
 }
 
index 87f5819cf7e3011d3e96037f532b2145aaabdaca..3ef78a46fb1b58f79b671e6ae126dfe8147ecfcd 100644 (file)
@@ -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 @@ public:
     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 @@ private:
 };
 }
 
-void GR::RegisterStackAddrLeakChecker(GRExprEngine &Eng) {
+void GR::RegisterStackAddrLeakChecker(ExprEngine &Eng) {
   Eng.registerCheck(new StackAddrLeakChecker());
 }
 
@@ -130,8 +130,8 @@ void StackAddrLeakChecker::PreVisitReturnStmt(CheckerContext &C,
   }
 }
 
-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();
 
index 01186b52dfc56d4fb35626834d26e253aaccd43a..73c2920ad9433740daf771b2b25db371de74a6d4 100644 (file)
@@ -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 @@ public:
 
   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 @@ namespace GR {
 }
 }
 
-void GR::RegisterStreamChecker(GRExprEngine &Eng) {
+void GR::RegisterStreamChecker(ExprEngine &Eng) {
   Eng.registerCheck(new StreamChecker());
 }
 
@@ -421,8 +421,8 @@ void StreamChecker::evalDeadSymbols(CheckerContext &C,SymbolReaper &SymReaper) {
   }
 }
 
-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;
index fa3dfa593517278a549da6bee1531f3cfaa3e6a7..e999d8bc13212046720d747f4ade423c3756e74f 100644 (file)
@@ -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 @@ class UndefBranchChecker : public Checker {
 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 @@ void *UndefBranchChecker::getTag() {
   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);
index 8a1c285c173d0379fa54d8b5adede65bbda18d3d..2b45c95843e3935c9b8ef39e077eab5a416926fe 100644 (file)
@@ -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 @@ public:
 };
 } // end anonymous namespace
 
-void GR::RegisterUndefCapturedBlockVarChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefCapturedBlockVarChecker(ExprEngine &Eng) {
   Eng.registerCheck(new UndefCapturedBlockVarChecker());
 }
 
index f4d30354e83fec08b49c06be0ddb3f90d613c51a..348573d21c6e4ebc304f0121841b77fabebdf633 100644 (file)
@@ -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 @@ public:
 };
 } // end anonymous namespace
 
-void GR::RegisterUndefResultChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefResultChecker(ExprEngine &Eng) {
   Eng.registerCheck(new UndefResultChecker());
 }
 
index 8946de3998124327c4aa4f01f2037976428f4723..0a3cee43a1275cc29990a5babbd23d9bbbe76876 100644 (file)
@@ -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 @@ public:
 };
 } // end anonymous namespace
 
-void GR::RegisterUndefinedArraySubscriptChecker(GRExprEngine &Eng) {
+void GR::RegisterUndefinedArraySubscriptChecker(ExprEngine &Eng) {
   Eng.registerCheck(new UndefinedArraySubscriptChecker());
 }
 
index b1eb38704bcda9562bba2a98854b4f37eba057bb..fa43350da8ffb3bef30192f5d0359f53a1b2dba1 100644 (file)
@@ -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 @@ public:
 };
 }
 
-void GR::RegisterUndefinedAssignmentChecker(GRExprEngine &Eng){
+void GR::RegisterUndefinedAssignmentChecker(ExprEngine &Eng){
   Eng.registerCheck(new UndefinedAssignmentChecker());
 }
 
index f4c75f76ab61f76f2560f60bcf410967ac48f869..c365e3042dd51919295659cab346999104c04fb1 100644 (file)
@@ -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 @@ public:
 };
 } //end anonymous namespace
 
-void GR::RegisterUnixAPIChecker(GRExprEngine &Eng) {
+void GR::RegisterUnixAPIChecker(ExprEngine &Eng) {
   Eng.registerCheck(new UnixAPIChecker());
 }
 
@@ -74,7 +74,7 @@ static void CheckOpen(CheckerContext &C, UnixAPIChecker &UC,
     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;
     }
   }
index 0ab97c27d9c9d847a91549027eafbabce25885cf..97a2ff56af127ec64112c0e8a523940bbd31f51b 100644 (file)
@@ -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 @@ public:
   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 @@ void *UnreachableCodeChecker::getTag() {
   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;
index d4e9d3533983fe1566335c0c448d0d3066711732..b2ca2db02f2081b11088088b4fb09ed5bccf68ba 100644 (file)
@@ -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 @@ public:
 };
 } // end anonymous namespace
 
-void GR::RegisterVLASizeChecker(GRExprEngine &Eng) {
+void GR::RegisterVLASizeChecker(ExprEngine &Eng) {
   Eng.registerCheck(new VLASizeChecker());
 }
 
similarity index 82%
rename from lib/GR/GRCoreEngine.cpp
rename to lib/GR/CoreEngine.cpp
index 092cb460aef9d5fd12a7f3651177283103ee05cc..a086c9123511eecd2f419776d8e8be48e4265d98 100644 (file)
@@ -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 @@ using namespace GR;
 // 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 @@ GRTransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
 // 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 @@ public:
   }
 };
 
-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 @@ public:
 
 } // 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 @@ namespace {
       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 @@ namespace {
   };
 } // end anonymous namespace
 
-GRWorkList* GRWorkList::MakeBFSBlockDFSContents() {
+WorkList* WorkList::MakeBFSBlockDFSContents() {
   return new BFSBlockDFSContents();
 }
 
@@ -163,7 +163,7 @@ GRWorkList* GRWorkList::MakeBFSBlockDFSContents() {
 //===----------------------------------------------------------------------===//
 
 /// 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 @@ bool GRCoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps,
       --Steps;
     }
 
-    const GRWorkListUnit& WU = WList->Dequeue();
+    const WorkListUnit& WU = WList->Dequeue();
 
     // Set the current block counter.
     WList->setBlockCounter(WU.getBlockCounter());
@@ -243,11 +243,11 @@ bool GRCoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps,
     }
   }
 
-  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::ExecuteWorkListWithInitialState(const LocationContext *L,
   }
 }
 
-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 @@ void GRCoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
             && "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::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
   }
 }
 
-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 @@ void GRCoreEngine::HandleBlockEntrance(const BlockEntrance& L,
 
   // 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 @@ void GRCoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) {
         // 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 @@ void GRCoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) {
       }
 
       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 @@ void GRCoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) {
                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 @@ void GRCoreEngine::generateNode(const ProgramPoint& Loc,
   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 @@ GRStmtNodeBuilder::GRStmtNodeBuilder(const CFGBlock* b, unsigned idx,
   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 @@ void GRStmtNodeBuilder::GenerateAutoTransition(ExplodedNode* N) {
     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 @@ static ProgramPoint GetProgramPoint(const Stmt *S, ProgramPoint::Kind K,
 }
 
 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 @@ GRStmtNodeBuilder::generateNodeInternal(const Stmt* S, const GRState* state,
 }
 
 ExplodedNode*
-GRStmtNodeBuilder::generateNodeInternal(const ProgramPoint &Loc,
+StmtNodeBuilder::generateNodeInternal(const ProgramPoint &Loc,
                                         const GRState* State,
                                         ExplodedNode* Pred) {
   bool IsNew;
@@ -565,7 +565,7 @@ GRStmtNodeBuilder::generateNodeInternal(const ProgramPoint &Loc,
   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 @@ ExplodedNode* GRBranchNodeBuilder::generateNode(const GRState* State,
   return NULL;
 }
 
-GRBranchNodeBuilder::~GRBranchNodeBuilder() {
+BranchNodeBuilder::~BranchNodeBuilder() {
   if (!GeneratedTrue) generateNode(Pred->State, true);
   if (!GeneratedFalse) generateNode(Pred->State, false);
 
@@ -603,7 +603,7 @@ GRBranchNodeBuilder::~GRBranchNodeBuilder() {
 
 
 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 @@ GRIndirectGotoNodeBuilder::generateNode(const iterator& I, const GRState* St,
 
 
 ExplodedNode*
-GRSwitchNodeBuilder::generateCaseStmtNode(const iterator& I, const GRState* St){
+SwitchNodeBuilder::generateCaseStmtNode(const iterator& I, const GRState* St){
 
   bool IsNew;
 
@@ -645,7 +645,7 @@ GRSwitchNodeBuilder::generateCaseStmtNode(const iterator& I, const GRState* St){
 
 
 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 @@ GRSwitchNodeBuilder::generateDefaultCaseNode(const GRState* St, bool isSink) {
   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 @@ GREndPathNodeBuilder::~GREndPathNodeBuilder() {
 }
 
 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 @@ GREndPathNodeBuilder::generateNode(const GRState* State, const void *tag,
   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 GREndPathNodeBuilder::GenerateCallExitNode(const GRState *state) {
 }
                                                 
 
-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 @@ void GRCallEnterNodeBuilder::generateNode(const GRState *state) {
                      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 @@ void GRCallEnterNodeBuilder::generateNode(const GRState *state) {
     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());
similarity index 94%
rename from lib/GR/GRExprEngine.cpp
rename to lib/GR/ExprEngine.cpp
index d6086c76e64b2a3a731371387af79c6a743740fd..7cf9054f247c0296f63a946d2bdb17fde320eca7 100644 (file)
@@ -1,4 +1,4 @@
-//=-- GRExprEngine.cpp - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=
+//=-- ExprEngine.cpp - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=
 //
 //                     The LLVM Compiler Infrastructure
 //
 //===----------------------------------------------------------------------===//
 
 // 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 @@ static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) {
 // 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 @@ void GRExprEngine::CheckerVisit(const Stmt *S, ExplodedNodeSet &Dst,
   // automatically.
 }
 
-void GRExprEngine::CheckerEvalNilReceiver(const ObjCMessageExpr *ME,
+void ExprEngine::CheckerEvalNilReceiver(const ObjCMessageExpr *ME,
                                           ExplodedNodeSet &Dst,
                                           const GRState *state,
                                           ExplodedNode *Pred) {
@@ -174,7 +174,7 @@ void GRExprEngine::CheckerEvalNilReceiver(const ObjCMessageExpr *ME,
 // 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 @@ bool GRExprEngine::CheckerEvalCall(const CallExpr *CE,
 
 // 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 @@ void GRExprEngine::CheckerVisitBind(const Stmt *StoreE, ExplodedNodeSet &Dst,
 // 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 @@ static void RegisterInternalChecks(GRExprEngine &Eng) {
   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 @@ GRExprEngine::GRExprEngine(AnalysisManager &mgr, GRTransferFuncs *tf)
   TF->RegisterPrinters(getStateManager().Printers);
 }
 
-GRExprEngine::~GRExprEngine() {
+ExprEngine::~ExprEngine() {
   BR.FlushReports();
   delete [] NSExceptionInstanceRaiseSelectors;
   
@@ -318,7 +318,7 @@ GRExprEngine::~GRExprEngine() {
 // 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 @@ const GRState* GRExprEngine::getInitialState(const LocationContext *InitLoc) {
 
 /// 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 @@ const GRState *GRExprEngine::ProcessAssume(const GRState *state, SVal cond,
   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 @@ bool GRExprEngine::WantsRegionChangeUpdate(const GRState* state) {
 }
 
 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 @@ GRExprEngine::ProcessRegionChanges(const GRState *state,
   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::ProcessElement(const CFGElement E,
   }
 }
 
-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 @@ void GRExprEngine::ProcessStmt(const CFGStmt S, GRStmtNodeBuilder& builder) {
     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 @@ void GRExprEngine::ProcessStmt(const CFGStmt S, GRStmtNodeBuilder& builder) {
   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::ProcessInitializer(const CFGInitializer Init,
   }
 }
 
-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::ProcessImplicitDtor(const CFGImplicitDtor D,
   }
 }
 
-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 @@ void GRExprEngine::ProcessAutomaticObjDtor(const CFGAutomaticObjDtor dtor,
                      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 @@ void GRExprEngine::Visit(const Stmt* S, ExplodedNode* Pred,
 // 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 @@ bool GRExprEngine::ProcessBlockEntrance(const CFGBlock* B,
 // 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 @@ ExplodedNode* GRExprEngine::MakeNode(ExplodedNodeSet& Dst, const Stmt* S,
 // 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 @@ static SVal RecoverCastedSymbol(GRStateManager& StateMgr, const GRState* state,
   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 @@ void GRExprEngine::ProcessBranch(const Stmt* Condition, const Stmt* Term,
   }
 }
 
-/// 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 @@ void GRExprEngine::ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder) {
   //   (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::ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder) {
 }
 
 
-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 @@ void GRExprEngine::VisitGuardedExpr(const Expr* Ex, const Expr* L,
   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 @@ void GRExprEngine::ProcessEndPath(GREndPathNodeBuilder& builder) {
   }
 }
 
-/// 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 @@ void GRExprEngine::ProcessSwitch(GRSwitchNodeBuilder& builder) {
   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 @@ void GRExprEngine::ProcessCallExit(GRCallExitNodeBuilder &B) {
 // 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 @@ void GRExprEngine::VisitLogicalExpr(const BinaryOperator* B, ExplodedNode* Pred,
 // 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 @@ void GRExprEngine::VisitBlockExpr(const BlockExpr *BE, ExplodedNode *Pred,
   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 @@ void GRExprEngine::VisitCommonDeclRefExpr(const Expr *Ex, const NamedDecl *D,
 }
 
 /// 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 @@ void GRExprEngine::VisitLvalArraySubscriptExpr(const ArraySubscriptExpr* A,
 }
 
 /// 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 @@ void GRExprEngine::VisitMemberExpr(const MemberExpr* M, ExplodedNode* Pred,
 
 /// 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 @@ void GRExprEngine::evalBind(ExplodedNodeSet& Dst, const Stmt* StoreE,
       }
     }
 
-    // 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 @@ void GRExprEngine::evalBind(ExplodedNodeSet& Dst, const Stmt* StoreE,
 ///  @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 @@ void GRExprEngine::evalStore(ExplodedNodeSet& Dst, const Expr *AssignE,
     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 @@ void GRExprEngine::evalLoad(ExplodedNodeSet& Dst, const Expr *Ex,
   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::evalLoadCommon(ExplodedNodeSet& Dst, const Expr *Ex,
   }
 }
 
-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 @@ void GRExprEngine::evalLocation(ExplodedNodeSet &Dst, const Stmt *S,
   }
 }
 
-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 @@ bool GRExprEngine::InlineCall(ExplodedNodeSet &Dst, const CallExpr *CE,
   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 @@ void GRExprEngine::VisitCall(const CallExpr* CE, ExplodedNode* Pred,
 
         // 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 @@ void GRExprEngine::VisitCall(const CallExpr* CE, ExplodedNode* Pred,
 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 @@ void GRExprEngine::evalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
 // 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 @@ void GRExprEngine::VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S,
 // 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 @@ void GRExprEngine::VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr* Ex,
 // 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::VisitObjCForCollectionStmt(const ObjCForCollectionStmt* S,
   }
 }
 
-void GRExprEngine::VisitObjCForCollectionStmtAux(const ObjCForCollectionStmt* S,
+void ExprEngine::VisitObjCForCollectionStmtAux(const ObjCForCollectionStmt* S,
                                        ExplodedNode* Pred, ExplodedNodeSet& Dst,
                                                  SVal ElementV) {
 
@@ -2183,7 +2183,7 @@ public:
 };
 } // end anonymous namespace
 
-void GRExprEngine::VisitObjCMessageExpr(const ObjCMessageExpr* ME, 
+void ExprEngine::VisitObjCMessageExpr(const ObjCMessageExpr* ME, 
                                         ExplodedNode* Pred,
                                         ExplodedNodeSet& Dst){
 
@@ -2339,8 +2339,8 @@ void GRExprEngine::VisitObjCMessageExpr(const ObjCMessageExpr* ME,
 // 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::VisitCast(const CastExpr *CastE, const Expr *Ex,
   }
 }
 
-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::VisitCompoundLiteralExpr(const CompoundLiteralExpr* CL,
   }
 }
 
-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::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
   }
 }
 
-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 @@ public:
 }
 
 
-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 @@ void GRExprEngine::VisitInitListExpr(const InitListExpr* E, ExplodedNode* Pred,
 }
 
 /// 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 @@ void GRExprEngine::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr* Ex,
               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 @@ void GRExprEngine::VisitOffsetOfExpr(const OffsetOfExpr* OOE,
   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::VisitUnaryOperator(const UnaryOperator* U,
   }
 }
 
-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 @@ void GRExprEngine::VisitAsmStmtHelperOutputs(const AsmStmt* A,
     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 @@ void GRExprEngine::VisitAsmStmtHelperInputs(const AsmStmt* A,
     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 @@ void GRExprEngine::VisitReturnStmt(const ReturnStmt *RS, ExplodedNode *Pred,
   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 @@ void GRExprEngine::VisitReturnStmt(const ReturnStmt *RS, ExplodedNode *Pred,
 // 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 @@ void GRExprEngine::VisitBinaryOperator(const BinaryOperator* B,
 // 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 @@ Checker *GRExprEngine::lookupChecker(void *tag) const {
 //===----------------------------------------------------------------------===//
 
 #ifndef NDEBUG
-static GRExprEngine* GraphPrintCheckerState;
+static ExprEngine* GraphPrintCheckerState;
 static SourceManager* GraphPrintSourceManager;
 
 namespace llvm {
@@ -3272,7 +3272,7 @@ struct DOTGraphTraits<ExplodedNode*> :
 
   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 @@ GetGraphNode<llvm::DenseMap<ExplodedNode*, Expr*>::iterator>
 }
 #endif
 
-void GRExprEngine::ViewGraph(bool trim) {
+void ExprEngine::ViewGraph(bool trim) {
 #ifndef NDEBUG
   if (trim) {
     std::vector<ExplodedNode*> Src;
@@ -3487,7 +3487,7 @@ void GRExprEngine::ViewGraph(bool trim) {
     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 @@ void GRExprEngine::ViewGraph(bool trim) {
 #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 @@ void GRExprEngine::ViewGraph(ExplodedNode** Beg, ExplodedNode** End) {
   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;
index 993fa1a9cb4978b4e3852feb87396d3012648872..3a4c15a8dbbb0dfcdbcd19d542df1dfbf39124c1 100644 (file)
@@ -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 @@ const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin,
                                           StoreManager::InvalidatedSymbols *IS,
                                           bool invalidateGlobals) const {
   GRStateManager &Mgr = getStateManager();
-  GRSubEngine &Eng = Mgr.getOwningEngine();
+  SubEngine &Eng = Mgr.getOwningEngine();
 
   if (Eng.WantsRegionChangeUpdate(this)) {
     StoreManager::InvalidatedRegions Regions;
index 378cb6e30f081b22ff706cf738eec037e97c14ec..8f8528dbde6430501b1ae08829c55fffd26b7ff7 100644 (file)
@@ -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 @@ namespace {
 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 @@ private:
 } // end anonymous namespace
 
 ConstraintManager* GR::CreateRangeConstraintManager(GRStateManager&,
-                                                    GRSubEngine &subeng) {
+                                                    SubEngine &subeng) {
   return new RangeConstraintManager(subeng);
 }
 
index f2c47377d964db46c6e8c3ce86240110e1da4555..2fa8a9754a5edfd2c7faad50edb8a17a6f6287e8 100644 (file)
@@ -221,7 +221,7 @@ public:
   ///  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 @@ DefinedOrUnknownSVal RegionStoreManager::getSizeInElements(const GRState *state,
 ///  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))
index 991d0e87e4f438cace73a4d8798d3de6e8d15f9b..83e79558784f2f66331bffdd1bac9966cdbf9bd8 100644 (file)
@@ -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"
 
index 442f0ca9f7cab5b0349e1609e150c988f64918ae..616369395a1cc85eeba2ef48b277d828e9f6b771 100644 (file)
@@ -22,9 +22,9 @@ namespace clang {
 namespace GR {
 
 class SimpleConstraintManager : public ConstraintManager {
-  GRSubEngine &SU;
+  SubEngine &SU;
 public:
-  SimpleConstraintManager(GRSubEngine &subengine) : SU(subengine) {}
+  SimpleConstraintManager(SubEngine &subengine) : SU(subengine) {}
   virtual ~SimpleConstraintManager();
 
   //===------------------------------------------------------------------===//
index 03f8e3076ced6b7631feb9c49cf75755787d7d77..2fc2347608cd2a94e63819cfb7b1d2091c224a74 100644 (file)
@@ -358,7 +358,7 @@ SVal SimpleSValBuilder::evalBinOpNN(const GRState *state,
         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:
index 95df3077ca58a4a670921c308b5b14258587f06b..6d078f41be6692dddd336ccfb98b66fbb33ce734 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
 
index 04bfada25059ba122bbb7fdff66944f8cb49526f..6c0e91bac88f6f0aec14c8c6c7386024f12890ae 100644 (file)
@@ -9,7 +9,7 @@ struct vector {
   void push_back(const T&) { int a[sizeof(T) ? -1: -1]; } // expected-error {{array size is negative}}
 };
 
-class GRExprEngine {
+class ExprEngine {
 public:
  typedef vector<S<void *> >CheckersOrdered;
  CheckersOrdered Checkers;
@@ -22,8 +22,8 @@ public:
 
 class RetainReleaseChecker { };
 
-void f(GRExprEngine& Eng) {
-   Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'GRExprEngine::registerCheck<RetainReleaseChecker>' requested here}}
+void f(ExprEngine& Eng) {
+   Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'ExprEngine::registerCheck<RetainReleaseChecker>' requested here}}
 }
 
 // PR 5838