forked from OSchip/llvm-project
Rename static analyzer namespace 'GR' to 'ento'.
llvm-svn: 122492
This commit is contained in:
parent
528fad91d2
commit
98857c9860
clang
include/clang
Analysis/DomainSpecific
GR
AnalysisConsumer.h
BugReporter
Checkers
FrontendActions.hManagerRegistry.hPathDiagnosticClients.hPathSensitive
AnalysisManager.hBasicValueFactory.hBlockCounter.hChecker.hCheckerHelpers.hCheckerVisitor.hConstraintManager.hCoreEngine.hEnvironment.hExplodedGraph.hExprEngine.hExprEngineBuilders.hGRState.hGRStateTrait.hMemRegion.hSValBuilder.hSVals.hStore.hSubEngine.hSummaryManager.hSymbolManager.hTransferFuncs.hWorkList.h
lib
Analysis
FrontendTool
GR
AggExprVisitor.cppAnalysisManager.cppAnalyzerStatsChecker.cppBasicConstraintManager.cppBasicStore.cppBasicValueFactory.cppBlockCounter.cppBugReporter.cppBugReporterVisitors.cppCFRefCount.cppCXXExprEngine.cppChecker.cppCheckerHelpers.cpp
Checkers
AdjustedReturnValueChecker.cppAnalysisConsumer.cppArrayBoundChecker.cppArrayBoundCheckerV2.cppAttrNonNullChecker.cppBasicObjCFoundationChecks.cppBasicObjCFoundationChecks.hBuiltinFunctionChecker.cppCStringChecker.cppCallAndMessageChecker.cppCastSizeChecker.cppCastToStructChecker.cppCheckDeadStores.cppCheckObjCDealloc.cppCheckObjCInstMethSignature.cppCheckSecuritySyntaxOnly.cppCheckSizeofPointer.cppChrootChecker.cppDereferenceChecker.cppDivZeroChecker.cppExprEngine.cppExprEngineExperimentalChecks.cppExprEngineExperimentalChecks.hExprEngineInternalChecks.hFixedAddressChecker.cppFrontendActions.cppIdempotentOperationChecker.cppLLVMConventionsChecker.cppMacOSXAPIChecker.cppMallocChecker.cppNSAutoreleasePoolChecker.cppNSErrorChecker.cppNoReturnFunctionChecker.cppOSAtomicChecker.cppObjCAtSyncChecker.cppObjCUnusedIVarsChecker.cppPointerArithChecker.cppPointerSubChecker.cppPthreadLockChecker.cppReturnPointerRangeChecker.cppReturnUndefChecker.cppStackAddrLeakChecker.cppStreamChecker.cppUndefBranchChecker.cppUndefCapturedBlockVarChecker.cppUndefResultChecker.cppUndefinedArraySubscriptChecker.cppUndefinedAssignmentChecker.cppUnixAPIChecker.cppUnreachableCodeChecker.cppVLASizeChecker.cpp
CoreEngine.cpp
|
@ -17,7 +17,7 @@
|
|||
#include "clang/AST/Type.h"
|
||||
|
||||
namespace clang {
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
namespace cocoa {
|
||||
|
||||
enum NamingConvention { NoConvention, CreateRule, InitRule };
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -30,7 +30,7 @@ class Diagnostic;
|
|||
class Stmt;
|
||||
class ParentMap;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class PathDiagnostic;
|
||||
class PathDiagnosticPiece;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class ExplodedNode;
|
||||
class ExprEngine;
|
||||
|
|
|
@ -27,7 +27,7 @@ class Decl;
|
|||
class SourceManager;
|
||||
class Stmt;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// High-level interface for handlers of path-sensitive diagnostics.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class ExprEngine;
|
||||
class ExplodedNode;
|
||||
|
|
|
@ -28,7 +28,7 @@ class ObjCImplementationDecl;
|
|||
class LangOptions;
|
||||
class TranslationUnitDecl;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class PathDiagnosticClient;
|
||||
class TransferFuncs;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AST Consumer Actions
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace clang {
|
|||
|
||||
class Preprocessor;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class PathDiagnosticClient;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace idx {
|
|||
class TranslationUnit;
|
||||
}
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class AnalysisManager : public BugReporterData {
|
||||
AnalysisContextManager AnaCtxMgr;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class GRState;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace clang {
|
|||
|
||||
class StackFrameContext;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class BlockCounter {
|
||||
void* Data;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class CheckerContext {
|
||||
ExplodedNodeSet &Dst;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
bool containsMacro(const Stmt *S);
|
||||
bool containsEnum(const Stmt *S);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Checker visitor interface. Used by subclasses of Checker to specify their
|
||||
|
|
|
@ -23,7 +23,7 @@ class APSInt;
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class GRState;
|
||||
class GRStateManager;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// CoreEngine - Implements the core logic of the graph-reachability
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace clang {
|
|||
|
||||
class LiveVariables;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class EnvironmentManager;
|
||||
class SValBuilder;
|
||||
|
|
|
@ -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<clang::GR::ExplodedNode*> {
|
||||
typedef clang::GR::ExplodedNode NodeType;
|
||||
template<> struct GraphTraits<clang::ento::ExplodedNode*> {
|
||||
typedef clang::ento::ExplodedNode NodeType;
|
||||
typedef NodeType::succ_iterator ChildIteratorType;
|
||||
typedef llvm::df_iterator<NodeType*> nodes_iterator;
|
||||
|
||||
|
@ -404,8 +404,8 @@ namespace llvm {
|
|||
}
|
||||
};
|
||||
|
||||
template<> struct GraphTraits<const clang::GR::ExplodedNode*> {
|
||||
typedef const clang::GR::ExplodedNode NodeType;
|
||||
template<> struct GraphTraits<const clang::ento::ExplodedNode*> {
|
||||
typedef const clang::ento::ExplodedNode NodeType;
|
||||
typedef NodeType::const_succ_iterator ChildIteratorType;
|
||||
typedef llvm::df_iterator<NodeType*> nodes_iterator;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace clang {
|
|||
|
||||
class ObjCForCollectionStmt;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class AnalysisManager;
|
||||
class Checker;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class StmtNodeBuilderRef {
|
||||
ExplodedNodeSet &Dst;
|
||||
|
|
|
@ -31,7 +31,7 @@ class raw_ostream;
|
|||
namespace clang {
|
||||
class ASTContext;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class GRStateManager;
|
||||
class Checker;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace llvm {
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
template <typename T> struct GRStatePartialTrait;
|
||||
|
||||
// Partial-specialization for ImmutableMap.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class GRState;
|
||||
|
||||
|
|
|
@ -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<SVal, uintptr_t>& 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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,7 +22,7 @@ class CFGElement;
|
|||
class LocationContext;
|
||||
class Stmt;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class AnalysisManager;
|
||||
class ExplodedNode;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
namespace summMgr {
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
namespace clang {
|
||||
class ObjCMessageExpr;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
class ExplodedNode;
|
||||
class ExplodedNodeSet;
|
||||
class EndPathNodeBuilder;
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace clang {
|
|||
|
||||
class CFGBlock;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class ExplodedNode;
|
||||
class ExplodedNodeImpl;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "llvm/ADT/StringExtras.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
using llvm::StringRef;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "clang/Index/Indexer.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
AnalysisContext *
|
||||
AnalysisManager::getAnalysisContextInAnotherTU(const Decl *D) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class AnalyzerStatsChecker : public CheckerVisitor<AnalyzerStatsChecker> {
|
||||
|
@ -38,7 +38,7 @@ void *AnalyzerStatsChecker::getTag() {
|
|||
return &x;
|
||||
}
|
||||
|
||||
void GR::RegisterAnalyzerStatsChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterAnalyzerStatsChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new AnalyzerStatsChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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<ConstNotEq> : public GRStatePartialTrait<ConstNotEqTy> {
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "llvm/ADT/ImmutableMap.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
typedef llvm::ImmutableMap<const MemRegion*,SVal> BindingsTy;
|
||||
|
||||
|
@ -104,7 +104,7 @@ private:
|
|||
} // end anonymous namespace
|
||||
|
||||
|
||||
StoreManager* GR::CreateBasicStoreManager(GRStateManager& StMgr) {
|
||||
StoreManager* ento::CreateBasicStoreManager(GRStateManager& StMgr) {
|
||||
return new BasicStoreManager(StMgr);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<SVal> L) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "llvm/ADT/ImmutableMap.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <queue>
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
BugReporterVisitor::~BugReporterVisitor() {}
|
||||
BugReporterContext::~BugReporterContext() {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "clang/GR/PathSensitive/GRState.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Utility functions.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
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<SymbolRef, RefVal> RefBindings;
|
||||
|
||||
namespace clang {
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
template<>
|
||||
struct GRStateTrait<RefBindings> : public GRStatePartialTrait<RefBindings> {
|
||||
static void* GDMIndex() {
|
||||
|
@ -1579,7 +1579,7 @@ namespace { class AutoreleasePoolContents {}; }
|
|||
namespace { class AutoreleaseStack {}; }
|
||||
|
||||
namespace clang {
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
template<> struct GRStateTrait<AutoreleaseStack>
|
||||
: public GRStatePartialTrait<ARStack> {
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "clang/AST/DeclCXX.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class CallExprWLItem {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "clang/GR/PathSensitive/Checker.h"
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
Checker::~Checker() {}
|
||||
|
||||
|
|
|
@ -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<DeclRefExpr>(S);
|
||||
|
||||
if (DR && isa<EnumConstantDecl>(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<DeclRefExpr>(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<OffsetOfExpr>(S))
|
||||
return true;
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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<AnalysisConsumer> C(new AnalysisConsumer(pp, OutDir, Opts));
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace clang {
|
|||
class ASTContext;
|
||||
class Decl;
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class BugReporter;
|
||||
class ExprEngine;
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "llvm/ADT/StringSwitch.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class CStringChecker : public CheckerVisitor<CStringChecker> {
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
} //end anonymous namespace
|
||||
|
||||
namespace clang {
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
template <>
|
||||
struct GRStateTrait<CStringLength>
|
||||
: public GRStatePartialTrait<CStringLength::EntryMap> {
|
||||
|
@ -109,7 +109,7 @@ namespace GR {
|
|||
}
|
||||
}
|
||||
|
||||
void GR::RegisterCStringChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterCStringChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new CStringChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "ExprEngineInternalChecks.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class CastSizeChecker : public CheckerVisitor<CastSizeChecker> {
|
||||
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "clang/GR/Checkers/LocalCheckers.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class WalkAST : public StmtVisitor<WalkAST> {
|
||||
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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<ExplodedNode * const *, ExplodedNode * const *>
|
||||
GR::GetImplicitNullDereferences(ExprEngine &Eng) {
|
||||
ento::GetImplicitNullDereferences(ExprEngine &Eng) {
|
||||
DereferenceChecker *checker = Eng.getChecker<DereferenceChecker>();
|
||||
if (!checker)
|
||||
return std::make_pair((ExplodedNode * const *) 0,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "clang/GR/PathSensitive/CheckerVisitor.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class DivZeroChecker : public CheckerVisitor<DivZeroChecker> {
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
void GR::RegisterDivZeroChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterDivZeroChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new DivZeroChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class ExprEngine;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
|
||||
class ExprEngine;
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include <deque>
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class MacOSXAPIChecker : public CheckerVisitor<MacOSXAPIChecker> {
|
||||
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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<SymbolRef, RefState> RegionStateTy;
|
||||
|
||||
namespace clang {
|
||||
namespace GR {
|
||||
namespace ento {
|
||||
template <>
|
||||
struct GRStateTrait<RegionState>
|
||||
: public GRStatePartialTrait<RegionStateTy> {
|
||||
|
@ -126,7 +126,7 @@ namespace GR {
|
|||
}
|
||||
}
|
||||
|
||||
void GR::RegisterMallocChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterMallocChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new MallocChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "clang/GR/PathSensitive/ExprEngine.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class ObjCAtSyncChecker : public CheckerVisitor<ObjCAtSyncChecker> {
|
||||
|
@ -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());
|
||||
|
|
|
@ -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<const ObjCIvarDecl*,IVarState> 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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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<LockSet> :
|
||||
public GRStatePartialTrait<llvm::ImmutableSet<const MemRegion*> > {
|
||||
static void* GDMIndex() { return PthreadLockChecker::getTag(); }
|
||||
|
@ -53,7 +53,7 @@ template <> struct GRStateTrait<LockSet> :
|
|||
} // end GR namespace
|
||||
} // end clang namespace
|
||||
|
||||
void GR::RegisterPthreadLockChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterPthreadLockChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new PthreadLockChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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<StackAddrLeakChecker> {
|
||||
|
@ -41,7 +41,7 @@ private:
|
|||
};
|
||||
}
|
||||
|
||||
void GR::RegisterStackAddrLeakChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterStackAddrLeakChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new StackAddrLeakChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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<StreamState>
|
||||
: public GRStatePartialTrait<llvm::ImmutableMap<SymbolRef, StreamState> > {
|
||||
|
@ -114,7 +114,7 @@ namespace GR {
|
|||
}
|
||||
}
|
||||
|
||||
void GR::RegisterStreamChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterStreamChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new StreamChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <fcntl.h>
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "clang/GR/PathSensitive/ExprEngine.h"
|
||||
|
||||
using namespace clang;
|
||||
using namespace GR;
|
||||
using namespace ento;
|
||||
|
||||
namespace {
|
||||
class VLASizeChecker : public CheckerVisitor<VLASizeChecker> {
|
||||
|
@ -35,7 +35,7 @@ public:
|
|||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
void GR::RegisterVLASizeChecker(ExprEngine &Eng) {
|
||||
void ento::RegisterVLASizeChecker(ExprEngine &Eng) {
|
||||
Eng.registerCheck(new VLASizeChecker());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue