From 9ef6537a894c33003359b1f9b9676e9178e028b7 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 23 Dec 2010 07:20:52 +0000 Subject: [PATCH] Rename static analyzer namespace 'GR' to 'ento'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122492 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Analysis/DomainSpecific/CocoaConventions.h | 2 +- include/clang/GR/AnalysisConsumer.h | 2 +- include/clang/GR/BugReporter/BugReporter.h | 2 +- include/clang/GR/BugReporter/BugType.h | 2 +- include/clang/GR/BugReporter/PathDiagnostic.h | 2 +- include/clang/GR/Checkers/DereferenceChecker.h | 2 +- include/clang/GR/Checkers/LocalCheckers.h | 2 +- include/clang/GR/FrontendActions.h | 2 +- include/clang/GR/ManagerRegistry.h | 2 +- include/clang/GR/PathDiagnosticClients.h | 2 +- include/clang/GR/PathSensitive/AnalysisManager.h | 2 +- include/clang/GR/PathSensitive/BasicValueFactory.h | 2 +- include/clang/GR/PathSensitive/BlockCounter.h | 2 +- include/clang/GR/PathSensitive/Checker.h | 2 +- include/clang/GR/PathSensitive/CheckerHelpers.h | 2 +- include/clang/GR/PathSensitive/CheckerVisitor.h | 2 +- include/clang/GR/PathSensitive/ConstraintManager.h | 2 +- include/clang/GR/PathSensitive/CoreEngine.h | 2 +- include/clang/GR/PathSensitive/Environment.h | 2 +- include/clang/GR/PathSensitive/ExplodedGraph.h | 10 +++++----- include/clang/GR/PathSensitive/ExprEngine.h | 2 +- .../clang/GR/PathSensitive/ExprEngineBuilders.h | 2 +- include/clang/GR/PathSensitive/GRState.h | 2 +- include/clang/GR/PathSensitive/GRStateTrait.h | 2 +- include/clang/GR/PathSensitive/MemRegion.h | 4 ++-- include/clang/GR/PathSensitive/SValBuilder.h | 2 +- include/clang/GR/PathSensitive/SVals.h | 14 +++++++------- include/clang/GR/PathSensitive/Store.h | 2 +- include/clang/GR/PathSensitive/SubEngine.h | 2 +- include/clang/GR/PathSensitive/SummaryManager.h | 2 +- include/clang/GR/PathSensitive/SymbolManager.h | 4 ++-- include/clang/GR/PathSensitive/TransferFuncs.h | 2 +- include/clang/GR/PathSensitive/WorkList.h | 2 +- lib/Analysis/CocoaConventions.cpp | 2 +- lib/FrontendTool/ExecuteCompilerInvocation.cpp | 2 +- lib/GR/AggExprVisitor.cpp | 2 +- lib/GR/AnalysisManager.cpp | 2 +- lib/GR/AnalyzerStatsChecker.cpp | 4 ++-- lib/GR/BasicConstraintManager.cpp | 6 +++--- lib/GR/BasicStore.cpp | 4 ++-- lib/GR/BasicValueFactory.cpp | 2 +- lib/GR/BlockCounter.cpp | 2 +- lib/GR/BugReporter.cpp | 2 +- lib/GR/BugReporterVisitors.cpp | 2 +- lib/GR/CFRefCount.cpp | 8 ++++---- lib/GR/CXXExprEngine.cpp | 2 +- lib/GR/Checker.cpp | 2 +- lib/GR/CheckerHelpers.cpp | 8 ++++---- lib/GR/Checkers/AdjustedReturnValueChecker.cpp | 4 ++-- lib/GR/Checkers/AnalysisConsumer.cpp | 4 ++-- lib/GR/Checkers/ArrayBoundChecker.cpp | 4 ++-- lib/GR/Checkers/ArrayBoundCheckerV2.cpp | 4 ++-- lib/GR/Checkers/AttrNonNullChecker.cpp | 4 ++-- lib/GR/Checkers/BasicObjCFoundationChecks.cpp | 4 ++-- lib/GR/Checkers/BasicObjCFoundationChecks.h | 2 +- lib/GR/Checkers/BuiltinFunctionChecker.cpp | 4 ++-- lib/GR/Checkers/CStringChecker.cpp | 6 +++--- lib/GR/Checkers/CallAndMessageChecker.cpp | 4 ++-- lib/GR/Checkers/CastSizeChecker.cpp | 4 ++-- lib/GR/Checkers/CastToStructChecker.cpp | 4 ++-- lib/GR/Checkers/CheckDeadStores.cpp | 4 ++-- lib/GR/Checkers/CheckObjCDealloc.cpp | 4 ++-- lib/GR/Checkers/CheckObjCInstMethSignature.cpp | 4 ++-- lib/GR/Checkers/CheckSecuritySyntaxOnly.cpp | 4 ++-- lib/GR/Checkers/CheckSizeofPointer.cpp | 4 ++-- lib/GR/Checkers/ChrootChecker.cpp | 4 ++-- lib/GR/Checkers/DereferenceChecker.cpp | 6 +++--- lib/GR/Checkers/DivZeroChecker.cpp | 4 ++-- lib/GR/Checkers/ExprEngine.cpp | 2 +- lib/GR/Checkers/ExprEngineExperimentalChecks.cpp | 6 +++--- lib/GR/Checkers/ExprEngineExperimentalChecks.h | 2 +- lib/GR/Checkers/ExprEngineInternalChecks.h | 2 +- lib/GR/Checkers/FixedAddressChecker.cpp | 4 ++-- lib/GR/Checkers/FrontendActions.cpp | 2 +- lib/GR/Checkers/IdempotentOperationChecker.cpp | 4 ++-- lib/GR/Checkers/LLVMConventionsChecker.cpp | 4 ++-- lib/GR/Checkers/MacOSXAPIChecker.cpp | 4 ++-- lib/GR/Checkers/MallocChecker.cpp | 6 +++--- lib/GR/Checkers/NSAutoreleasePoolChecker.cpp | 4 ++-- lib/GR/Checkers/NSErrorChecker.cpp | 4 ++-- lib/GR/Checkers/NoReturnFunctionChecker.cpp | 4 ++-- lib/GR/Checkers/OSAtomicChecker.cpp | 4 ++-- lib/GR/Checkers/ObjCAtSyncChecker.cpp | 4 ++-- lib/GR/Checkers/ObjCUnusedIVarsChecker.cpp | 4 ++-- lib/GR/Checkers/PointerArithChecker.cpp | 4 ++-- lib/GR/Checkers/PointerSubChecker.cpp | 4 ++-- lib/GR/Checkers/PthreadLockChecker.cpp | 6 +++--- lib/GR/Checkers/ReturnPointerRangeChecker.cpp | 4 ++-- lib/GR/Checkers/ReturnUndefChecker.cpp | 4 ++-- lib/GR/Checkers/StackAddrLeakChecker.cpp | 4 ++-- lib/GR/Checkers/StreamChecker.cpp | 6 +++--- lib/GR/Checkers/UndefBranchChecker.cpp | 4 ++-- lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp | 4 ++-- lib/GR/Checkers/UndefResultChecker.cpp | 4 ++-- lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp | 4 ++-- lib/GR/Checkers/UndefinedAssignmentChecker.cpp | 4 ++-- lib/GR/Checkers/UnixAPIChecker.cpp | 4 ++-- lib/GR/Checkers/UnreachableCodeChecker.cpp | 4 ++-- lib/GR/Checkers/VLASizeChecker.cpp | 4 ++-- lib/GR/CoreEngine.cpp | 4 ++-- lib/GR/Environment.cpp | 2 +- lib/GR/ExplodedGraph.cpp | 2 +- lib/GR/FlatStore.cpp | 4 ++-- lib/GR/GRState.cpp | 2 +- lib/GR/HTMLDiagnostics.cpp | 6 +++--- lib/GR/ManagerRegistry.cpp | 2 +- lib/GR/MemRegion.cpp | 2 +- lib/GR/PathDiagnostic.cpp | 2 +- lib/GR/PlistDiagnostics.cpp | 6 +++--- lib/GR/RangeConstraintManager.cpp | 6 +++--- lib/GR/RegionStore.cpp | 6 +++--- lib/GR/SValBuilder.cpp | 2 +- lib/GR/SVals.cpp | 2 +- lib/GR/SimpleConstraintManager.cpp | 4 ++-- lib/GR/SimpleConstraintManager.h | 2 +- lib/GR/SimpleSValBuilder.cpp | 8 ++++---- lib/GR/Store.cpp | 2 +- lib/GR/SymbolManager.cpp | 2 +- lib/GR/TextPathDiagnostics.cpp | 6 +++--- 119 files changed, 209 insertions(+), 209 deletions(-) diff --git a/include/clang/Analysis/DomainSpecific/CocoaConventions.h b/include/clang/Analysis/DomainSpecific/CocoaConventions.h index 0212cbfb8b..18e81fed79 100644 --- a/include/clang/Analysis/DomainSpecific/CocoaConventions.h +++ b/include/clang/Analysis/DomainSpecific/CocoaConventions.h @@ -17,7 +17,7 @@ #include "clang/AST/Type.h" namespace clang { -namespace GR { +namespace ento { namespace cocoa { enum NamingConvention { NoConvention, CreateRule, InitRule }; diff --git a/include/clang/GR/AnalysisConsumer.h b/include/clang/GR/AnalysisConsumer.h index 805638867f..86f6c727a4 100644 --- a/include/clang/GR/AnalysisConsumer.h +++ b/include/clang/GR/AnalysisConsumer.h @@ -23,7 +23,7 @@ class AnalyzerOptions; class ASTConsumer; class Preprocessor; -namespace GR { +namespace ento { /// CreateAnalysisConsumer - Creates an ASTConsumer to run various code /// analysis passes. (The set of analyses run is controlled by command-line diff --git a/include/clang/GR/BugReporter/BugReporter.h b/include/clang/GR/BugReporter/BugReporter.h index 31487b6eb6..7d2dffae75 100644 --- a/include/clang/GR/BugReporter/BugReporter.h +++ b/include/clang/GR/BugReporter/BugReporter.h @@ -30,7 +30,7 @@ class Diagnostic; class Stmt; class ParentMap; -namespace GR { +namespace ento { class PathDiagnostic; class PathDiagnosticPiece; diff --git a/include/clang/GR/BugReporter/BugType.h b/include/clang/GR/BugReporter/BugType.h index a18e59639c..854094977a 100644 --- a/include/clang/GR/BugReporter/BugType.h +++ b/include/clang/GR/BugReporter/BugType.h @@ -20,7 +20,7 @@ namespace clang { -namespace GR { +namespace ento { class ExplodedNode; class ExprEngine; diff --git a/include/clang/GR/BugReporter/PathDiagnostic.h b/include/clang/GR/BugReporter/PathDiagnostic.h index c19bb756b8..6d53c097d2 100644 --- a/include/clang/GR/BugReporter/PathDiagnostic.h +++ b/include/clang/GR/BugReporter/PathDiagnostic.h @@ -27,7 +27,7 @@ class Decl; class SourceManager; class Stmt; -namespace GR { +namespace ento { //===----------------------------------------------------------------------===// // High-level interface for handlers of path-sensitive diagnostics. diff --git a/include/clang/GR/Checkers/DereferenceChecker.h b/include/clang/GR/Checkers/DereferenceChecker.h index 2ac45bf9ba..f9cce9ca9c 100644 --- a/include/clang/GR/Checkers/DereferenceChecker.h +++ b/include/clang/GR/Checkers/DereferenceChecker.h @@ -20,7 +20,7 @@ namespace clang { -namespace GR { +namespace ento { class ExprEngine; class ExplodedNode; diff --git a/include/clang/GR/Checkers/LocalCheckers.h b/include/clang/GR/Checkers/LocalCheckers.h index d9352ee8bc..e0f002b6d0 100644 --- a/include/clang/GR/Checkers/LocalCheckers.h +++ b/include/clang/GR/Checkers/LocalCheckers.h @@ -28,7 +28,7 @@ class ObjCImplementationDecl; class LangOptions; class TranslationUnitDecl; -namespace GR { +namespace ento { class PathDiagnosticClient; class TransferFuncs; diff --git a/include/clang/GR/FrontendActions.h b/include/clang/GR/FrontendActions.h index dd4a549502..e3867a2a24 100644 --- a/include/clang/GR/FrontendActions.h +++ b/include/clang/GR/FrontendActions.h @@ -14,7 +14,7 @@ namespace clang { -namespace GR { +namespace ento { //===----------------------------------------------------------------------===// // AST Consumer Actions diff --git a/include/clang/GR/ManagerRegistry.h b/include/clang/GR/ManagerRegistry.h index 30c487d320..ff174c0b4a 100644 --- a/include/clang/GR/ManagerRegistry.h +++ b/include/clang/GR/ManagerRegistry.h @@ -18,7 +18,7 @@ namespace clang { -namespace GR { +namespace ento { /// ManagerRegistry - This class records manager creators registered at /// runtime. The information is communicated to AnalysisManager through static diff --git a/include/clang/GR/PathDiagnosticClients.h b/include/clang/GR/PathDiagnosticClients.h index 612dfb1615..2713e31fc0 100644 --- a/include/clang/GR/PathDiagnosticClients.h +++ b/include/clang/GR/PathDiagnosticClients.h @@ -20,7 +20,7 @@ namespace clang { class Preprocessor; -namespace GR { +namespace ento { class PathDiagnosticClient; diff --git a/include/clang/GR/PathSensitive/AnalysisManager.h b/include/clang/GR/PathSensitive/AnalysisManager.h index 59bf416c85..c9deccc539 100644 --- a/include/clang/GR/PathSensitive/AnalysisManager.h +++ b/include/clang/GR/PathSensitive/AnalysisManager.h @@ -26,7 +26,7 @@ namespace idx { class TranslationUnit; } -namespace GR { +namespace ento { class AnalysisManager : public BugReporterData { AnalysisContextManager AnaCtxMgr; diff --git a/include/clang/GR/PathSensitive/BasicValueFactory.h b/include/clang/GR/PathSensitive/BasicValueFactory.h index c310408ff8..0a692ba9d6 100644 --- a/include/clang/GR/PathSensitive/BasicValueFactory.h +++ b/include/clang/GR/PathSensitive/BasicValueFactory.h @@ -24,7 +24,7 @@ namespace clang { -namespace GR { +namespace ento { class GRState; diff --git a/include/clang/GR/PathSensitive/BlockCounter.h b/include/clang/GR/PathSensitive/BlockCounter.h index 071ccb09ee..7d0fdfb5f1 100644 --- a/include/clang/GR/PathSensitive/BlockCounter.h +++ b/include/clang/GR/PathSensitive/BlockCounter.h @@ -24,7 +24,7 @@ namespace clang { class StackFrameContext; -namespace GR { +namespace ento { class BlockCounter { void* Data; diff --git a/include/clang/GR/PathSensitive/Checker.h b/include/clang/GR/PathSensitive/Checker.h index c1cac5776c..73fb37fc4c 100644 --- a/include/clang/GR/PathSensitive/Checker.h +++ b/include/clang/GR/PathSensitive/Checker.h @@ -24,7 +24,7 @@ namespace clang { -namespace GR { +namespace ento { class CheckerContext { ExplodedNodeSet &Dst; diff --git a/include/clang/GR/PathSensitive/CheckerHelpers.h b/include/clang/GR/PathSensitive/CheckerHelpers.h index 7afd67d929..005e0e5863 100644 --- a/include/clang/GR/PathSensitive/CheckerHelpers.h +++ b/include/clang/GR/PathSensitive/CheckerHelpers.h @@ -18,7 +18,7 @@ namespace clang { -namespace GR { +namespace ento { bool containsMacro(const Stmt *S); bool containsEnum(const Stmt *S); diff --git a/include/clang/GR/PathSensitive/CheckerVisitor.h b/include/clang/GR/PathSensitive/CheckerVisitor.h index 26f85d7232..18ffa9fad3 100644 --- a/include/clang/GR/PathSensitive/CheckerVisitor.h +++ b/include/clang/GR/PathSensitive/CheckerVisitor.h @@ -17,7 +17,7 @@ namespace clang { -namespace GR { +namespace ento { //===----------------------------------------------------------------------===// // Checker visitor interface. Used by subclasses of Checker to specify their diff --git a/include/clang/GR/PathSensitive/ConstraintManager.h b/include/clang/GR/PathSensitive/ConstraintManager.h index 0cc023f5a1..3e73f4b225 100644 --- a/include/clang/GR/PathSensitive/ConstraintManager.h +++ b/include/clang/GR/PathSensitive/ConstraintManager.h @@ -23,7 +23,7 @@ class APSInt; namespace clang { -namespace GR { +namespace ento { class GRState; class GRStateManager; diff --git a/include/clang/GR/PathSensitive/CoreEngine.h b/include/clang/GR/PathSensitive/CoreEngine.h index c66d0ba907..eaaff52160 100644 --- a/include/clang/GR/PathSensitive/CoreEngine.h +++ b/include/clang/GR/PathSensitive/CoreEngine.h @@ -24,7 +24,7 @@ namespace clang { -namespace GR { +namespace ento { //===----------------------------------------------------------------------===// /// CoreEngine - Implements the core logic of the graph-reachability diff --git a/include/clang/GR/PathSensitive/Environment.h b/include/clang/GR/PathSensitive/Environment.h index 36f26e01e4..a8861cc0c2 100644 --- a/include/clang/GR/PathSensitive/Environment.h +++ b/include/clang/GR/PathSensitive/Environment.h @@ -22,7 +22,7 @@ namespace clang { class LiveVariables; -namespace GR { +namespace ento { class EnvironmentManager; class SValBuilder; diff --git a/include/clang/GR/PathSensitive/ExplodedGraph.h b/include/clang/GR/PathSensitive/ExplodedGraph.h index a185a13b3a..7f8c4c60c4 100644 --- a/include/clang/GR/PathSensitive/ExplodedGraph.h +++ b/include/clang/GR/PathSensitive/ExplodedGraph.h @@ -36,7 +36,7 @@ namespace clang { class CFG; -namespace GR { +namespace ento { class GRState; class ExplodedGraph; @@ -378,8 +378,8 @@ public: // GraphTraits namespace llvm { - template<> struct GraphTraits { - typedef clang::GR::ExplodedNode NodeType; + template<> struct GraphTraits { + typedef clang::ento::ExplodedNode NodeType; typedef NodeType::succ_iterator ChildIteratorType; typedef llvm::df_iterator nodes_iterator; @@ -404,8 +404,8 @@ namespace llvm { } }; - template<> struct GraphTraits { - typedef const clang::GR::ExplodedNode NodeType; + template<> struct GraphTraits { + typedef const clang::ento::ExplodedNode NodeType; typedef NodeType::const_succ_iterator ChildIteratorType; typedef llvm::df_iterator nodes_iterator; diff --git a/include/clang/GR/PathSensitive/ExprEngine.h b/include/clang/GR/PathSensitive/ExprEngine.h index c61c251e12..ed06b27f30 100644 --- a/include/clang/GR/PathSensitive/ExprEngine.h +++ b/include/clang/GR/PathSensitive/ExprEngine.h @@ -31,7 +31,7 @@ namespace clang { class ObjCForCollectionStmt; -namespace GR { +namespace ento { class AnalysisManager; class Checker; diff --git a/include/clang/GR/PathSensitive/ExprEngineBuilders.h b/include/clang/GR/PathSensitive/ExprEngineBuilders.h index e6af5a8215..b3ccc29941 100644 --- a/include/clang/GR/PathSensitive/ExprEngineBuilders.h +++ b/include/clang/GR/PathSensitive/ExprEngineBuilders.h @@ -19,7 +19,7 @@ namespace clang { -namespace GR { +namespace ento { class StmtNodeBuilderRef { ExplodedNodeSet &Dst; diff --git a/include/clang/GR/PathSensitive/GRState.h b/include/clang/GR/PathSensitive/GRState.h index f540fd2ee2..914dadbdbd 100644 --- a/include/clang/GR/PathSensitive/GRState.h +++ b/include/clang/GR/PathSensitive/GRState.h @@ -31,7 +31,7 @@ class raw_ostream; namespace clang { class ASTContext; -namespace GR { +namespace ento { class GRStateManager; class Checker; diff --git a/include/clang/GR/PathSensitive/GRStateTrait.h b/include/clang/GR/PathSensitive/GRStateTrait.h index 5c17392ff4..914625a285 100644 --- a/include/clang/GR/PathSensitive/GRStateTrait.h +++ b/include/clang/GR/PathSensitive/GRStateTrait.h @@ -27,7 +27,7 @@ namespace llvm { namespace clang { -namespace GR { +namespace ento { template struct GRStatePartialTrait; // Partial-specialization for ImmutableMap. diff --git a/include/clang/GR/PathSensitive/MemRegion.h b/include/clang/GR/PathSensitive/MemRegion.h index 59e806074b..20e25cf44a 100644 --- a/include/clang/GR/PathSensitive/MemRegion.h +++ b/include/clang/GR/PathSensitive/MemRegion.h @@ -34,7 +34,7 @@ namespace clang { class LocationContext; class StackFrameContext; -namespace GR { +namespace ento { class MemRegionManager; class MemSpaceRegion; @@ -1068,7 +1068,7 @@ inline ASTContext& MemRegion::getContext() const { namespace llvm { static inline raw_ostream& operator<<(raw_ostream& os, - const clang::GR::MemRegion* R) { + const clang::ento::MemRegion* R) { R->dumpToStream(os); return os; } diff --git a/include/clang/GR/PathSensitive/SValBuilder.h b/include/clang/GR/PathSensitive/SValBuilder.h index 95780254e3..b01f4305ef 100644 --- a/include/clang/GR/PathSensitive/SValBuilder.h +++ b/include/clang/GR/PathSensitive/SValBuilder.h @@ -23,7 +23,7 @@ namespace clang { -namespace GR { +namespace ento { class GRState; diff --git a/include/clang/GR/PathSensitive/SVals.h b/include/clang/GR/PathSensitive/SVals.h index 20814619e1..617b3948b7 100644 --- a/include/clang/GR/PathSensitive/SVals.h +++ b/include/clang/GR/PathSensitive/SVals.h @@ -29,7 +29,7 @@ namespace llvm { namespace clang { -namespace GR { +namespace ento { class CompoundValData; class LazyCompoundValData; @@ -342,7 +342,7 @@ public: }; class LocAsInteger : public NonLoc { - friend class GR::SValBuilder; + friend class ento::SValBuilder; explicit LocAsInteger(const std::pair& data) : NonLoc(LocAsIntegerKind, &data) { @@ -376,7 +376,7 @@ public: }; class CompoundVal : public NonLoc { - friend class GR::SValBuilder; + friend class ento::SValBuilder; explicit CompoundVal(const CompoundValData* D) : NonLoc(CompoundValKind, D) {} @@ -399,7 +399,7 @@ public: }; class LazyCompoundVal : public NonLoc { - friend class GR::SValBuilder; + friend class ento::SValBuilder; explicit LazyCompoundVal(const LazyCompoundValData *D) : NonLoc(LazyCompoundValKind, D) {} @@ -419,7 +419,7 @@ public: } }; -} // end namespace GR::nonloc +} // end namespace ento::nonloc //==------------------------------------------------------------------------==// // Subclasses of Loc. @@ -505,14 +505,14 @@ public: } }; -} // end GR::loc namespace +} // end ento::loc namespace } // end GR namespace } // end clang namespace namespace llvm { static inline llvm::raw_ostream& operator<<(llvm::raw_ostream& os, - clang::GR::SVal V) { + clang::ento::SVal V) { V.dumpToStream(os); return os; } diff --git a/include/clang/GR/PathSensitive/Store.h b/include/clang/GR/PathSensitive/Store.h index 446ea080fd..f82959b7da 100644 --- a/include/clang/GR/PathSensitive/Store.h +++ b/include/clang/GR/PathSensitive/Store.h @@ -26,7 +26,7 @@ class Expr; class ObjCIvarDecl; class StackFrameContext; -namespace GR { +namespace ento { /// Store - This opaque type encapsulates an immutable mapping from /// locations to values. At a high-level, it represents the symbolic diff --git a/include/clang/GR/PathSensitive/SubEngine.h b/include/clang/GR/PathSensitive/SubEngine.h index 0539e7a4f7..755dff703e 100644 --- a/include/clang/GR/PathSensitive/SubEngine.h +++ b/include/clang/GR/PathSensitive/SubEngine.h @@ -22,7 +22,7 @@ class CFGElement; class LocationContext; class Stmt; -namespace GR { +namespace ento { class AnalysisManager; class ExplodedNode; diff --git a/include/clang/GR/PathSensitive/SummaryManager.h b/include/clang/GR/PathSensitive/SummaryManager.h index 8f01ce27ca..ed87851598 100644 --- a/include/clang/GR/PathSensitive/SummaryManager.h +++ b/include/clang/GR/PathSensitive/SummaryManager.h @@ -20,7 +20,7 @@ namespace clang { -namespace GR { +namespace ento { namespace summMgr { diff --git a/include/clang/GR/PathSensitive/SymbolManager.h b/include/clang/GR/PathSensitive/SymbolManager.h index cab35057b0..ad173bb435 100644 --- a/include/clang/GR/PathSensitive/SymbolManager.h +++ b/include/clang/GR/PathSensitive/SymbolManager.h @@ -31,7 +31,7 @@ namespace clang { class ASTContext; class StackFrameContext; -namespace GR { +namespace ento { class BasicValueFactory; class MemRegion; class SubRegion; @@ -481,7 +481,7 @@ public: namespace llvm { static inline llvm::raw_ostream& operator<<(llvm::raw_ostream& os, - const clang::GR::SymExpr *SE) { + const clang::ento::SymExpr *SE) { SE->dumpToStream(os); return os; } diff --git a/include/clang/GR/PathSensitive/TransferFuncs.h b/include/clang/GR/PathSensitive/TransferFuncs.h index 10f46c440c..c73a33d160 100644 --- a/include/clang/GR/PathSensitive/TransferFuncs.h +++ b/include/clang/GR/PathSensitive/TransferFuncs.h @@ -22,7 +22,7 @@ namespace clang { class ObjCMessageExpr; -namespace GR { +namespace ento { class ExplodedNode; class ExplodedNodeSet; class EndPathNodeBuilder; diff --git a/include/clang/GR/PathSensitive/WorkList.h b/include/clang/GR/PathSensitive/WorkList.h index 6e354008cc..132bcf6e0b 100644 --- a/include/clang/GR/PathSensitive/WorkList.h +++ b/include/clang/GR/PathSensitive/WorkList.h @@ -22,7 +22,7 @@ namespace clang { class CFGBlock; -namespace GR { +namespace ento { class ExplodedNode; class ExplodedNodeImpl; diff --git a/lib/Analysis/CocoaConventions.cpp b/lib/Analysis/CocoaConventions.cpp index 5fb58de2f7..2c263cadad 100644 --- a/lib/Analysis/CocoaConventions.cpp +++ b/lib/Analysis/CocoaConventions.cpp @@ -18,7 +18,7 @@ #include "llvm/ADT/StringExtras.h" using namespace clang; -using namespace GR; +using namespace ento; using llvm::StringRef; diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 84bebf5526..ae6194beb8 100644 --- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -80,7 +80,7 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { case RewriteMacros: return new RewriteMacrosAction(); case RewriteObjC: return new RewriteObjCAction(); case RewriteTest: return new RewriteTestAction(); - case RunAnalysis: return new GR::AnalysisAction(); + case RunAnalysis: return new ento::AnalysisAction(); case RunPreprocessorOnly: return new PreprocessOnlyAction(); } } diff --git a/lib/GR/AggExprVisitor.cpp b/lib/GR/AggExprVisitor.cpp index 45022986de..af30c56974 100644 --- a/lib/GR/AggExprVisitor.cpp +++ b/lib/GR/AggExprVisitor.cpp @@ -16,7 +16,7 @@ #include "clang/AST/StmtVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { /// AggExprVisitor is designed after AggExprEmitter of the CodeGen module. It diff --git a/lib/GR/AnalysisManager.cpp b/lib/GR/AnalysisManager.cpp index b0942e1bb6..767ae4ab75 100644 --- a/lib/GR/AnalysisManager.cpp +++ b/lib/GR/AnalysisManager.cpp @@ -12,7 +12,7 @@ #include "clang/Index/Indexer.h" using namespace clang; -using namespace GR; +using namespace ento; AnalysisContext * AnalysisManager::getAnalysisContextInAnotherTU(const Decl *D) { diff --git a/lib/GR/AnalyzerStatsChecker.cpp b/lib/GR/AnalyzerStatsChecker.cpp index c60b4504b2..fa8ae59894 100644 --- a/lib/GR/AnalyzerStatsChecker.cpp +++ b/lib/GR/AnalyzerStatsChecker.cpp @@ -20,7 +20,7 @@ #include "llvm/ADT/SmallPtrSet.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class AnalyzerStatsChecker : public CheckerVisitor { @@ -38,7 +38,7 @@ void *AnalyzerStatsChecker::getTag() { return &x; } -void GR::RegisterAnalyzerStatsChecker(ExprEngine &Eng) { +void ento::RegisterAnalyzerStatsChecker(ExprEngine &Eng) { Eng.registerCheck(new AnalyzerStatsChecker()); } diff --git a/lib/GR/BasicConstraintManager.cpp b/lib/GR/BasicConstraintManager.cpp index 2de0d9a23c..da91f5c985 100644 --- a/lib/GR/BasicConstraintManager.cpp +++ b/lib/GR/BasicConstraintManager.cpp @@ -19,7 +19,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ConstNotEq {}; } @@ -32,7 +32,7 @@ static int ConstEqIndex = 0; static int ConstNotEqIndex = 0; namespace clang { -namespace GR { +namespace ento { template<> struct GRStateTrait : public GRStatePartialTrait { static inline void* GDMIndex() { return &ConstNotEqIndex; } @@ -98,7 +98,7 @@ public: } // end anonymous namespace -ConstraintManager* GR::CreateBasicConstraintManager(GRStateManager& statemgr, +ConstraintManager* ento::CreateBasicConstraintManager(GRStateManager& statemgr, SubEngine &subengine) { return new BasicConstraintManager(statemgr, subengine); } diff --git a/lib/GR/BasicStore.cpp b/lib/GR/BasicStore.cpp index 1c8ab11a96..9eb8d79ce4 100644 --- a/lib/GR/BasicStore.cpp +++ b/lib/GR/BasicStore.cpp @@ -19,7 +19,7 @@ #include "llvm/ADT/ImmutableMap.h" using namespace clang; -using namespace GR; +using namespace ento; typedef llvm::ImmutableMap BindingsTy; @@ -104,7 +104,7 @@ private: } // end anonymous namespace -StoreManager* GR::CreateBasicStoreManager(GRStateManager& StMgr) { +StoreManager* ento::CreateBasicStoreManager(GRStateManager& StMgr) { return new BasicStoreManager(StMgr); } diff --git a/lib/GR/BasicValueFactory.cpp b/lib/GR/BasicValueFactory.cpp index 7e45a15a9c..8e51361e00 100644 --- a/lib/GR/BasicValueFactory.cpp +++ b/lib/GR/BasicValueFactory.cpp @@ -16,7 +16,7 @@ #include "clang/GR/PathSensitive/BasicValueFactory.h" using namespace clang; -using namespace GR; +using namespace ento; void CompoundValData::Profile(llvm::FoldingSetNodeID& ID, QualType T, llvm::ImmutableList L) { diff --git a/lib/GR/BlockCounter.cpp b/lib/GR/BlockCounter.cpp index ee76e7a2bc..dadf707cf2 100644 --- a/lib/GR/BlockCounter.cpp +++ b/lib/GR/BlockCounter.cpp @@ -17,7 +17,7 @@ #include "llvm/ADT/ImmutableMap.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { diff --git a/lib/GR/BugReporter.cpp b/lib/GR/BugReporter.cpp index dedbd702bc..769e2b9c4d 100644 --- a/lib/GR/BugReporter.cpp +++ b/lib/GR/BugReporter.cpp @@ -30,7 +30,7 @@ #include using namespace clang; -using namespace GR; +using namespace ento; BugReporterVisitor::~BugReporterVisitor() {} BugReporterContext::~BugReporterContext() { diff --git a/lib/GR/BugReporterVisitors.cpp b/lib/GR/BugReporterVisitors.cpp index f56d053832..78b5ad66ab 100644 --- a/lib/GR/BugReporterVisitors.cpp +++ b/lib/GR/BugReporterVisitors.cpp @@ -20,7 +20,7 @@ #include "clang/GR/PathSensitive/GRState.h" using namespace clang; -using namespace GR; +using namespace ento; //===----------------------------------------------------------------------===// // Utility functions. diff --git a/lib/GR/CFRefCount.cpp b/lib/GR/CFRefCount.cpp index a99019cf37..2fe6b18c6d 100644 --- a/lib/GR/CFRefCount.cpp +++ b/lib/GR/CFRefCount.cpp @@ -34,7 +34,7 @@ #include using namespace clang; -using namespace GR; +using namespace ento; using llvm::StringRef; using llvm::StrInStrNoCase; @@ -397,7 +397,7 @@ void RefVal::print(llvm::raw_ostream& Out) const { typedef llvm::ImmutableMap RefBindings; namespace clang { -namespace GR { +namespace ento { template<> struct GRStateTrait : public GRStatePartialTrait { static void* GDMIndex() { @@ -1579,7 +1579,7 @@ namespace { class AutoreleasePoolContents {}; } namespace { class AutoreleaseStack {}; } namespace clang { -namespace GR { +namespace ento { template<> struct GRStateTrait : public GRStatePartialTrait { static inline void* GDMIndex() { return &AutoRBIndex; } @@ -3494,7 +3494,7 @@ void CFRefCount::RegisterChecks(ExprEngine& Eng) { Eng.registerCheck(new RetainReleaseChecker(this)); } -TransferFuncs* GR::MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled, +TransferFuncs* ento::MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled, const LangOptions& lopts) { return new CFRefCount(Ctx, GCEnabled, lopts); } diff --git a/lib/GR/CXXExprEngine.cpp b/lib/GR/CXXExprEngine.cpp index b1111c90fe..eee90f2b21 100644 --- a/lib/GR/CXXExprEngine.cpp +++ b/lib/GR/CXXExprEngine.cpp @@ -16,7 +16,7 @@ #include "clang/AST/DeclCXX.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class CallExprWLItem { diff --git a/lib/GR/Checker.cpp b/lib/GR/Checker.cpp index 521d9e2b7d..975d8475bc 100644 --- a/lib/GR/Checker.cpp +++ b/lib/GR/Checker.cpp @@ -14,7 +14,7 @@ #include "clang/GR/PathSensitive/Checker.h" using namespace clang; -using namespace GR; +using namespace ento; Checker::~Checker() {} diff --git a/lib/GR/CheckerHelpers.cpp b/lib/GR/CheckerHelpers.cpp index 23144a300e..81e83399ed 100644 --- a/lib/GR/CheckerHelpers.cpp +++ b/lib/GR/CheckerHelpers.cpp @@ -15,7 +15,7 @@ #include "clang/AST/Expr.h" // Recursively find any substatements containing macros -bool clang::GR::containsMacro(const Stmt *S) { +bool clang::ento::containsMacro(const Stmt *S) { if (S->getLocStart().isMacroID()) return true; @@ -32,7 +32,7 @@ bool clang::GR::containsMacro(const Stmt *S) { } // Recursively find any substatements containing enum constants -bool clang::GR::containsEnum(const Stmt *S) { +bool clang::ento::containsEnum(const Stmt *S) { const DeclRefExpr *DR = dyn_cast(S); if (DR && isa(DR->getDecl())) @@ -48,7 +48,7 @@ bool clang::GR::containsEnum(const Stmt *S) { } // Recursively find any substatements containing static vars -bool clang::GR::containsStaticLocal(const Stmt *S) { +bool clang::ento::containsStaticLocal(const Stmt *S) { const DeclRefExpr *DR = dyn_cast(S); if (DR) @@ -66,7 +66,7 @@ bool clang::GR::containsStaticLocal(const Stmt *S) { } // Recursively find any substatements containing __builtin_offsetof -bool clang::GR::containsBuiltinOffsetOf(const Stmt *S) { +bool clang::ento::containsBuiltinOffsetOf(const Stmt *S) { if (isa(S)) return true; diff --git a/lib/GR/Checkers/AdjustedReturnValueChecker.cpp b/lib/GR/Checkers/AdjustedReturnValueChecker.cpp index 3c78b39d20..d4e5389f85 100644 --- a/lib/GR/Checkers/AdjustedReturnValueChecker.cpp +++ b/lib/GR/Checkers/AdjustedReturnValueChecker.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class AdjustedReturnValueChecker : @@ -35,7 +35,7 @@ public: }; } -void GR::RegisterAdjustedReturnValueChecker(ExprEngine &Eng) { +void ento::RegisterAdjustedReturnValueChecker(ExprEngine &Eng) { Eng.registerCheck(new AdjustedReturnValueChecker()); } diff --git a/lib/GR/Checkers/AnalysisConsumer.cpp b/lib/GR/Checkers/AnalysisConsumer.cpp index 28a260c3e3..f70de0596b 100644 --- a/lib/GR/Checkers/AnalysisConsumer.cpp +++ b/lib/GR/Checkers/AnalysisConsumer.cpp @@ -43,7 +43,7 @@ #include "llvm/ADT/OwningPtr.h" using namespace clang; -using namespace GR; +using namespace ento; static ExplodedNode::Auditor* CreateUbiViz(); @@ -477,7 +477,7 @@ static void ActionWarnSizeofPointer(AnalysisConsumer &C, AnalysisManager &mgr, // AnalysisConsumer creation. //===----------------------------------------------------------------------===// -ASTConsumer* GR::CreateAnalysisConsumer(const Preprocessor& pp, +ASTConsumer* ento::CreateAnalysisConsumer(const Preprocessor& pp, const std::string& OutDir, const AnalyzerOptions& Opts) { llvm::OwningPtr C(new AnalysisConsumer(pp, OutDir, Opts)); diff --git a/lib/GR/Checkers/ArrayBoundChecker.cpp b/lib/GR/Checkers/ArrayBoundChecker.cpp index 9dc53a2360..9d4e3c4fd9 100644 --- a/lib/GR/Checkers/ArrayBoundChecker.cpp +++ b/lib/GR/Checkers/ArrayBoundChecker.cpp @@ -18,7 +18,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ArrayBoundChecker : @@ -31,7 +31,7 @@ public: }; } -void GR::RegisterArrayBoundChecker(ExprEngine &Eng) { +void ento::RegisterArrayBoundChecker(ExprEngine &Eng) { Eng.registerCheck(new ArrayBoundChecker()); } diff --git a/lib/GR/Checkers/ArrayBoundCheckerV2.cpp b/lib/GR/Checkers/ArrayBoundCheckerV2.cpp index 9a672087bc..1753ac52a8 100644 --- a/lib/GR/Checkers/ArrayBoundCheckerV2.cpp +++ b/lib/GR/Checkers/ArrayBoundCheckerV2.cpp @@ -19,7 +19,7 @@ #include "clang/AST/CharUnits.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ArrayBoundCheckerV2 : @@ -62,7 +62,7 @@ public: }; } -void GR::RegisterArrayBoundCheckerV2(ExprEngine &Eng) { +void ento::RegisterArrayBoundCheckerV2(ExprEngine &Eng) { Eng.registerCheck(new ArrayBoundCheckerV2()); } diff --git a/lib/GR/Checkers/AttrNonNullChecker.cpp b/lib/GR/Checkers/AttrNonNullChecker.cpp index 74eb882d54..5c2aede815 100644 --- a/lib/GR/Checkers/AttrNonNullChecker.cpp +++ b/lib/GR/Checkers/AttrNonNullChecker.cpp @@ -17,7 +17,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class AttrNonNullChecker @@ -33,7 +33,7 @@ public: }; } // end anonymous namespace -void GR::RegisterAttrNonNullChecker(ExprEngine &Eng) { +void ento::RegisterAttrNonNullChecker(ExprEngine &Eng) { Eng.registerCheck(new AttrNonNullChecker()); } diff --git a/lib/GR/Checkers/BasicObjCFoundationChecks.cpp b/lib/GR/Checkers/BasicObjCFoundationChecks.cpp index 33a58bdec9..a172477bd6 100644 --- a/lib/GR/Checkers/BasicObjCFoundationChecks.cpp +++ b/lib/GR/Checkers/BasicObjCFoundationChecks.cpp @@ -29,7 +29,7 @@ #include "clang/AST/ASTContext.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class APIMisuse : public BugType { @@ -511,7 +511,7 @@ void ClassReleaseChecker::PreVisitObjCMessageExpr(CheckerContext &C, // Check registration. //===----------------------------------------------------------------------===// -void GR::RegisterAppleChecks(ExprEngine& Eng, const Decl &D) { +void ento::RegisterAppleChecks(ExprEngine& Eng, const Decl &D) { Eng.registerCheck(new NilArgChecker()); Eng.registerCheck(new CFNumberCreateChecker()); RegisterNSErrorChecks(Eng.getBugReporter(), Eng, D); diff --git a/lib/GR/Checkers/BasicObjCFoundationChecks.h b/lib/GR/Checkers/BasicObjCFoundationChecks.h index 63143ebe25..f4966e8ae8 100644 --- a/lib/GR/Checkers/BasicObjCFoundationChecks.h +++ b/lib/GR/Checkers/BasicObjCFoundationChecks.h @@ -21,7 +21,7 @@ namespace clang { class ASTContext; class Decl; -namespace GR { +namespace ento { class BugReporter; class ExprEngine; diff --git a/lib/GR/Checkers/BuiltinFunctionChecker.cpp b/lib/GR/Checkers/BuiltinFunctionChecker.cpp index 27162e40af..697f0a4c00 100644 --- a/lib/GR/Checkers/BuiltinFunctionChecker.cpp +++ b/lib/GR/Checkers/BuiltinFunctionChecker.cpp @@ -16,7 +16,7 @@ #include "clang/Basic/Builtins.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -28,7 +28,7 @@ public: } -void GR::RegisterBuiltinFunctionChecker(ExprEngine &Eng) { +void ento::RegisterBuiltinFunctionChecker(ExprEngine &Eng) { Eng.registerCheck(new BuiltinFunctionChecker()); } diff --git a/lib/GR/Checkers/CStringChecker.cpp b/lib/GR/Checkers/CStringChecker.cpp index a9d3064fca..d658c2f3dd 100644 --- a/lib/GR/Checkers/CStringChecker.cpp +++ b/lib/GR/Checkers/CStringChecker.cpp @@ -19,7 +19,7 @@ #include "llvm/ADT/StringSwitch.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class CStringChecker : public CheckerVisitor { @@ -100,7 +100,7 @@ public: } //end anonymous namespace namespace clang { -namespace GR { +namespace ento { template <> struct GRStateTrait : public GRStatePartialTrait { @@ -109,7 +109,7 @@ namespace GR { } } -void GR::RegisterCStringChecker(ExprEngine &Eng) { +void ento::RegisterCStringChecker(ExprEngine &Eng) { Eng.registerCheck(new CStringChecker()); } diff --git a/lib/GR/Checkers/CallAndMessageChecker.cpp b/lib/GR/Checkers/CallAndMessageChecker.cpp index f3306d136b..24fc20ef13 100644 --- a/lib/GR/Checkers/CallAndMessageChecker.cpp +++ b/lib/GR/Checkers/CallAndMessageChecker.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class CallAndMessageChecker @@ -62,7 +62,7 @@ private: }; } // end anonymous namespace -void GR::RegisterCallAndMessageChecker(ExprEngine &Eng) { +void ento::RegisterCallAndMessageChecker(ExprEngine &Eng) { Eng.registerCheck(new CallAndMessageChecker()); } diff --git a/lib/GR/Checkers/CastSizeChecker.cpp b/lib/GR/Checkers/CastSizeChecker.cpp index c17dc7a266..7844f51f06 100644 --- a/lib/GR/Checkers/CastSizeChecker.cpp +++ b/lib/GR/Checkers/CastSizeChecker.cpp @@ -17,7 +17,7 @@ #include "ExprEngineInternalChecks.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class CastSizeChecker : public CheckerVisitor { @@ -86,6 +86,6 @@ void CastSizeChecker::PreVisitCastExpr(CheckerContext &C, const CastExpr *CE) { } -void GR::RegisterCastSizeChecker(ExprEngine &Eng) { +void ento::RegisterCastSizeChecker(ExprEngine &Eng) { Eng.registerCheck(new CastSizeChecker()); } diff --git a/lib/GR/Checkers/CastToStructChecker.cpp b/lib/GR/Checkers/CastToStructChecker.cpp index 7b0732938c..236623fc4a 100644 --- a/lib/GR/Checkers/CastToStructChecker.cpp +++ b/lib/GR/Checkers/CastToStructChecker.cpp @@ -18,7 +18,7 @@ #include "ExprEngineInternalChecks.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class CastToStructChecker @@ -74,6 +74,6 @@ void CastToStructChecker::PreVisitCastExpr(CheckerContext &C, } } -void GR::RegisterCastToStructChecker(ExprEngine &Eng) { +void ento::RegisterCastToStructChecker(ExprEngine &Eng) { Eng.registerCheck(new CastToStructChecker()); } diff --git a/lib/GR/Checkers/CheckDeadStores.cpp b/lib/GR/Checkers/CheckDeadStores.cpp index edcf57ceca..d2ffd6acb4 100644 --- a/lib/GR/Checkers/CheckDeadStores.cpp +++ b/lib/GR/Checkers/CheckDeadStores.cpp @@ -24,7 +24,7 @@ #include "llvm/ADT/SmallPtrSet.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -281,7 +281,7 @@ public: } // end anonymous namespace -void GR::CheckDeadStores(CFG &cfg, LiveVariables &L, ParentMap &pmap, +void ento::CheckDeadStores(CFG &cfg, LiveVariables &L, ParentMap &pmap, BugReporter& BR) { FindEscaped FS(&cfg); FS.getCFG().VisitBlockStmts(FS); diff --git a/lib/GR/Checkers/CheckObjCDealloc.cpp b/lib/GR/Checkers/CheckObjCDealloc.cpp index f8ec7f6eda..1aa0249282 100644 --- a/lib/GR/Checkers/CheckObjCDealloc.cpp +++ b/lib/GR/Checkers/CheckObjCDealloc.cpp @@ -23,7 +23,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; static bool scan_dealloc(Stmt* S, Selector Dealloc) { @@ -94,7 +94,7 @@ static bool scan_ivar_release(Stmt* S, ObjCIvarDecl* ID, return false; } -void GR::CheckObjCDealloc(const ObjCImplementationDecl* D, +void ento::CheckObjCDealloc(const ObjCImplementationDecl* D, const LangOptions& LOpts, BugReporter& BR) { assert (LOpts.getGCMode() != LangOptions::GCOnly); diff --git a/lib/GR/Checkers/CheckObjCInstMethSignature.cpp b/lib/GR/Checkers/CheckObjCInstMethSignature.cpp index b2be375f10..62c5e60005 100644 --- a/lib/GR/Checkers/CheckObjCInstMethSignature.cpp +++ b/lib/GR/Checkers/CheckObjCInstMethSignature.cpp @@ -24,7 +24,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; static bool AreTypesCompatible(QualType Derived, QualType Ancestor, ASTContext& C) { @@ -70,7 +70,7 @@ static void CompareReturnTypes(const ObjCMethodDecl *MethDerived, } } -void GR::CheckObjCInstMethSignature(const ObjCImplementationDecl* ID, +void ento::CheckObjCInstMethSignature(const ObjCImplementationDecl* ID, BugReporter& BR) { const ObjCInterfaceDecl* D = ID->getClassInterface(); diff --git a/lib/GR/Checkers/CheckSecuritySyntaxOnly.cpp b/lib/GR/Checkers/CheckSecuritySyntaxOnly.cpp index ea658e3984..bdb03f8038 100644 --- a/lib/GR/Checkers/CheckSecuritySyntaxOnly.cpp +++ b/lib/GR/Checkers/CheckSecuritySyntaxOnly.cpp @@ -18,7 +18,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; static bool isArc4RandomAvailable(const ASTContext &Ctx) { const llvm::Triple &T = Ctx.Target.getTriple(); @@ -497,7 +497,7 @@ void WalkAST::CheckUncheckedReturnValue(CallExpr *CE) { // Entry point for check. //===----------------------------------------------------------------------===// -void GR::CheckSecuritySyntaxOnly(const Decl *D, BugReporter &BR) { +void ento::CheckSecuritySyntaxOnly(const Decl *D, BugReporter &BR) { WalkAST walker(BR); walker.Visit(D->getBody()); } diff --git a/lib/GR/Checkers/CheckSizeofPointer.cpp b/lib/GR/Checkers/CheckSizeofPointer.cpp index 696dce2941..3a2e8c7b50 100644 --- a/lib/GR/Checkers/CheckSizeofPointer.cpp +++ b/lib/GR/Checkers/CheckSizeofPointer.cpp @@ -17,7 +17,7 @@ #include "clang/GR/Checkers/LocalCheckers.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class WalkAST : public StmtVisitor { @@ -66,7 +66,7 @@ void WalkAST::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { } } -void GR::CheckSizeofPointer(const Decl *D, BugReporter &BR) { +void ento::CheckSizeofPointer(const Decl *D, BugReporter &BR) { WalkAST walker(BR); walker.Visit(D->getBody()); } diff --git a/lib/GR/Checkers/ChrootChecker.cpp b/lib/GR/Checkers/ChrootChecker.cpp index 58b34d0852..6a36593894 100644 --- a/lib/GR/Checkers/ChrootChecker.cpp +++ b/lib/GR/Checkers/ChrootChecker.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/SymbolManager.h" #include "llvm/ADT/ImmutableMap.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -59,7 +59,7 @@ private: } // end anonymous namespace -void GR::RegisterChrootChecker(ExprEngine &Eng) { +void ento::RegisterChrootChecker(ExprEngine &Eng) { Eng.registerCheck(new ChrootChecker()); } diff --git a/lib/GR/Checkers/DereferenceChecker.cpp b/lib/GR/Checkers/DereferenceChecker.cpp index dbe0ab3262..cecea57192 100644 --- a/lib/GR/Checkers/DereferenceChecker.cpp +++ b/lib/GR/Checkers/DereferenceChecker.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class DereferenceChecker : public Checker { @@ -43,12 +43,12 @@ public: }; } // end anonymous namespace -void GR::RegisterDereferenceChecker(ExprEngine &Eng) { +void ento::RegisterDereferenceChecker(ExprEngine &Eng) { Eng.registerCheck(new DereferenceChecker()); } std::pair -GR::GetImplicitNullDereferences(ExprEngine &Eng) { +ento::GetImplicitNullDereferences(ExprEngine &Eng) { DereferenceChecker *checker = Eng.getChecker(); if (!checker) return std::make_pair((ExplodedNode * const *) 0, diff --git a/lib/GR/Checkers/DivZeroChecker.cpp b/lib/GR/Checkers/DivZeroChecker.cpp index 1475a9e1cd..2119a0ca2f 100644 --- a/lib/GR/Checkers/DivZeroChecker.cpp +++ b/lib/GR/Checkers/DivZeroChecker.cpp @@ -17,7 +17,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class DivZeroChecker : public CheckerVisitor { @@ -29,7 +29,7 @@ public: }; } // end anonymous namespace -void GR::RegisterDivZeroChecker(ExprEngine &Eng) { +void ento::RegisterDivZeroChecker(ExprEngine &Eng) { Eng.registerCheck(new DivZeroChecker()); } diff --git a/lib/GR/Checkers/ExprEngine.cpp b/lib/GR/Checkers/ExprEngine.cpp index 6e82504f37..2ff665c941 100644 --- a/lib/GR/Checkers/ExprEngine.cpp +++ b/lib/GR/Checkers/ExprEngine.cpp @@ -37,7 +37,7 @@ #endif using namespace clang; -using namespace GR; +using namespace ento; using llvm::dyn_cast; using llvm::dyn_cast_or_null; using llvm::cast; diff --git a/lib/GR/Checkers/ExprEngineExperimentalChecks.cpp b/lib/GR/Checkers/ExprEngineExperimentalChecks.cpp index d7ad99ffc2..9f3c04ae91 100644 --- a/lib/GR/Checkers/ExprEngineExperimentalChecks.cpp +++ b/lib/GR/Checkers/ExprEngineExperimentalChecks.cpp @@ -17,9 +17,9 @@ #include "clang/GR/Checkers/LocalCheckers.h" using namespace clang; -using namespace GR; +using namespace ento; -void GR::RegisterExperimentalChecks(ExprEngine &Eng) { +void ento::RegisterExperimentalChecks(ExprEngine &Eng) { // These are checks that never belong as internal checks // within ExprEngine. RegisterCStringChecker(Eng); @@ -30,7 +30,7 @@ void GR::RegisterExperimentalChecks(ExprEngine &Eng) { RegisterUnreachableCodeChecker(Eng); } -void GR::RegisterExperimentalInternalChecks(ExprEngine &Eng) { +void ento::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 index 4a04fb9b2f..f8359d1c5c 100644 --- a/lib/GR/Checkers/ExprEngineExperimentalChecks.h +++ b/lib/GR/Checkers/ExprEngineExperimentalChecks.h @@ -17,7 +17,7 @@ namespace clang { -namespace GR { +namespace ento { class ExprEngine; diff --git a/lib/GR/Checkers/ExprEngineInternalChecks.h b/lib/GR/Checkers/ExprEngineInternalChecks.h index bfb22f5c9e..f67371da0f 100644 --- a/lib/GR/Checkers/ExprEngineInternalChecks.h +++ b/lib/GR/Checkers/ExprEngineInternalChecks.h @@ -17,7 +17,7 @@ namespace clang { -namespace GR { +namespace ento { class ExprEngine; diff --git a/lib/GR/Checkers/FixedAddressChecker.cpp b/lib/GR/Checkers/FixedAddressChecker.cpp index d7caad17da..1d629ee55e 100644 --- a/lib/GR/Checkers/FixedAddressChecker.cpp +++ b/lib/GR/Checkers/FixedAddressChecker.cpp @@ -18,7 +18,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class FixedAddressChecker @@ -67,6 +67,6 @@ void FixedAddressChecker::PreVisitBinaryOperator(CheckerContext &C, } } -void GR::RegisterFixedAddressChecker(ExprEngine &Eng) { +void ento::RegisterFixedAddressChecker(ExprEngine &Eng) { Eng.registerCheck(new FixedAddressChecker()); } diff --git a/lib/GR/Checkers/FrontendActions.cpp b/lib/GR/Checkers/FrontendActions.cpp index 2097657ca3..c88378279a 100644 --- a/lib/GR/Checkers/FrontendActions.cpp +++ b/lib/GR/Checkers/FrontendActions.cpp @@ -11,7 +11,7 @@ #include "clang/Frontend/CompilerInstance.h" #include "clang/GR/AnalysisConsumer.h" using namespace clang; -using namespace GR; +using namespace ento; ASTConsumer *AnalysisAction::CreateASTConsumer(CompilerInstance &CI, llvm::StringRef InFile) { diff --git a/lib/GR/Checkers/IdempotentOperationChecker.cpp b/lib/GR/Checkers/IdempotentOperationChecker.cpp index 15e9be9580..56bb542e92 100644 --- a/lib/GR/Checkers/IdempotentOperationChecker.cpp +++ b/lib/GR/Checkers/IdempotentOperationChecker.cpp @@ -58,7 +58,7 @@ #include using namespace clang; -using namespace GR; +using namespace ento; namespace { class IdempotentOperationChecker @@ -130,7 +130,7 @@ void *IdempotentOperationChecker::getTag() { return &x; } -void GR::RegisterIdempotentOperationChecker(ExprEngine &Eng) { +void ento::RegisterIdempotentOperationChecker(ExprEngine &Eng) { Eng.registerCheck(new IdempotentOperationChecker()); } diff --git a/lib/GR/Checkers/LLVMConventionsChecker.cpp b/lib/GR/Checkers/LLVMConventionsChecker.cpp index 655e756516..864dd85093 100644 --- a/lib/GR/Checkers/LLVMConventionsChecker.cpp +++ b/lib/GR/Checkers/LLVMConventionsChecker.cpp @@ -20,7 +20,7 @@ #include "llvm/ADT/StringRef.h" using namespace clang; -using namespace GR; +using namespace ento; //===----------------------------------------------------------------------===// // Generic type checking routines. @@ -306,7 +306,7 @@ static void ScanCodeDecls(DeclContext *DC, BugReporter &BR) { } } -void GR::CheckLLVMConventions(TranslationUnitDecl &TU, +void ento::CheckLLVMConventions(TranslationUnitDecl &TU, BugReporter &BR) { ScanCodeDecls(&TU, BR); } diff --git a/lib/GR/Checkers/MacOSXAPIChecker.cpp b/lib/GR/Checkers/MacOSXAPIChecker.cpp index d7728713f8..5934c5ffbf 100644 --- a/lib/GR/Checkers/MacOSXAPIChecker.cpp +++ b/lib/GR/Checkers/MacOSXAPIChecker.cpp @@ -25,7 +25,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class MacOSXAPIChecker : public CheckerVisitor { @@ -45,7 +45,7 @@ public: }; } //end anonymous namespace -void GR::RegisterMacOSXAPIChecker(ExprEngine &Eng) { +void ento::RegisterMacOSXAPIChecker(ExprEngine &Eng) { if (Eng.getContext().Target.getTriple().getVendor() == llvm::Triple::Apple) Eng.registerCheck(new MacOSXAPIChecker()); } diff --git a/lib/GR/Checkers/MallocChecker.cpp b/lib/GR/Checkers/MallocChecker.cpp index bbfc7b076d..a4d317f8b0 100644 --- a/lib/GR/Checkers/MallocChecker.cpp +++ b/lib/GR/Checkers/MallocChecker.cpp @@ -20,7 +20,7 @@ #include "clang/GR/PathSensitive/SymbolManager.h" #include "llvm/ADT/ImmutableMap.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -117,7 +117,7 @@ private: typedef llvm::ImmutableMap RegionStateTy; namespace clang { -namespace GR { +namespace ento { template <> struct GRStateTrait : public GRStatePartialTrait { @@ -126,7 +126,7 @@ namespace GR { } } -void GR::RegisterMallocChecker(ExprEngine &Eng) { +void ento::RegisterMallocChecker(ExprEngine &Eng) { Eng.registerCheck(new MallocChecker()); } diff --git a/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp b/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp index beb4a81743..c93121fcd9 100644 --- a/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp +++ b/lib/GR/Checkers/NSAutoreleasePoolChecker.cpp @@ -23,7 +23,7 @@ #include "clang/AST/Decl.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class NSAutoreleasePoolChecker @@ -45,7 +45,7 @@ public: } // end anonymous namespace -void GR::RegisterNSAutoreleasePoolChecks(ExprEngine &Eng) { +void ento::RegisterNSAutoreleasePoolChecks(ExprEngine &Eng) { ASTContext &Ctx = Eng.getContext(); if (Ctx.getLangOptions().getGCMode() != LangOptions::NonGC) { Eng.registerCheck(new NSAutoreleasePoolChecker(GetNullarySelector("release", diff --git a/lib/GR/Checkers/NSErrorChecker.cpp b/lib/GR/Checkers/NSErrorChecker.cpp index 3cfb044d6f..ee3f901ad5 100644 --- a/lib/GR/Checkers/NSErrorChecker.cpp +++ b/lib/GR/Checkers/NSErrorChecker.cpp @@ -25,7 +25,7 @@ #include "llvm/ADT/SmallVector.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class NSErrorChecker : public BugType { @@ -63,7 +63,7 @@ public: } // end anonymous namespace -void GR::RegisterNSErrorChecks(BugReporter& BR, ExprEngine &Eng, +void ento::RegisterNSErrorChecks(BugReporter& BR, ExprEngine &Eng, const Decl &D) { BR.Register(new NSErrorChecker(D, true, Eng)); BR.Register(new NSErrorChecker(D, false, Eng)); diff --git a/lib/GR/Checkers/NoReturnFunctionChecker.cpp b/lib/GR/Checkers/NoReturnFunctionChecker.cpp index f6d33dbda8..ad86ac500d 100644 --- a/lib/GR/Checkers/NoReturnFunctionChecker.cpp +++ b/lib/GR/Checkers/NoReturnFunctionChecker.cpp @@ -17,7 +17,7 @@ #include "llvm/ADT/StringSwitch.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -29,7 +29,7 @@ public: } -void GR::RegisterNoReturnFunctionChecker(ExprEngine &Eng) { +void ento::RegisterNoReturnFunctionChecker(ExprEngine &Eng) { Eng.registerCheck(new NoReturnFunctionChecker()); } diff --git a/lib/GR/Checkers/OSAtomicChecker.cpp b/lib/GR/Checkers/OSAtomicChecker.cpp index c27e50880e..3d230ce76e 100644 --- a/lib/GR/Checkers/OSAtomicChecker.cpp +++ b/lib/GR/Checkers/OSAtomicChecker.cpp @@ -16,7 +16,7 @@ #include "clang/Basic/Builtins.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -31,7 +31,7 @@ private: } -void GR::RegisterOSAtomicChecker(ExprEngine &Eng) { +void ento::RegisterOSAtomicChecker(ExprEngine &Eng) { Eng.registerCheck(new OSAtomicChecker()); } diff --git a/lib/GR/Checkers/ObjCAtSyncChecker.cpp b/lib/GR/Checkers/ObjCAtSyncChecker.cpp index 40619a2a85..b44fae8b6c 100644 --- a/lib/GR/Checkers/ObjCAtSyncChecker.cpp +++ b/lib/GR/Checkers/ObjCAtSyncChecker.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ObjCAtSyncChecker : public CheckerVisitor { @@ -33,7 +33,7 @@ public: }; } // end anonymous namespace -void GR::RegisterObjCAtSyncChecker(ExprEngine &Eng) { +void ento::RegisterObjCAtSyncChecker(ExprEngine &Eng) { // @synchronized is an Objective-C 2 feature. if (Eng.getContext().getLangOptions().ObjC2) Eng.registerCheck(new ObjCAtSyncChecker()); diff --git a/lib/GR/Checkers/ObjCUnusedIVarsChecker.cpp b/lib/GR/Checkers/ObjCUnusedIVarsChecker.cpp index 611914fbc0..177f6a2267 100644 --- a/lib/GR/Checkers/ObjCUnusedIVarsChecker.cpp +++ b/lib/GR/Checkers/ObjCUnusedIVarsChecker.cpp @@ -23,7 +23,7 @@ #include "clang/Basic/SourceManager.h" using namespace clang; -using namespace GR; +using namespace ento; enum IVarState { Unused, Used }; typedef llvm::DenseMap IvarUsageMap; @@ -98,7 +98,7 @@ static void Scan(IvarUsageMap &M, const DeclContext *C, const FileID FID, } } -void GR::CheckObjCUnusedIvar(const ObjCImplementationDecl *D, +void ento::CheckObjCUnusedIvar(const ObjCImplementationDecl *D, BugReporter &BR) { const ObjCInterfaceDecl* ID = D->getClassInterface(); diff --git a/lib/GR/Checkers/PointerArithChecker.cpp b/lib/GR/Checkers/PointerArithChecker.cpp index 1f870052c1..f40eeec52f 100644 --- a/lib/GR/Checkers/PointerArithChecker.cpp +++ b/lib/GR/Checkers/PointerArithChecker.cpp @@ -17,7 +17,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class PointerArithChecker @@ -67,6 +67,6 @@ void PointerArithChecker::PreVisitBinaryOperator(CheckerContext &C, } } -void GR::RegisterPointerArithChecker(ExprEngine &Eng) { +void ento::RegisterPointerArithChecker(ExprEngine &Eng) { Eng.registerCheck(new PointerArithChecker()); } diff --git a/lib/GR/Checkers/PointerSubChecker.cpp b/lib/GR/Checkers/PointerSubChecker.cpp index 57ab31803c..63aa90429e 100644 --- a/lib/GR/Checkers/PointerSubChecker.cpp +++ b/lib/GR/Checkers/PointerSubChecker.cpp @@ -18,7 +18,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class PointerSubChecker @@ -74,6 +74,6 @@ void PointerSubChecker::PreVisitBinaryOperator(CheckerContext &C, } } -void GR::RegisterPointerSubChecker(ExprEngine &Eng) { +void ento::RegisterPointerSubChecker(ExprEngine &Eng) { Eng.registerCheck(new PointerSubChecker()); } diff --git a/lib/GR/Checkers/PthreadLockChecker.cpp b/lib/GR/Checkers/PthreadLockChecker.cpp index ae58b78fb8..517f6b15ab 100644 --- a/lib/GR/Checkers/PthreadLockChecker.cpp +++ b/lib/GR/Checkers/PthreadLockChecker.cpp @@ -19,7 +19,7 @@ #include "llvm/ADT/ImmutableSet.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class PthreadLockChecker @@ -45,7 +45,7 @@ public: // GDM Entry for tracking lock state. namespace { class LockSet {}; } namespace clang { -namespace GR { +namespace ento { template <> struct GRStateTrait : public GRStatePartialTrait > { static void* GDMIndex() { return PthreadLockChecker::getTag(); } @@ -53,7 +53,7 @@ template <> struct GRStateTrait : } // end GR namespace } // end clang namespace -void GR::RegisterPthreadLockChecker(ExprEngine &Eng) { +void ento::RegisterPthreadLockChecker(ExprEngine &Eng) { Eng.registerCheck(new PthreadLockChecker()); } diff --git a/lib/GR/Checkers/ReturnPointerRangeChecker.cpp b/lib/GR/Checkers/ReturnPointerRangeChecker.cpp index 4ef5737f35..80316f58c1 100644 --- a/lib/GR/Checkers/ReturnPointerRangeChecker.cpp +++ b/lib/GR/Checkers/ReturnPointerRangeChecker.cpp @@ -18,7 +18,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ReturnPointerRangeChecker : @@ -31,7 +31,7 @@ public: }; } -void GR::RegisterReturnPointerRangeChecker(ExprEngine &Eng) { +void ento::RegisterReturnPointerRangeChecker(ExprEngine &Eng) { Eng.registerCheck(new ReturnPointerRangeChecker()); } diff --git a/lib/GR/Checkers/ReturnUndefChecker.cpp b/lib/GR/Checkers/ReturnUndefChecker.cpp index 2a1027a930..17a2a55ebd 100644 --- a/lib/GR/Checkers/ReturnUndefChecker.cpp +++ b/lib/GR/Checkers/ReturnUndefChecker.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ReturnUndefChecker : @@ -32,7 +32,7 @@ public: }; } -void GR::RegisterReturnUndefChecker(ExprEngine &Eng) { +void ento::RegisterReturnUndefChecker(ExprEngine &Eng) { Eng.registerCheck(new ReturnUndefChecker()); } diff --git a/lib/GR/Checkers/StackAddrLeakChecker.cpp b/lib/GR/Checkers/StackAddrLeakChecker.cpp index 3ef78a46fb..229356ad67 100644 --- a/lib/GR/Checkers/StackAddrLeakChecker.cpp +++ b/lib/GR/Checkers/StackAddrLeakChecker.cpp @@ -19,7 +19,7 @@ #include "clang/Basic/SourceManager.h" #include "llvm/ADT/SmallString.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class StackAddrLeakChecker : public CheckerVisitor { @@ -41,7 +41,7 @@ private: }; } -void GR::RegisterStackAddrLeakChecker(ExprEngine &Eng) { +void ento::RegisterStackAddrLeakChecker(ExprEngine &Eng) { Eng.registerCheck(new StackAddrLeakChecker()); } diff --git a/lib/GR/Checkers/StreamChecker.cpp b/lib/GR/Checkers/StreamChecker.cpp index 73c2920ad9..32e22b0419 100644 --- a/lib/GR/Checkers/StreamChecker.cpp +++ b/lib/GR/Checkers/StreamChecker.cpp @@ -20,7 +20,7 @@ #include "llvm/ADT/ImmutableMap.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -105,7 +105,7 @@ private: } // end anonymous namespace namespace clang { -namespace GR { +namespace ento { template <> struct GRStateTrait : public GRStatePartialTrait > { @@ -114,7 +114,7 @@ namespace GR { } } -void GR::RegisterStreamChecker(ExprEngine &Eng) { +void ento::RegisterStreamChecker(ExprEngine &Eng) { Eng.registerCheck(new StreamChecker()); } diff --git a/lib/GR/Checkers/UndefBranchChecker.cpp b/lib/GR/Checkers/UndefBranchChecker.cpp index e999d8bc13..fc668be35c 100644 --- a/lib/GR/Checkers/UndefBranchChecker.cpp +++ b/lib/GR/Checkers/UndefBranchChecker.cpp @@ -17,7 +17,7 @@ #include "clang/GR/PathSensitive/Checker.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { @@ -56,7 +56,7 @@ public: } -void GR::RegisterUndefBranchChecker(ExprEngine &Eng) { +void ento::RegisterUndefBranchChecker(ExprEngine &Eng) { Eng.registerCheck(new UndefBranchChecker()); } diff --git a/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp b/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp index 2b45c95843..8ceda3ddc5 100644 --- a/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp +++ b/lib/GR/Checkers/UndefCapturedBlockVarChecker.cpp @@ -18,7 +18,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class UndefCapturedBlockVarChecker @@ -32,7 +32,7 @@ public: }; } // end anonymous namespace -void GR::RegisterUndefCapturedBlockVarChecker(ExprEngine &Eng) { +void ento::RegisterUndefCapturedBlockVarChecker(ExprEngine &Eng) { Eng.registerCheck(new UndefCapturedBlockVarChecker()); } diff --git a/lib/GR/Checkers/UndefResultChecker.cpp b/lib/GR/Checkers/UndefResultChecker.cpp index 348573d21c..3d4faa2988 100644 --- a/lib/GR/Checkers/UndefResultChecker.cpp +++ b/lib/GR/Checkers/UndefResultChecker.cpp @@ -18,7 +18,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class UndefResultChecker @@ -33,7 +33,7 @@ public: }; } // end anonymous namespace -void GR::RegisterUndefResultChecker(ExprEngine &Eng) { +void ento::RegisterUndefResultChecker(ExprEngine &Eng) { Eng.registerCheck(new UndefResultChecker()); } diff --git a/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp b/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp index 0a3cee43a1..90f7d5db41 100644 --- a/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp +++ b/lib/GR/Checkers/UndefinedArraySubscriptChecker.cpp @@ -17,7 +17,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class UndefinedArraySubscriptChecker @@ -34,7 +34,7 @@ public: }; } // end anonymous namespace -void GR::RegisterUndefinedArraySubscriptChecker(ExprEngine &Eng) { +void ento::RegisterUndefinedArraySubscriptChecker(ExprEngine &Eng) { Eng.registerCheck(new UndefinedArraySubscriptChecker()); } diff --git a/lib/GR/Checkers/UndefinedAssignmentChecker.cpp b/lib/GR/Checkers/UndefinedAssignmentChecker.cpp index fa43350da8..8addd4458e 100644 --- a/lib/GR/Checkers/UndefinedAssignmentChecker.cpp +++ b/lib/GR/Checkers/UndefinedAssignmentChecker.cpp @@ -17,7 +17,7 @@ #include "clang/GR/PathSensitive/CheckerVisitor.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class UndefinedAssignmentChecker @@ -31,7 +31,7 @@ public: }; } -void GR::RegisterUndefinedAssignmentChecker(ExprEngine &Eng){ +void ento::RegisterUndefinedAssignmentChecker(ExprEngine &Eng){ Eng.registerCheck(new UndefinedAssignmentChecker()); } diff --git a/lib/GR/Checkers/UnixAPIChecker.cpp b/lib/GR/Checkers/UnixAPIChecker.cpp index c365e3042d..b9d8b57794 100644 --- a/lib/GR/Checkers/UnixAPIChecker.cpp +++ b/lib/GR/Checkers/UnixAPIChecker.cpp @@ -21,7 +21,7 @@ #include using namespace clang; -using namespace GR; +using namespace ento; using llvm::Optional; namespace { @@ -46,7 +46,7 @@ public: }; } //end anonymous namespace -void GR::RegisterUnixAPIChecker(ExprEngine &Eng) { +void ento::RegisterUnixAPIChecker(ExprEngine &Eng) { Eng.registerCheck(new UnixAPIChecker()); } diff --git a/lib/GR/Checkers/UnreachableCodeChecker.cpp b/lib/GR/Checkers/UnreachableCodeChecker.cpp index 97a2ff56af..b52dc87c04 100644 --- a/lib/GR/Checkers/UnreachableCodeChecker.cpp +++ b/lib/GR/Checkers/UnreachableCodeChecker.cpp @@ -29,7 +29,7 @@ #define DEFAULT_CFGBLOCKS 256 using namespace clang; -using namespace GR; +using namespace ento; namespace { class UnreachableCodeChecker : public Checker { @@ -54,7 +54,7 @@ void *UnreachableCodeChecker::getTag() { return &x; } -void GR::RegisterUnreachableCodeChecker(ExprEngine &Eng) { +void ento::RegisterUnreachableCodeChecker(ExprEngine &Eng) { Eng.registerCheck(new UnreachableCodeChecker()); } diff --git a/lib/GR/Checkers/VLASizeChecker.cpp b/lib/GR/Checkers/VLASizeChecker.cpp index b2ca2db02f..d21ad21780 100644 --- a/lib/GR/Checkers/VLASizeChecker.cpp +++ b/lib/GR/Checkers/VLASizeChecker.cpp @@ -21,7 +21,7 @@ #include "clang/GR/PathSensitive/ExprEngine.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class VLASizeChecker : public CheckerVisitor { @@ -35,7 +35,7 @@ public: }; } // end anonymous namespace -void GR::RegisterVLASizeChecker(ExprEngine &Eng) { +void ento::RegisterVLASizeChecker(ExprEngine &Eng) { Eng.registerCheck(new VLASizeChecker()); } diff --git a/lib/GR/CoreEngine.cpp b/lib/GR/CoreEngine.cpp index a086c91235..3236b92378 100644 --- a/lib/GR/CoreEngine.cpp +++ b/lib/GR/CoreEngine.cpp @@ -25,11 +25,11 @@ using llvm::cast; using llvm::isa; using namespace clang; -using namespace GR; +using namespace ento; // This should be removed in the future. namespace clang { -namespace GR { +namespace ento { TransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled, const LangOptions& lopts); } diff --git a/lib/GR/Environment.cpp b/lib/GR/Environment.cpp index 74ac7f285f..4961704509 100644 --- a/lib/GR/Environment.cpp +++ b/lib/GR/Environment.cpp @@ -16,7 +16,7 @@ #include "clang/GR/PathSensitive/GRState.h" using namespace clang; -using namespace GR; +using namespace ento; SVal Environment::lookupExpr(const Stmt* E) const { const SVal* X = ExprBindings.lookup(E); diff --git a/lib/GR/ExplodedGraph.cpp b/lib/GR/ExplodedGraph.cpp index fc46813edc..dd206aba00 100644 --- a/lib/GR/ExplodedGraph.cpp +++ b/lib/GR/ExplodedGraph.cpp @@ -21,7 +21,7 @@ #include using namespace clang; -using namespace GR; +using namespace ento; //===----------------------------------------------------------------------===// // Node auditing. diff --git a/lib/GR/FlatStore.cpp b/lib/GR/FlatStore.cpp index d4bd4b83c8..6809c3b53c 100644 --- a/lib/GR/FlatStore.cpp +++ b/lib/GR/FlatStore.cpp @@ -12,7 +12,7 @@ #include "llvm/Support/ErrorHandling.h" using namespace clang; -using namespace GR; +using namespace ento; using llvm::Interval; // The actual store type. @@ -84,7 +84,7 @@ private: }; } // end anonymous namespace -StoreManager *GR::CreateFlatStoreManager(GRStateManager &StMgr) { +StoreManager *ento::CreateFlatStoreManager(GRStateManager &StMgr) { return new FlatStoreManager(StMgr); } diff --git a/lib/GR/GRState.cpp b/lib/GR/GRState.cpp index 3a4c15a8db..e531cc9d99 100644 --- a/lib/GR/GRState.cpp +++ b/lib/GR/GRState.cpp @@ -19,7 +19,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; // Give the vtable for ConstraintManager somewhere to live. // FIXME: Move this elsewhere. diff --git a/lib/GR/HTMLDiagnostics.cpp b/lib/GR/HTMLDiagnostics.cpp index 0c059ffd1f..72a854a85d 100644 --- a/lib/GR/HTMLDiagnostics.cpp +++ b/lib/GR/HTMLDiagnostics.cpp @@ -26,7 +26,7 @@ #include "llvm/Support/Path.h" using namespace clang; -using namespace GR; +using namespace ento; //===----------------------------------------------------------------------===// // Boilerplate. @@ -78,8 +78,8 @@ HTMLDiagnostics::HTMLDiagnostics(const std::string& prefix, } PathDiagnosticClient* -GR::createHTMLDiagnosticClient(const std::string& prefix, - const Preprocessor &PP) { +ento::createHTMLDiagnosticClient(const std::string& prefix, + const Preprocessor &PP) { return new HTMLDiagnostics(prefix, PP); } diff --git a/lib/GR/ManagerRegistry.cpp b/lib/GR/ManagerRegistry.cpp index ab3a0a1ae9..4058c11f7c 100644 --- a/lib/GR/ManagerRegistry.cpp +++ b/lib/GR/ManagerRegistry.cpp @@ -14,7 +14,7 @@ #include "clang/GR/ManagerRegistry.h" using namespace clang; -using namespace GR; +using namespace ento; StoreManagerCreator ManagerRegistry::StoreMgrCreator = 0; diff --git a/lib/GR/MemRegion.cpp b/lib/GR/MemRegion.cpp index fd8ab6acb1..f16223636f 100644 --- a/lib/GR/MemRegion.cpp +++ b/lib/GR/MemRegion.cpp @@ -22,7 +22,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; //===----------------------------------------------------------------------===// // MemRegion Construction. diff --git a/lib/GR/PathDiagnostic.cpp b/lib/GR/PathDiagnostic.cpp index b496560f3c..69c660b4a4 100644 --- a/lib/GR/PathDiagnostic.cpp +++ b/lib/GR/PathDiagnostic.cpp @@ -20,7 +20,7 @@ #include "llvm/Support/Casting.h" using namespace clang; -using namespace GR; +using namespace ento; using llvm::dyn_cast; using llvm::isa; diff --git a/lib/GR/PlistDiagnostics.cpp b/lib/GR/PlistDiagnostics.cpp index 35a46bfeed..ebab2b2002 100644 --- a/lib/GR/PlistDiagnostics.cpp +++ b/lib/GR/PlistDiagnostics.cpp @@ -21,7 +21,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" using namespace clang; -using namespace GR; +using namespace ento; using llvm::cast; typedef llvm::DenseMap FIDMap; @@ -98,8 +98,8 @@ PlistDiagnostics::PlistDiagnostics(const std::string& output, : OutputFile(output), LangOpts(LO), SubPD(subPD), flushed(false) {} PathDiagnosticClient* -GR::createPlistDiagnosticClient(const std::string& s, const Preprocessor &PP, - PathDiagnosticClient *subPD) { +ento::createPlistDiagnosticClient(const std::string& s, const Preprocessor &PP, + PathDiagnosticClient *subPD) { return new PlistDiagnostics(s, PP.getLangOptions(), subPD); } diff --git a/lib/GR/RangeConstraintManager.cpp b/lib/GR/RangeConstraintManager.cpp index 8f8528dbde..5ce69bafd1 100644 --- a/lib/GR/RangeConstraintManager.cpp +++ b/lib/GR/RangeConstraintManager.cpp @@ -23,7 +23,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class ConstraintRange {}; } static int ConstraintRangeIndex = 0; @@ -195,7 +195,7 @@ public: typedef llvm::ImmutableMap ConstraintRangeTy; namespace clang { -namespace GR { +namespace ento { template<> struct GRStateTrait : public GRStatePartialTrait { @@ -254,7 +254,7 @@ private: } // end anonymous namespace -ConstraintManager* GR::CreateRangeConstraintManager(GRStateManager&, +ConstraintManager* ento::CreateRangeConstraintManager(GRStateManager&, SubEngine &subeng) { return new RangeConstraintManager(subeng); } diff --git a/lib/GR/RegionStore.cpp b/lib/GR/RegionStore.cpp index 2fa8a9754a..0ae68cf79a 100644 --- a/lib/GR/RegionStore.cpp +++ b/lib/GR/RegionStore.cpp @@ -29,7 +29,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; using llvm::Optional; //===----------------------------------------------------------------------===// @@ -404,12 +404,12 @@ public: // Part of public interface to class. // RegionStore creation. //===----------------------------------------------------------------------===// -StoreManager *GR::CreateRegionStoreManager(GRStateManager& StMgr) { +StoreManager *ento::CreateRegionStoreManager(GRStateManager& StMgr) { RegionStoreFeatures F = maximal_features_tag(); return new RegionStoreManager(StMgr, F); } -StoreManager *GR::CreateFieldsOnlyRegionStoreManager(GRStateManager &StMgr) { +StoreManager *ento::CreateFieldsOnlyRegionStoreManager(GRStateManager &StMgr) { RegionStoreFeatures F = minimal_features_tag(); F.enableFields(true); return new RegionStoreManager(StMgr, F); diff --git a/lib/GR/SValBuilder.cpp b/lib/GR/SValBuilder.cpp index daff8ddec6..eec5193ef3 100644 --- a/lib/GR/SValBuilder.cpp +++ b/lib/GR/SValBuilder.cpp @@ -19,7 +19,7 @@ #include "clang/GR/PathSensitive/BasicValueFactory.h" using namespace clang; -using namespace GR; +using namespace ento; //===----------------------------------------------------------------------===// // Basic SVal creation. diff --git a/lib/GR/SVals.cpp b/lib/GR/SVals.cpp index 0484b62f8a..ed2bc13e49 100644 --- a/lib/GR/SVals.cpp +++ b/lib/GR/SVals.cpp @@ -16,7 +16,7 @@ #include "clang/Basic/IdentifierTable.h" using namespace clang; -using namespace GR; +using namespace ento; using llvm::dyn_cast; using llvm::cast; using llvm::APSInt; diff --git a/lib/GR/SimpleConstraintManager.cpp b/lib/GR/SimpleConstraintManager.cpp index 83e7955878..f0d50da299 100644 --- a/lib/GR/SimpleConstraintManager.cpp +++ b/lib/GR/SimpleConstraintManager.cpp @@ -19,7 +19,7 @@ namespace clang { -namespace GR { +namespace ento { SimpleConstraintManager::~SimpleConstraintManager() {} @@ -298,6 +298,6 @@ const GRState *SimpleConstraintManager::assumeSymRel(const GRState *state, } // end switch } -} // end of namespace GR +} // end of namespace ento } // end of namespace clang diff --git a/lib/GR/SimpleConstraintManager.h b/lib/GR/SimpleConstraintManager.h index 616369395a..85d133f2f8 100644 --- a/lib/GR/SimpleConstraintManager.h +++ b/lib/GR/SimpleConstraintManager.h @@ -19,7 +19,7 @@ namespace clang { -namespace GR { +namespace ento { class SimpleConstraintManager : public ConstraintManager { SubEngine &SU; diff --git a/lib/GR/SimpleSValBuilder.cpp b/lib/GR/SimpleSValBuilder.cpp index 2fc2347608..bcd303e8fb 100644 --- a/lib/GR/SimpleSValBuilder.cpp +++ b/lib/GR/SimpleSValBuilder.cpp @@ -15,7 +15,7 @@ #include "clang/GR/PathSensitive/GRState.h" using namespace clang; -using namespace GR; +using namespace ento; namespace { class SimpleSValBuilder : public SValBuilder { @@ -47,9 +47,9 @@ public: }; } // end anonymous namespace -SValBuilder *GR::createSimpleSValBuilder(llvm::BumpPtrAllocator &alloc, - ASTContext &context, - GRStateManager &stateMgr) { +SValBuilder *ento::createSimpleSValBuilder(llvm::BumpPtrAllocator &alloc, + ASTContext &context, + GRStateManager &stateMgr) { return new SimpleSValBuilder(alloc, context, stateMgr); } diff --git a/lib/GR/Store.cpp b/lib/GR/Store.cpp index 99c06e4745..2e9857a9a0 100644 --- a/lib/GR/Store.cpp +++ b/lib/GR/Store.cpp @@ -16,7 +16,7 @@ #include "clang/AST/CharUnits.h" using namespace clang; -using namespace GR; +using namespace ento; StoreManager::StoreManager(GRStateManager &stateMgr) : svalBuilder(stateMgr.getSValBuilder()), StateMgr(stateMgr), diff --git a/lib/GR/SymbolManager.cpp b/lib/GR/SymbolManager.cpp index 6d078f41be..7727138b02 100644 --- a/lib/GR/SymbolManager.cpp +++ b/lib/GR/SymbolManager.cpp @@ -18,7 +18,7 @@ #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; void SymExpr::dump() const { dumpToStream(llvm::errs()); diff --git a/lib/GR/TextPathDiagnostics.cpp b/lib/GR/TextPathDiagnostics.cpp index c7a9f561d8..02e6c2e8d6 100644 --- a/lib/GR/TextPathDiagnostics.cpp +++ b/lib/GR/TextPathDiagnostics.cpp @@ -16,7 +16,7 @@ #include "clang/Lex/Preprocessor.h" #include "llvm/Support/raw_ostream.h" using namespace clang; -using namespace GR; +using namespace ento; using namespace llvm; namespace { @@ -48,8 +48,8 @@ public: } // end anonymous namespace PathDiagnosticClient* -GR::createTextPathDiagnosticClient(const std::string& out, - const Preprocessor &PP) { +ento::createTextPathDiagnosticClient(const std::string& out, + const Preprocessor &PP) { return new TextPathDiagnostics(out, PP.getDiagnostics()); } -- 2.40.0