From 6f42b62b6194f53bcbc349f5d17388e1936535d7 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Sun, 5 Feb 2012 02:12:40 +0000 Subject: [PATCH] Basic: import OwningPtr<> into clang namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/ARCMigrate/FileRemapper.h | 2 +- include/clang/AST/ASTContext.h | 6 ++-- include/clang/Analysis/AnalysisContext.h | 14 ++++---- include/clang/Basic/FileManager.h | 2 +- include/clang/Basic/FileSystemStatCache.h | 3 +- include/clang/Basic/LLVM.h | 2 ++ include/clang/CodeGen/CodeGenAction.h | 2 +- include/clang/Frontend/ASTUnit.h | 6 ++-- .../Frontend/ChainedDiagnosticConsumer.h | 4 +-- .../clang/Frontend/ChainedIncludesSource.h | 2 +- include/clang/Frontend/CompilerInstance.h | 8 ++--- include/clang/Frontend/FrontendAction.h | 4 +-- include/clang/Frontend/MultiplexConsumer.h | 5 +-- .../clang/Frontend/TextDiagnosticPrinter.h | 2 +- .../clang/Frontend/VerifyDiagnosticConsumer.h | 2 +- include/clang/Lex/Preprocessor.h | 8 ++--- include/clang/Parse/Parser.h | 18 +++++------ include/clang/Rewrite/FrontendActions.h | 4 +-- include/clang/Rewrite/TokenRewriter.h | 2 +- include/clang/Sema/Sema.h | 4 +-- include/clang/Serialization/ASTReader.h | 2 +- include/clang/Serialization/Module.h | 2 +- .../Core/PathSensitive/AnalysisManager.h | 2 +- .../Core/PathSensitive/CoreEngine.h | 2 +- .../Core/PathSensitive/ProgramState.h | 8 ++--- lib/ARCMigrate/ARCMT.cpp | 12 +++---- lib/ARCMigrate/FileRemapper.cpp | 2 +- lib/ARCMigrate/TransRetainReleaseDealloc.cpp | 2 +- lib/ARCMigrate/TransUnbridgedCasts.cpp | 2 +- lib/AST/ASTContext.cpp | 2 +- lib/Analysis/CFG.cpp | 2 +- lib/Basic/FileManager.cpp | 4 +-- lib/Basic/Targets.cpp | 2 +- lib/CodeGen/CGBlocks.cpp | 2 +- lib/CodeGen/CGCXXABI.h | 2 +- lib/CodeGen/CGVTables.cpp | 2 +- lib/CodeGen/CodeGenAction.cpp | 6 ++-- lib/CodeGen/ModuleBuilder.cpp | 6 ++-- lib/Driver/Driver.cpp | 2 +- lib/Driver/ToolChains.cpp | 2 +- lib/Frontend/ASTUnit.cpp | 32 +++++++++---------- lib/Frontend/ChainedIncludesSource.cpp | 14 ++++---- lib/Frontend/CompilerInstance.cpp | 14 ++++---- lib/Frontend/CompilerInvocation.cpp | 4 +-- .../CreateInvocationFromCommandLine.cpp | 4 +-- lib/Frontend/FrontendAction.cpp | 8 ++--- lib/Frontend/SerializedDiagnosticPrinter.cpp | 2 +- .../ExecuteCompilerInvocation.cpp | 6 ++-- lib/Lex/HeaderMap.cpp | 2 +- lib/Lex/PTHLexer.cpp | 6 ++-- lib/Parse/ParseAST.cpp | 4 +-- lib/Rewrite/FixItRewriter.cpp | 2 +- lib/Rewrite/FrontendActions.cpp | 4 +-- lib/Sema/SemaLookup.cpp | 2 +- lib/Serialization/ASTReader.cpp | 2 +- .../Checkers/ArrayBoundChecker.cpp | 2 +- .../Checkers/ArrayBoundCheckerV2.cpp | 2 +- .../Checkers/AttrNonNullChecker.cpp | 2 +- .../Checkers/BasicObjCFoundationChecks.cpp | 10 +++--- .../Checkers/CStringChecker.cpp | 2 +- .../Checkers/CallAndMessageChecker.cpp | 22 ++++++------- .../Checkers/CastSizeChecker.cpp | 2 +- .../Checkers/CastToStructChecker.cpp | 2 +- lib/StaticAnalyzer/Checkers/ChrootChecker.cpp | 2 +- .../Checkers/DeadStoresChecker.cpp | 2 +- .../Checkers/DereferenceChecker.cpp | 4 +-- .../Checkers/DivZeroChecker.cpp | 2 +- .../Checkers/FixedAddressChecker.cpp | 2 +- .../Checkers/GenericTaintChecker.cpp | 2 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 2 +- .../Checkers/MacOSXAPIChecker.cpp | 2 +- lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 10 +++--- .../Checkers/NSAutoreleasePoolChecker.cpp | 2 +- .../Checkers/ObjCAtSyncChecker.cpp | 4 +-- .../Checkers/ObjCContainersChecker.cpp | 2 +- .../Checkers/PointerArithChecker.cpp | 2 +- .../Checkers/PointerSubChecker.cpp | 2 +- .../Checkers/PthreadLockChecker.cpp | 4 +-- .../Checkers/RetainCountChecker.cpp | 14 ++++---- .../Checkers/ReturnPointerRangeChecker.cpp | 2 +- .../Checkers/ReturnUndefChecker.cpp | 2 +- .../Checkers/StackAddrEscapeChecker.cpp | 4 +-- lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 2 +- .../Checkers/TaintTesterChecker.cpp | 2 +- .../Checkers/UndefBranchChecker.cpp | 2 +- .../Checkers/UndefCapturedBlockVarChecker.cpp | 2 +- .../Checkers/UndefResultChecker.cpp | 2 +- .../UndefinedArraySubscriptChecker.cpp | 2 +- .../Checkers/UndefinedAssignmentChecker.cpp | 2 +- .../Checkers/UnixAPIChecker.cpp | 4 +-- .../Checkers/VLASizeChecker.cpp | 2 +- lib/StaticAnalyzer/Core/BugReporter.cpp | 12 +++---- lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 2 +- lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 2 +- lib/StaticAnalyzer/Core/RegionStore.cpp | 4 +-- .../Frontend/AnalysisConsumer.cpp | 10 +++--- .../Frontend/CheckerRegistration.cpp | 2 +- 97 files changed, 219 insertions(+), 215 deletions(-) diff --git a/include/clang/ARCMigrate/FileRemapper.h b/include/clang/ARCMigrate/FileRemapper.h index 9a0b690ad6..a451988f93 100644 --- a/include/clang/ARCMigrate/FileRemapper.h +++ b/include/clang/ARCMigrate/FileRemapper.h @@ -30,7 +30,7 @@ namespace arcmt { class FileRemapper { // FIXME: Reuse the same FileManager for multiple ASTContexts. - llvm::OwningPtr FileMgr; + OwningPtr FileMgr; typedef llvm::PointerUnion Target; typedef llvm::DenseMap MappingsTy; diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index fee8a0573f..a23447197b 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -349,7 +349,7 @@ class ASTContext : public llvm::RefCountedBase { PartialDiagnosticStorageAllocator *DiagAllocator; /// \brief The current C++ ABI. - llvm::OwningPtr ABI; + OwningPtr ABI; CXXABI *createCXXABI(const TargetInfo &T); /// \brief The logical -> physical address space map. @@ -367,7 +367,7 @@ public: SelectorTable &Selectors; Builtin::Context &BuiltinInfo; mutable DeclarationNameTable DeclarationNames; - llvm::OwningPtr ExternalSource; + OwningPtr ExternalSource; ASTMutationListener *Listener; clang::PrintingPolicy getPrintingPolicy() const { return PrintingPolicy; } @@ -573,7 +573,7 @@ public: /// The external AST source provides the ability to load parts of /// the abstract syntax tree as needed from some external storage, /// e.g., a precompiled header. - void setExternalSource(llvm::OwningPtr &Source); + void setExternalSource(OwningPtr &Source); /// \brief Retrieve a pointer to the external AST source associated /// with this AST context, if any. diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h index 468fff5f23..6b6f8ef2cc 100644 --- a/include/clang/Analysis/AnalysisContext.h +++ b/include/clang/Analysis/AnalysisContext.h @@ -76,19 +76,19 @@ class AnalysisDeclContext { // TranslationUnit is NULL if we don't have multiple translation units. idx::TranslationUnit *TU; - llvm::OwningPtr cfg, completeCFG; - llvm::OwningPtr cfgStmtMap; + OwningPtr cfg, completeCFG; + OwningPtr cfgStmtMap; CFG::BuildOptions cfgBuildOptions; CFG::BuildOptions::ForcedBlkExprs *forcedBlkExprs; bool builtCFG, builtCompleteCFG; - llvm::OwningPtr liveness; - llvm::OwningPtr relaxedLiveness; - llvm::OwningPtr PM; - llvm::OwningPtr PCA; - llvm::OwningPtr CFA; + OwningPtr liveness; + OwningPtr relaxedLiveness; + OwningPtr PM; + OwningPtr PCA; + OwningPtr CFA; llvm::BumpPtrAllocator A; diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index d9fe41ac2a..90f71f5203 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -148,7 +148,7 @@ class FileManager : public llvm::RefCountedBase { unsigned NumDirCacheMisses, NumFileCacheMisses; // Caching. - llvm::OwningPtr StatCache; + OwningPtr StatCache; bool getStatValue(const char *Path, struct stat &StatBuf, int *FileDescriptor); diff --git a/include/clang/Basic/FileSystemStatCache.h b/include/clang/Basic/FileSystemStatCache.h index f27312fade..96a2f90ed1 100644 --- a/include/clang/Basic/FileSystemStatCache.h +++ b/include/clang/Basic/FileSystemStatCache.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_FILESYSTEMSTATCACHE_H #define LLVM_CLANG_FILESYSTEMSTATCACHE_H +#include "clang/Basic/LLVM.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringMap.h" #include @@ -27,7 +28,7 @@ namespace clang { class FileSystemStatCache { virtual void anchor(); protected: - llvm::OwningPtr NextStatCache; + OwningPtr NextStatCache; public: virtual ~FileSystemStatCache() {} diff --git a/include/clang/Basic/LLVM.h b/include/clang/Basic/LLVM.h index 27c459dee4..005e17bbf9 100644 --- a/include/clang/Basic/LLVM.h +++ b/include/clang/Basic/LLVM.h @@ -24,6 +24,7 @@ namespace llvm { class StringRef; class Twine; template class ArrayRef; + template class OwningPtr; template class SmallVector; template class SmallVectorImpl; @@ -44,6 +45,7 @@ namespace clang { using llvm::StringRef; using llvm::Twine; using llvm::ArrayRef; + using llvm::OwningPtr; using llvm::SmallVector; using llvm::SmallVectorImpl; diff --git a/include/clang/CodeGen/CodeGenAction.h b/include/clang/CodeGen/CodeGenAction.h index 5c2e2bbe8d..7fa589feeb 100644 --- a/include/clang/CodeGen/CodeGenAction.h +++ b/include/clang/CodeGen/CodeGenAction.h @@ -24,7 +24,7 @@ class BackendConsumer; class CodeGenAction : public ASTFrontendAction { private: unsigned Act; - llvm::OwningPtr TheModule; + OwningPtr TheModule; llvm::Module *LinkModule; llvm::LLVMContext *VMContext; bool OwnsVMContext; diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 4b84e6a8d6..fb368cfaa9 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -74,7 +74,7 @@ private: llvm::IntrusiveRefCntPtr Diagnostics; llvm::IntrusiveRefCntPtr FileMgr; llvm::IntrusiveRefCntPtr SourceMgr; - llvm::OwningPtr HeaderInfo; + OwningPtr HeaderInfo; llvm::IntrusiveRefCntPtr Target; llvm::IntrusiveRefCntPtr PP; llvm::IntrusiveRefCntPtr Ctx; @@ -84,11 +84,11 @@ private: /// \brief The AST consumer that received information about the translation /// unit as it was parsed or loaded. - llvm::OwningPtr Consumer; + OwningPtr Consumer; /// \brief The semantic analysis object used to type-check the translation /// unit. - llvm::OwningPtr TheSema; + OwningPtr TheSema; /// Optional owned invocation, just used to make the invocation used in /// LoadFromCommandLine available. diff --git a/include/clang/Frontend/ChainedDiagnosticConsumer.h b/include/clang/Frontend/ChainedDiagnosticConsumer.h index 6ffcec51cf..ce2b242296 100644 --- a/include/clang/Frontend/ChainedDiagnosticConsumer.h +++ b/include/clang/Frontend/ChainedDiagnosticConsumer.h @@ -22,8 +22,8 @@ class LangOptions; /// diagnostics should be included in counts. class ChainedDiagnosticConsumer : public DiagnosticConsumer { virtual void anchor(); - llvm::OwningPtr Primary; - llvm::OwningPtr Secondary; + OwningPtr Primary; + OwningPtr Secondary; public: ChainedDiagnosticConsumer(DiagnosticConsumer *_Primary, diff --git a/include/clang/Frontend/ChainedIncludesSource.h b/include/clang/Frontend/ChainedIncludesSource.h index a08ecb3c99..d7119e9653 100644 --- a/include/clang/Frontend/ChainedIncludesSource.h +++ b/include/clang/Frontend/ChainedIncludesSource.h @@ -30,7 +30,7 @@ private: ExternalSemaSource &getFinalReader() const { return *FinalReader; } std::vector CIs; - llvm::OwningPtr FinalReader; + OwningPtr FinalReader; protected: diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 1e5994fc58..e1cfd73fb3 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -86,16 +86,16 @@ class CompilerInstance : public ModuleLoader { llvm::IntrusiveRefCntPtr Context; /// The AST consumer. - llvm::OwningPtr Consumer; + OwningPtr Consumer; /// The code completion consumer. - llvm::OwningPtr CompletionConsumer; + OwningPtr CompletionConsumer; /// \brief The semantic analysis object. - llvm::OwningPtr TheSema; + OwningPtr TheSema; /// \brief The frontend timer - llvm::OwningPtr FrontendTimer; + OwningPtr FrontendTimer; /// \brief Non-owning reference to the ASTReader, if one exists. ASTReader *ModuleManager; diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h index 80d0d5fe0c..6839028f97 100644 --- a/include/clang/Frontend/FrontendAction.h +++ b/include/clang/Frontend/FrontendAction.h @@ -28,7 +28,7 @@ class CompilerInstance; /// the frontend. class FrontendAction { FrontendInputFile CurrentInput; - llvm::OwningPtr CurrentASTUnit; + OwningPtr CurrentASTUnit; CompilerInstance *Instance; friend class ASTMergeAction; friend class WrapperFrontendAction; @@ -248,7 +248,7 @@ public: /// implements every virtual method in the FrontendAction interface by /// forwarding to the wrapped action. class WrapperFrontendAction : public FrontendAction { - llvm::OwningPtr WrappedAction; + OwningPtr WrappedAction; protected: virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, diff --git a/include/clang/Frontend/MultiplexConsumer.h b/include/clang/Frontend/MultiplexConsumer.h index 7299f73d97..0c4f7dcc39 100644 --- a/include/clang/Frontend/MultiplexConsumer.h +++ b/include/clang/Frontend/MultiplexConsumer.h @@ -17,6 +17,7 @@ #include "clang/Basic/LLVM.h" #include "clang/Sema/SemaConsumer.h" +#include "clang/Basic/LLVM.h" #include "llvm/ADT/OwningPtr.h" #include @@ -52,8 +53,8 @@ public: static bool classof(const MultiplexConsumer *) { return true; } private: std::vector Consumers; // Owns these. - llvm::OwningPtr MutationListener; - llvm::OwningPtr DeserializationListener; + OwningPtr MutationListener; + OwningPtr DeserializationListener; }; } // end namespace clang diff --git a/include/clang/Frontend/TextDiagnosticPrinter.h b/include/clang/Frontend/TextDiagnosticPrinter.h index 8051d9ce8b..9b6ac24cca 100644 --- a/include/clang/Frontend/TextDiagnosticPrinter.h +++ b/include/clang/Frontend/TextDiagnosticPrinter.h @@ -31,7 +31,7 @@ class TextDiagnosticPrinter : public DiagnosticConsumer { const SourceManager *SM; /// \brief Handle to the currently active text diagnostic emitter. - llvm::OwningPtr TextDiag; + OwningPtr TextDiag; /// A string to prefix to error messages. std::string Prefix; diff --git a/include/clang/Frontend/VerifyDiagnosticConsumer.h b/include/clang/Frontend/VerifyDiagnosticConsumer.h index 28dc9de03a..2fc6ccc36d 100644 --- a/include/clang/Frontend/VerifyDiagnosticConsumer.h +++ b/include/clang/Frontend/VerifyDiagnosticConsumer.h @@ -67,7 +67,7 @@ public: DiagnosticsEngine &Diags; DiagnosticConsumer *PrimaryClient; bool OwnsPrimaryClient; - llvm::OwningPtr Buffer; + OwningPtr Buffer; Preprocessor *CurrentPreprocessor; private: diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index bf5b9d0939..10d934aab2 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -75,7 +75,7 @@ class Preprocessor : public llvm::RefCountedBase { /// PTH - An optional PTHManager object used for getting tokens from /// a token cache rather than lexing the original source file. - llvm::OwningPtr PTH; + OwningPtr PTH; /// BP - A BumpPtrAllocator object used to quickly allocate and release /// objects internal to the Preprocessor. @@ -193,12 +193,12 @@ class Preprocessor : public llvm::RefCountedBase { /// CurLexer - This is the current top of the stack that we're lexing from if /// not expanding a macro and we are lexing directly from source code. /// Only one of CurLexer, CurPTHLexer, or CurTokenLexer will be non-null. - llvm::OwningPtr CurLexer; + OwningPtr CurLexer; /// CurPTHLexer - This is the current top of stack that we're lexing from if /// not expanding from a macro and we are lexing from a PTH cache. /// Only one of CurLexer, CurPTHLexer, or CurTokenLexer will be non-null. - llvm::OwningPtr CurPTHLexer; + OwningPtr CurPTHLexer; /// CurPPLexer - This is the current top of the stack what we're lexing from /// if not expanding a macro. This is an alias for either CurLexer or @@ -212,7 +212,7 @@ class Preprocessor : public llvm::RefCountedBase { /// CurTokenLexer - This is the current macro we are expanding, if we are /// expanding a macro. One of CurLexer and CurTokenLexer must be null. - llvm::OwningPtr CurTokenLexer; + OwningPtr CurTokenLexer; /// \brief The kind of lexer we're currently working with. enum CurLexerKind { diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 6221cfb1d4..7fcc37d41f 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -155,15 +155,15 @@ class Parser : public CodeCompletionHandler { mutable IdentifierInfo *Ident_final; mutable IdentifierInfo *Ident_override; - llvm::OwningPtr AlignHandler; - llvm::OwningPtr GCCVisibilityHandler; - llvm::OwningPtr OptionsHandler; - llvm::OwningPtr PackHandler; - llvm::OwningPtr MSStructHandler; - llvm::OwningPtr UnusedHandler; - llvm::OwningPtr WeakHandler; - llvm::OwningPtr FPContractHandler; - llvm::OwningPtr OpenCLExtensionHandler; + OwningPtr AlignHandler; + OwningPtr GCCVisibilityHandler; + OwningPtr OptionsHandler; + OwningPtr PackHandler; + OwningPtr MSStructHandler; + OwningPtr UnusedHandler; + OwningPtr WeakHandler; + OwningPtr FPContractHandler; + OwningPtr OpenCLExtensionHandler; /// Whether the '>' token acts as an operator or not. This will be /// true except when we are parsing an expression within a C++ diff --git a/include/clang/Rewrite/FrontendActions.h b/include/clang/Rewrite/FrontendActions.h index 03dbd04265..6e9ecace67 100644 --- a/include/clang/Rewrite/FrontendActions.h +++ b/include/clang/Rewrite/FrontendActions.h @@ -28,8 +28,8 @@ protected: class FixItAction : public ASTFrontendAction { protected: - llvm::OwningPtr Rewriter; - llvm::OwningPtr FixItOpts; + OwningPtr Rewriter; + OwningPtr FixItOpts; virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, StringRef InFile); diff --git a/include/clang/Rewrite/TokenRewriter.h b/include/clang/Rewrite/TokenRewriter.h index 62ea12af1f..9ebd33a519 100644 --- a/include/clang/Rewrite/TokenRewriter.h +++ b/include/clang/Rewrite/TokenRewriter.h @@ -41,7 +41,7 @@ namespace clang { /// ScratchBuf - This is the buffer that we create scratch tokens from. /// - llvm::OwningPtr ScratchBuf; + OwningPtr ScratchBuf; TokenRewriter(const TokenRewriter&); // DO NOT IMPLEMENT void operator=(const TokenRewriter&); // DO NOT IMPLEMENT. diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index a9b6827bd0..d2d61abc7a 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -260,14 +260,14 @@ public: llvm::SmallPtrSet HiddenDefinitions; /// FieldCollector - Collects CXXFieldDecls during parsing of C++ classes. - llvm::OwningPtr FieldCollector; + OwningPtr FieldCollector; typedef llvm::SmallPtrSet RecordDeclSetTy; /// PureVirtualClassDiagSet - a set of class declarations which we have /// emitted a list of pure virtual functions. Used to prevent emitting the /// same list more than once. - llvm::OwningPtr PureVirtualClassDiagSet; + OwningPtr PureVirtualClassDiagSet; /// ParsingInitForAutoVars - a set of declarations with auto types for which /// we are currently parsing the initializer. diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 2ebdd095a7..b99b9c78c6 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -218,7 +218,7 @@ public: private: /// \brief The receiver of some callbacks invoked by ASTReader. - llvm::OwningPtr Listener; + OwningPtr Listener; /// \brief The receiver of deserialization events. ASTDeserializationListener *DeserializationListener; diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h index 34f208d71f..4c93c33842 100644 --- a/include/clang/Serialization/Module.h +++ b/include/clang/Serialization/Module.h @@ -77,7 +77,7 @@ public: /// \brief The memory buffer that stores the data associated with /// this AST file. - llvm::OwningPtr Buffer; + OwningPtr Buffer; /// \brief The size of this file, in bits. uint64_t SizeInBits; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h index b7294abb52..3a9a1254ba 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h @@ -38,7 +38,7 @@ class AnalysisManager : public BugReporterData { DiagnosticsEngine &Diags; const LangOptions &LangInfo; - llvm::OwningPtr PD; + OwningPtr PD; // Configurable components creators. StoreManagerCreator CreateStoreMgr; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h index f393fd1ba0..d9b613664c 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h @@ -58,7 +58,7 @@ private: SubEngine& SubEng; /// G - The simulation graph. Each node is a (location,state) pair. - llvm::OwningPtr G; + OwningPtr G; /// WList - A set of queued nodes that need to be processed by the /// worklist algorithm. It is up to the implementation of WList to decide diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h index f19520984e..7779be0e31 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h @@ -394,8 +394,8 @@ private: SubEngine *Eng; /* Can be null. */ EnvironmentManager EnvMgr; - llvm::OwningPtr StoreMgr; - llvm::OwningPtr ConstraintMgr; + OwningPtr StoreMgr; + OwningPtr ConstraintMgr; ProgramState::GenericDataMap::Factory GDMFactory; @@ -407,7 +407,7 @@ private: llvm::FoldingSet StateSet; /// Object that manages the data for all created SVals. - llvm::OwningPtr svalBuilder; + OwningPtr svalBuilder; /// A BumpPtrAllocator to allocate states. llvm::BumpPtrAllocator &Alloc; @@ -773,7 +773,7 @@ class ScanReachableSymbols : public SubRegionMap::Visitor { VisitedItems visited; ProgramStateRef state; SymbolVisitor &visitor; - llvm::OwningPtr SRM; + OwningPtr SRM; public: ScanReachableSymbols(ProgramStateRef st, SymbolVisitor& v) diff --git a/lib/ARCMigrate/ARCMT.cpp b/lib/ARCMigrate/ARCMT.cpp index f9a1a75d87..0e43ab34fd 100644 --- a/lib/ARCMigrate/ARCMT.cpp +++ b/lib/ARCMigrate/ARCMT.cpp @@ -185,7 +185,7 @@ static bool HasARCRuntime(CompilerInvocation &origCI) { static CompilerInvocation * createInvocationForMigration(CompilerInvocation &origCI) { - llvm::OwningPtr CInvok; + OwningPtr CInvok; CInvok.reset(new CompilerInvocation(origCI)); CInvok->getPreprocessorOpts().ImplicitPCHInclude = std::string(); CInvok->getPreprocessorOpts().ImplicitPTHInclude = std::string(); @@ -236,7 +236,7 @@ bool arcmt::checkForManualIssues(CompilerInvocation &origCI, NoFinalizeRemoval); assert(!transforms.empty()); - llvm::OwningPtr CInvok; + OwningPtr CInvok; CInvok.reset(createInvocationForMigration(origCI)); CInvok->getFrontendOpts().Inputs.clear(); CInvok->getFrontendOpts().Inputs.push_back(Input); @@ -252,7 +252,7 @@ bool arcmt::checkForManualIssues(CompilerInvocation &origCI, CaptureDiagnosticConsumer errRec(*Diags, capturedDiags); Diags->setClient(&errRec, /*ShouldOwnClient=*/false); - llvm::OwningPtr Unit( + OwningPtr Unit( ASTUnit::LoadFromCompilerInvocationAction(CInvok.take(), Diags)); if (!Unit) return true; @@ -500,7 +500,7 @@ MigrationProcess::MigrationProcess(const CompilerInvocation &CI, bool MigrationProcess::applyTransform(TransformFn trans, RewriteListener *listener) { - llvm::OwningPtr CInvok; + OwningPtr CInvok; CInvok.reset(createInvocationForMigration(OrigCI)); CInvok->getDiagnosticOpts().IgnoreWarnings = true; @@ -518,10 +518,10 @@ bool MigrationProcess::applyTransform(TransformFn trans, CaptureDiagnosticConsumer errRec(*Diags, capturedDiags); Diags->setClient(&errRec, /*ShouldOwnClient=*/false); - llvm::OwningPtr ASTAction; + OwningPtr ASTAction; ASTAction.reset(new ARCMTMacroTrackerAction(ARCMTMacroLocs)); - llvm::OwningPtr Unit( + OwningPtr Unit( ASTUnit::LoadFromCompilerInvocationAction(CInvok.take(), Diags, ASTAction.get())); if (!Unit) diff --git a/lib/ARCMigrate/FileRemapper.cpp b/lib/ARCMigrate/FileRemapper.cpp index 39c9aada4d..4a1223226f 100644 --- a/lib/ARCMigrate/FileRemapper.cpp +++ b/lib/ARCMigrate/FileRemapper.cpp @@ -60,7 +60,7 @@ bool FileRemapper::initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag, std::vector > pairs; - llvm::OwningPtr fileBuf; + OwningPtr fileBuf; if (llvm::MemoryBuffer::getFile(infoFile.c_str(), fileBuf)) return report("Error opening file: " + infoFile, Diag); diff --git a/lib/ARCMigrate/TransRetainReleaseDealloc.cpp b/lib/ARCMigrate/TransRetainReleaseDealloc.cpp index 6eb82093cf..7bb7b5eeea 100644 --- a/lib/ARCMigrate/TransRetainReleaseDealloc.cpp +++ b/lib/ARCMigrate/TransRetainReleaseDealloc.cpp @@ -34,7 +34,7 @@ class RetainReleaseDeallocRemover : MigrationPass &Pass; ExprSet Removables; - llvm::OwningPtr StmtMap; + OwningPtr StmtMap; Selector DelegateSel, FinalizeSel; diff --git a/lib/ARCMigrate/TransUnbridgedCasts.cpp b/lib/ARCMigrate/TransUnbridgedCasts.cpp index 2d9fe5e4bd..3e5723dd00 100644 --- a/lib/ARCMigrate/TransUnbridgedCasts.cpp +++ b/lib/ARCMigrate/TransUnbridgedCasts.cpp @@ -49,7 +49,7 @@ namespace { class UnbridgedCastRewriter : public RecursiveASTVisitor{ MigrationPass &Pass; IdentifierInfo *SelfII; - llvm::OwningPtr StmtMap; + OwningPtr StmtMap; public: UnbridgedCastRewriter(MigrationPass &pass) : Pass(pass) { diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index ca199c849f..335382bb4c 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -299,7 +299,7 @@ void ASTContext::AddDeallocation(void (*Callback)(void*), void *Data) { } void -ASTContext::setExternalSource(llvm::OwningPtr &Source) { +ASTContext::setExternalSource(OwningPtr &Source) { ExternalSource.reset(Source.take()); } diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 50393b634d..406aca8433 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -250,7 +250,7 @@ class CFGBuilder { typedef BlockScopePosPair JumpSource; ASTContext *Context; - llvm::OwningPtr cfg; + OwningPtr cfg; CFGBlock *Block; CFGBlock *Succ; diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index 5d352fda28..267db48352 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -484,7 +484,7 @@ void FileManager::FixupRelativePath(SmallVectorImpl &path) const { llvm::MemoryBuffer *FileManager:: getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) { - llvm::OwningPtr Result; + OwningPtr Result; llvm::error_code ec; const char *Filename = Entry->getName(); @@ -519,7 +519,7 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) { llvm::MemoryBuffer *FileManager:: getBufferForFile(StringRef Filename, std::string *ErrorStr) { - llvm::OwningPtr Result; + OwningPtr Result; llvm::error_code ec; if (FileSystemOpts.WorkingDir.empty()) { ec = llvm::MemoryBuffer::getFile(Filename, Result); diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 698d627a17..8539727b0a 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -4022,7 +4022,7 @@ TargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, llvm::Triple Triple(Opts.Triple); // Construct the target - llvm::OwningPtr Target(AllocateTarget(Triple.str())); + OwningPtr Target(AllocateTarget(Triple.str())); if (!Target) { Diags.Report(diag::err_target_unknown_triple) << Triple.str(); return 0; diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index c6d5be059c..f676311658 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -612,7 +612,7 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const BlockExpr *blockExpr) { } // Find the block info for this block and take ownership of it. - llvm::OwningPtr blockInfo; + OwningPtr blockInfo; blockInfo.reset(findAndRemoveBlockInfo(&FirstBlockInfo, blockExpr->getBlockDecl())); diff --git a/lib/CodeGen/CGCXXABI.h b/lib/CodeGen/CGCXXABI.h index 5fd611d44f..760068a9cb 100644 --- a/lib/CodeGen/CGCXXABI.h +++ b/lib/CodeGen/CGCXXABI.h @@ -42,7 +42,7 @@ namespace CodeGen { class CGCXXABI { protected: CodeGenModule &CGM; - llvm::OwningPtr MangleCtx; + OwningPtr MangleCtx; CGCXXABI(CodeGenModule &CGM) : CGM(CGM), MangleCtx(CGM.getContext().createMangleContext()) {} diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index a306c857e5..96b304544b 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -668,7 +668,7 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, bool BaseIsVirtual, llvm::GlobalVariable::LinkageTypes Linkage, VTableAddressPointsMapTy& AddressPoints) { - llvm::OwningPtr VTLayout( + OwningPtr VTLayout( VTContext.createConstructionVTableLayout(Base.getBase(), Base.getBaseOffset(), BaseIsVirtual, RD)); diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index eedfc57a10..02e0860292 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -44,9 +44,9 @@ namespace clang { Timer LLVMIRGeneration; - llvm::OwningPtr Gen; + OwningPtr Gen; - llvm::OwningPtr TheModule, LinkModule; + OwningPtr TheModule, LinkModule; public: BackendConsumer(BackendAction action, DiagnosticsEngine &_Diags, @@ -318,7 +318,7 @@ static raw_ostream *GetOutputStream(CompilerInstance &CI, ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { BackendAction BA = static_cast(Act); - llvm::OwningPtr OS(GetOutputStream(CI, InFile, BA)); + OwningPtr OS(GetOutputStream(CI, InFile, BA)); if (BA != Backend_EmitNothing && !OS) return 0; diff --git a/lib/CodeGen/ModuleBuilder.cpp b/lib/CodeGen/ModuleBuilder.cpp index 8aa788d9a1..ddbe27bc17 100644 --- a/lib/CodeGen/ModuleBuilder.cpp +++ b/lib/CodeGen/ModuleBuilder.cpp @@ -28,12 +28,12 @@ using namespace clang; namespace { class CodeGeneratorImpl : public CodeGenerator { DiagnosticsEngine &Diags; - llvm::OwningPtr TD; + OwningPtr TD; ASTContext *Ctx; const CodeGenOptions CodeGenOpts; // Intentionally copied in. protected: - llvm::OwningPtr M; - llvm::OwningPtr Builder; + OwningPtr M; + OwningPtr Builder; public: CodeGeneratorImpl(DiagnosticsEngine &diags, const std::string& ModuleName, const CodeGenOptions &CGO, llvm::LLVMContext& C) diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 89e06002a2..6f93d0be25 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -1061,7 +1061,7 @@ void Driver::BuildActions(const ToolChain &TC, const DerivedArgList &Args, } // Build the pipeline for this file. - llvm::OwningPtr Current(new InputAction(*InputArg, InputType)); + OwningPtr Current(new InputAction(*InputArg, InputType)); for (unsigned i = 0; i != NumSteps; ++i) { phases::ID Phase = types::getCompilationPhase(InputType, i); diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 4fe29de90d..79d84544a8 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1823,7 +1823,7 @@ static bool IsUbuntu(enum LinuxDistro Distro) { } static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { - llvm::OwningPtr File; + OwningPtr File; if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) { StringRef Data = File.get()->getBuffer(); SmallVector Lines; diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index a9454a1aa0..fce28b7488 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -654,7 +654,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename, RemappedFile *RemappedFiles, unsigned NumRemappedFiles, bool CaptureDiagnostics) { - llvm::OwningPtr AST(new ASTUnit(true)); + OwningPtr AST(new ASTUnit(true)); // Recover resources if we crash before exiting this method. llvm::CrashRecoveryContextCleanupRegistrar @@ -729,7 +729,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename, std::string Predefines; unsigned Counter; - llvm::OwningPtr Reader; + OwningPtr Reader; AST->PP = new Preprocessor(AST->getDiagnostics(), AST->ASTFileLangOpts, /*Target=*/0, AST->getSourceManager(), HeaderInfo, @@ -778,7 +778,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename, // source, so that declarations will be deserialized from the // AST file as needed. ASTReader *ReaderPtr = Reader.get(); - llvm::OwningPtr Source(Reader.take()); + OwningPtr Source(Reader.take()); // Unregister the cleanup for ASTReader. It will get cleaned up // by the ASTUnit cleanup. @@ -1025,7 +1025,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) { } // Create the compiler instance to use for building the AST. - llvm::OwningPtr Clang(new CompilerInstance()); + OwningPtr Clang(new CompilerInstance()); // Recover resources if we crash before exiting this method. llvm::CrashRecoveryContextCleanupRegistrar @@ -1114,7 +1114,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) { SavedMainFileBuffer = OverrideMainBuffer; } - llvm::OwningPtr Act( + OwningPtr Act( new TopLevelDeclTrackerAction(*this)); // Recover resources if we crash before exiting this method. @@ -1319,7 +1319,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble( = ComputePreamble(*PreambleInvocation, MaxLines, CreatedPreambleBuffer); // If ComputePreamble() Take ownership of the preamble buffer. - llvm::OwningPtr OwnedPreambleBuffer; + OwningPtr OwnedPreambleBuffer; if (CreatedPreambleBuffer) OwnedPreambleBuffer.reset(NewPreamble.first); @@ -1501,7 +1501,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble( PreprocessorOpts.PrecompiledPreambleBytes.second = false; // Create the compiler instance to use for building the precompiled preamble. - llvm::OwningPtr Clang(new CompilerInstance()); + OwningPtr Clang(new CompilerInstance()); // Recover resources if we crash before exiting this method. llvm::CrashRecoveryContextCleanupRegistrar @@ -1553,7 +1553,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble( Clang->setSourceManager(new SourceManager(getDiagnostics(), Clang->getFileManager())); - llvm::OwningPtr Act; + OwningPtr Act; Act.reset(new PrecompilePreambleAction(*this)); if (!Act->BeginSourceFile(*Clang.get(), Clang->getFrontendOpts().Inputs[0])) { llvm::sys::Path(FrontendOpts.OutputFile).eraseFromDisk(); @@ -1648,7 +1648,7 @@ StringRef ASTUnit::getMainFileName() const { ASTUnit *ASTUnit::create(CompilerInvocation *CI, llvm::IntrusiveRefCntPtr Diags, bool CaptureDiagnostics) { - llvm::OwningPtr AST; + OwningPtr AST; AST.reset(new ASTUnit(false)); ConfigureDiags(Diags, 0, 0, *AST, CaptureDiagnostics); AST->Diagnostics = Diags; @@ -1672,7 +1672,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(CompilerInvocation *CI, bool CacheCodeCompletionResults) { assert(CI && "A CompilerInvocation is required"); - llvm::OwningPtr OwnAST; + OwningPtr OwnAST; ASTUnit *AST = Unit; if (!AST) { // Create the AST unit. @@ -1707,7 +1707,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(CompilerInvocation *CI, AST->TargetFeatures = CI->getTargetOpts().Features; // Create the compiler instance to use for building the AST. - llvm::OwningPtr Clang(new CompilerInstance()); + OwningPtr Clang(new CompilerInstance()); // Recover resources if we crash before exiting this method. llvm::CrashRecoveryContextCleanupRegistrar @@ -1754,7 +1754,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(CompilerInvocation *CI, ASTFrontendAction *Act = Action; - llvm::OwningPtr TrackerAct; + OwningPtr TrackerAct; if (!Act) { TrackerAct.reset(new TopLevelDeclTrackerAction(*AST)); Act = TrackerAct.get(); @@ -1835,7 +1835,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocation(CompilerInvocation *CI, bool CacheCodeCompletionResults, bool NestedMacroExpansions) { // Create the AST unit. - llvm::OwningPtr AST; + OwningPtr AST; AST.reset(new ASTUnit(false)); ConfigureDiags(Diags, 0, 0, *AST, CaptureDiagnostics); AST->Diagnostics = Diags; @@ -1911,7 +1911,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin, CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath; // Create the AST unit. - llvm::OwningPtr AST; + OwningPtr AST; AST.reset(new ASTUnit(false)); ConfigureDiags(Diags, ArgBegin, ArgEnd, *AST, CaptureDiagnostics); AST->Diagnostics = Diags; @@ -2270,7 +2270,7 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column, // Set the language options appropriately. LangOpts = *CCInvocation->getLangOpts(); - llvm::OwningPtr Clang(new CompilerInstance()); + OwningPtr Clang(new CompilerInstance()); // Recover resources if we crash before exiting this method. llvm::CrashRecoveryContextCleanupRegistrar @@ -2378,7 +2378,7 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column, // Disable the preprocessing record PreprocessorOpts.DetailedRecord = false; - llvm::OwningPtr Act; + OwningPtr Act; Act.reset(new SyntaxOnlyAction); if (Act->BeginSourceFile(*Clang.get(), Clang->getFrontendOpts().Inputs[0])) { if (OverrideMainBuffer) { diff --git a/lib/Frontend/ChainedIncludesSource.cpp b/lib/Frontend/ChainedIncludesSource.cpp index 45cf672aa8..4ecc052198 100644 --- a/lib/Frontend/ChainedIncludesSource.cpp +++ b/lib/Frontend/ChainedIncludesSource.cpp @@ -31,7 +31,7 @@ static ASTReader *createASTReader(CompilerInstance &CI, SmallVector &bufNames, ASTDeserializationListener *deserialListener = 0) { Preprocessor &PP = CI.getPreprocessor(); - llvm::OwningPtr Reader; + OwningPtr Reader; Reader.reset(new ASTReader(PP, CI.getASTContext(), /*isysroot=*/"", /*DisableValidation=*/true)); for (unsigned ti = 0; ti < bufNames.size(); ++ti) { @@ -62,7 +62,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { std::vector &includes = CI.getPreprocessorOpts().ChainedIncludes; assert(!includes.empty() && "No '-chain-include' in options!"); - llvm::OwningPtr source(new ChainedIncludesSource()); + OwningPtr source(new ChainedIncludesSource()); InputKind IK = CI.getFrontendOpts().Inputs[0].Kind; SmallVector serialBufs; @@ -70,7 +70,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { for (unsigned i = 0, e = includes.size(); i != e; ++i) { bool firstInclude = (i == 0); - llvm::OwningPtr CInvok; + OwningPtr CInvok; CInvok.reset(new CompilerInvocation(CI.getInvocation())); CInvok->getPreprocessorOpts().ChainedIncludes.clear(); @@ -91,7 +91,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { llvm::IntrusiveRefCntPtr Diags( new DiagnosticsEngine(DiagID, DiagClient)); - llvm::OwningPtr Clang(new CompilerInstance()); + OwningPtr Clang(new CompilerInstance()); Clang->setInvocation(CInvok.take()); Clang->setDiagnostics(Diags.getPtr()); Clang->setTarget(TargetInfo::CreateTargetInfo(Clang->getDiagnostics(), @@ -105,7 +105,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { SmallVector serialAST; llvm::raw_svector_ostream OS(serialAST); - llvm::OwningPtr consumer; + OwningPtr consumer; consumer.reset(new PCHGenerator(Clang->getPreprocessor(), "-", 0, /*isysroot=*/"", &OS)); Clang->getASTContext().setASTMutationListener( @@ -132,7 +132,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { serialBufNames.push_back(pchName); - llvm::OwningPtr Reader; + OwningPtr Reader; Reader.reset(createASTReader(*Clang, pchName, bufs, serialBufNames, Clang->getASTConsumer().GetASTDeserializationListener())); @@ -156,7 +156,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { assert(!serialBufs.empty()); std::string pchName = includes.back() + ".pch-final"; serialBufNames.push_back(pchName); - llvm::OwningPtr Reader; + OwningPtr Reader; Reader.reset(createASTReader(CI, pchName, serialBufs, serialBufNames)); if (!Reader) return 0; diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 03dc626170..a3669d798a 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -95,7 +95,7 @@ static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts, unsigned argc, const char* const *argv, DiagnosticsEngine &Diags) { std::string ErrorInfo; - llvm::OwningPtr OS( + OwningPtr OS( new llvm::raw_fd_ostream(DiagOpts.DumpBuildInformation.c_str(), ErrorInfo)); if (!ErrorInfo.empty()) { Diags.Report(diag::err_fe_unable_to_open_logfile) @@ -148,7 +148,7 @@ static void SetupSerializedDiagnostics(const DiagnosticOptions &DiagOpts, DiagnosticsEngine &Diags, StringRef OutputFile) { std::string ErrorInfo; - llvm::OwningPtr OS; + OwningPtr OS; OS.reset(new llvm::raw_fd_ostream(OutputFile.str().c_str(), ErrorInfo, llvm::raw_fd_ostream::F_Binary)); @@ -308,7 +308,7 @@ void CompilerInstance::createPCHExternalASTSource(StringRef Path, bool DisablePCHValidation, bool DisableStatCache, void *DeserializationListener){ - llvm::OwningPtr Source; + OwningPtr Source; bool Preamble = getPreprocessorOpts().PrecompiledPreambleBytes.first != 0; Source.reset(createPCHExternalASTSource(Path, getHeaderSearchOpts().Sysroot, DisablePCHValidation, @@ -329,7 +329,7 @@ CompilerInstance::createPCHExternalASTSource(StringRef Path, ASTContext &Context, void *DeserializationListener, bool Preamble) { - llvm::OwningPtr Reader; + OwningPtr Reader; Reader.reset(new ASTReader(PP, Context, Sysroot.empty() ? "" : Sysroot.c_str(), DisablePCHValidation, DisableStatCache)); @@ -525,7 +525,7 @@ CompilerInstance::createOutputFile(StringRef OutputPath, OutFile = "-"; } - llvm::OwningPtr OS; + OwningPtr OS; std::string OSFile; if (UseTemporary && OutFile != "-") { @@ -593,7 +593,7 @@ bool CompilerInstance::InitializeSourceManager(StringRef InputFile, } SourceMgr.createMainFileID(File, Kind); } else { - llvm::OwningPtr SB; + OwningPtr SB; if (llvm::MemoryBuffer::getSTDIN(SB)) { // FIXME: Give ec.message() in this diag. Diags.Report(diag::err_fe_error_reading_stdin); @@ -935,7 +935,7 @@ Module *CompilerInstance::loadModule(SourceLocation ImportLoc, getASTContext().setASTMutationListener( getASTConsumer().GetASTMutationListener()); } - llvm::OwningPtr Source; + OwningPtr Source; Source.reset(ModuleManager); getASTContext().setExternalSource(Source); if (hasSema()) diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 7fd2247907..7876bcb243 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -2059,9 +2059,9 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, bool Success = true; // Parse the arguments. - llvm::OwningPtr Opts(createCC1OptTable()); + OwningPtr Opts(createCC1OptTable()); unsigned MissingArgIndex, MissingArgCount; - llvm::OwningPtr Args( + OwningPtr Args( Opts->ParseArgs(ArgBegin, ArgEnd,MissingArgIndex, MissingArgCount)); // Check for missing argument error. diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp index f7a296143f..fec9b6691b 100644 --- a/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -54,7 +54,7 @@ clang::createInvocationFromCommandLine(ArrayRef ArgList, // Don't check that inputs exist, they may have been remapped. TheDriver.setCheckInputsExist(false); - llvm::OwningPtr C(TheDriver.BuildCompilation(Args)); + OwningPtr C(TheDriver.BuildCompilation(Args)); // Just print the cc1 options if -### was present. if (C->getArgs().hasArg(driver::options::OPT__HASH_HASH_HASH)) { @@ -80,7 +80,7 @@ clang::createInvocationFromCommandLine(ArrayRef ArgList, } const driver::ArgStringList &CCArgs = Cmd->getArguments(); - llvm::OwningPtr CI(new CompilerInvocation()); + OwningPtr CI(new CompilerInvocation()); if (!CompilerInvocation::CreateFromArgs(*CI, const_cast(CCArgs.data()), const_cast(CCArgs.data()) + diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 11ac572479..34f445f062 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -144,7 +144,7 @@ ASTConsumer* FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, ie = FrontendPluginRegistry::end(); it != ie; ++it) { if (it->getName() == CI.getFrontendOpts().AddPluginActions[i]) { - llvm::OwningPtr P(it->instantiate()); + OwningPtr P(it->instantiate()); FrontendAction* c = P.get(); if (P->ParseArgs(CI, CI.getFrontendOpts().AddPluginArgs[i])) Consumers.push_back(c->CreateASTConsumer(CI, InFile)); @@ -238,7 +238,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, if (!usesPreprocessorOnly()) { CI.createASTContext(); - llvm::OwningPtr Consumer( + OwningPtr Consumer( CreateWrappedASTConsumer(CI, Input.File)); if (!Consumer) goto failure; @@ -247,7 +247,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, if (!CI.getPreprocessorOpts().ChainedIncludes.empty()) { // Convert headers to PCH and chain them. - llvm::OwningPtr source; + OwningPtr source; source.reset(ChainedIncludesSource::create(CI)); if (!source) goto failure; @@ -290,7 +290,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, // provides the layouts from that file. if (!CI.getFrontendOpts().OverrideRecordLayoutsFile.empty() && CI.hasASTContext() && !CI.getASTContext().getExternalSource()) { - llvm::OwningPtr + OwningPtr Override(new LayoutOverrideSource( CI.getFrontendOpts().OverrideRecordLayoutsFile)); CI.getASTContext().setExternalSource(Override); diff --git a/lib/Frontend/SerializedDiagnosticPrinter.cpp b/lib/Frontend/SerializedDiagnosticPrinter.cpp index 4bf813e160..bdf0b550c7 100644 --- a/lib/Frontend/SerializedDiagnosticPrinter.cpp +++ b/lib/Frontend/SerializedDiagnosticPrinter.cpp @@ -170,7 +170,7 @@ private: llvm::BitstreamWriter Stream; /// \brief The name of the diagnostics file. - llvm::OwningPtr OS; + OwningPtr OS; /// \brief The set of constructed record abbreviations. AbbreviationMap Abbrevs; diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp index aef8474b8c..c965692cac 100644 --- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -57,7 +57,7 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { FrontendPluginRegistry::begin(), ie = FrontendPluginRegistry::end(); it != ie; ++it) { if (it->getName() == CI.getFrontendOpts().ActionName) { - llvm::OwningPtr P(it->instantiate()); + OwningPtr P(it->instantiate()); if (!P->ParseArgs(CI, CI.getFrontendOpts().PluginArgs)) return 0; return P.take(); @@ -122,7 +122,7 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { // Honor -help. if (Clang->getFrontendOpts().ShowHelp) { - llvm::OwningPtr Opts(driver::createCC1OptTable()); + OwningPtr Opts(driver::createCC1OptTable()); Opts->PrintHelp(llvm::outs(), "clang -cc1", "LLVM 'Clang' Compiler: http://clang.llvm.org"); return 0; @@ -171,7 +171,7 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { bool Success = false; if (!Clang->getDiagnostics().hasErrorOccurred()) { // Create and execute the frontend action. - llvm::OwningPtr Act(CreateFrontendAction(*Clang)); + OwningPtr Act(CreateFrontendAction(*Clang)); if (Act) { Success = Clang->ExecuteAction(*Act); if (Clang->getFrontendOpts().DisableFree) diff --git a/lib/Lex/HeaderMap.cpp b/lib/Lex/HeaderMap.cpp index 0cb564c222..9a0b4e985e 100644 --- a/lib/Lex/HeaderMap.cpp +++ b/lib/Lex/HeaderMap.cpp @@ -81,7 +81,7 @@ const HeaderMap *HeaderMap::Create(const FileEntry *FE, FileManager &FM) { unsigned FileSize = FE->getSize(); if (FileSize <= sizeof(HMapHeader)) return 0; - llvm::OwningPtr FileBuffer(FM.getBufferForFile(FE)); + OwningPtr FileBuffer(FM.getBufferForFile(FE)); if (FileBuffer == 0) return 0; // Unreadable file? const char *FileStart = FileBuffer->getBufferStart(); diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index e0c4cf0c16..f104f96708 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -438,7 +438,7 @@ static void InvalidPTH(DiagnosticsEngine &Diags, const char *Msg) { PTHManager *PTHManager::Create(const std::string &file, DiagnosticsEngine &Diags) { // Memory map the PTH file. - llvm::OwningPtr File; + OwningPtr File; if (llvm::MemoryBuffer::getFile(file, File)) { // FIXME: Add ec.message() to this diag. @@ -488,7 +488,7 @@ PTHManager *PTHManager::Create(const std::string &file, return 0; // FIXME: Proper error diagnostic? } - llvm::OwningPtr FL(PTHFileLookup::Create(FileTable, BufBeg)); + OwningPtr FL(PTHFileLookup::Create(FileTable, BufBeg)); // Warn if the PTH file is empty. We still want to create a PTHManager // as the PTH could be used with -include-pth. @@ -514,7 +514,7 @@ PTHManager *PTHManager::Create(const std::string &file, return 0; } - llvm::OwningPtr SL(PTHStringIdLookup::Create(StringIdTable, + OwningPtr SL(PTHStringIdLookup::Create(StringIdTable, BufBeg)); // Get the location of the spelling cache. diff --git a/lib/Parse/ParseAST.cpp b/lib/Parse/ParseAST.cpp index a5c345afe2..b4023983af 100644 --- a/lib/Parse/ParseAST.cpp +++ b/lib/Parse/ParseAST.cpp @@ -40,7 +40,7 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, TranslationUnitKind TUKind, CodeCompleteConsumer *CompletionConsumer) { - llvm::OwningPtr S(new Sema(PP, Ctx, *Consumer, + OwningPtr S(new Sema(PP, Ctx, *Consumer, TUKind, CompletionConsumer)); @@ -63,7 +63,7 @@ void clang::ParseAST(Sema &S, bool PrintStats) { ASTConsumer *Consumer = &S.getASTConsumer(); - llvm::OwningPtr ParseOP(new Parser(S.getPreprocessor(), S)); + OwningPtr ParseOP(new Parser(S.getPreprocessor(), S)); Parser &P = *ParseOP.get(); PrettyStackTraceParserEntry CrashInfo(P); diff --git a/lib/Rewrite/FixItRewriter.cpp b/lib/Rewrite/FixItRewriter.cpp index aa57813e59..caa7d06ac2 100644 --- a/lib/Rewrite/FixItRewriter.cpp +++ b/lib/Rewrite/FixItRewriter.cpp @@ -63,7 +63,7 @@ bool FixItRewriter::WriteFixedFiles( int fd; std::string Filename = FixItOpts->RewriteFilename(Entry->getName(), fd); std::string Err; - llvm::OwningPtr OS; + OwningPtr OS; if (fd != -1) { OS.reset(new llvm::raw_fd_ostream(fd, /*shouldClose=*/true)); } else { diff --git a/lib/Rewrite/FrontendActions.cpp b/lib/Rewrite/FrontendActions.cpp index 49ae4ce1f2..7e7790eea8 100644 --- a/lib/Rewrite/FrontendActions.cpp +++ b/lib/Rewrite/FrontendActions.cpp @@ -112,9 +112,9 @@ bool FixItRecompile::BeginInvocation(CompilerInstance &CI) { bool err = false; { const FrontendOptions &FEOpts = CI.getFrontendOpts(); - llvm::OwningPtr FixAction(new SyntaxOnlyAction()); + OwningPtr FixAction(new SyntaxOnlyAction()); if (FixAction->BeginSourceFile(CI, FEOpts.Inputs[0])) { - llvm::OwningPtr FixItOpts; + OwningPtr FixItOpts; if (FEOpts.FixToTemporaries) FixItOpts.reset(new FixItRewriteToTemp()); else diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 610b790d2c..318a71369f 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -3636,7 +3636,7 @@ TypoCorrection Sema::CorrectTypo(const DeclarationNameInfo &TypoName, // Walk through identifiers in external identifier sources. if (IdentifierInfoLookup *External = Context.Idents.getExternalIdentifierLookup()) { - llvm::OwningPtr Iter(External->getIdentifiers()); + OwningPtr Iter(External->getIdentifiers()); do { StringRef Name = Iter->Next(); if (Name.empty()) diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 0bf1da75be..39ffbb4aa8 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -2997,7 +2997,7 @@ std::string ASTReader::getOriginalSourceFile(const std::string &ASTFileName, DiagnosticsEngine &Diags) { // Open the AST file. std::string ErrStr; - llvm::OwningPtr Buffer; + OwningPtr Buffer; Buffer.reset(FileMgr.getBufferForFile(ASTFileName, &ErrStr)); if (!Buffer) { Diags.Report(diag::err_fe_unable_to_read_pch_file) << ErrStr; diff --git a/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp b/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp index e084a9324e..b2ad18472e 100644 --- a/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; namespace { class ArrayBoundChecker : public Checker { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkLocation(SVal l, bool isLoad, const Stmt* S, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp b/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp index 23a8c44913..2d49027dac 100644 --- a/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp +++ b/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp @@ -28,7 +28,7 @@ using namespace ento; namespace { class ArrayBoundCheckerV2 : public Checker { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; enum OOB_Kind { OOB_Precedes, OOB_Excedes, OOB_Tainted }; diff --git a/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp b/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp index 4011024aee..e372dbf3cb 100644 --- a/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; namespace { class AttrNonNullChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const CallExpr *CE, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index bb1c61336a..615ddbf085 100644 --- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp @@ -71,7 +71,7 @@ static inline bool isNil(SVal X) { namespace { class NilArgChecker : public Checker { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; void WarnNilArg(CheckerContext &C, const ObjCMessage &msg, unsigned Arg) const; @@ -142,7 +142,7 @@ void NilArgChecker::checkPreObjCMessage(ObjCMessage msg, namespace { class CFNumberCreateChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; mutable IdentifierInfo* II; public: CFNumberCreateChecker() : II(0) {} @@ -347,7 +347,7 @@ void CFNumberCreateChecker::checkPreStmt(const CallExpr *CE, namespace { class CFRetainReleaseChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; mutable IdentifierInfo *Retain, *Release; public: CFRetainReleaseChecker(): Retain(0), Release(0) {} @@ -430,7 +430,7 @@ class ClassReleaseChecker : public Checker { mutable Selector retainS; mutable Selector autoreleaseS; mutable Selector drainS; - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreObjCMessage(ObjCMessage msg, CheckerContext &C) const; @@ -486,7 +486,7 @@ class VariadicMethodTypeChecker : public Checker { mutable Selector setWithObjectsS; mutable Selector initWithObjectsS; mutable Selector initWithObjectsAndKeysS; - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; bool isVariadicMessage(const ObjCMessage &msg) const; diff --git a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp index a1b7a6caef..5ced73a6dd 100644 --- a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp @@ -32,7 +32,7 @@ class CStringChecker : public Checker< eval::Call, check::DeadSymbols, check::RegionChanges > { - mutable llvm::OwningPtr BT_Null, BT_Bounds, + mutable OwningPtr BT_Null, BT_Bounds, BT_Overlap, BT_NotCString, BT_AdditionOverflow; mutable const char *CurrentFunctionDescription; diff --git a/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp b/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp index 9e312d3307..4c7c3883e0 100644 --- a/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp @@ -28,12 +28,12 @@ using namespace ento; namespace { class CallAndMessageChecker : public Checker< check::PreStmt, check::PreObjCMessage > { - mutable llvm::OwningPtr BT_call_null; - mutable llvm::OwningPtr BT_call_undef; - mutable llvm::OwningPtr BT_call_arg; - mutable llvm::OwningPtr BT_msg_undef; - mutable llvm::OwningPtr BT_msg_arg; - mutable llvm::OwningPtr BT_msg_ret; + mutable OwningPtr BT_call_null; + mutable OwningPtr BT_call_undef; + mutable OwningPtr BT_call_arg; + mutable OwningPtr BT_msg_undef; + mutable OwningPtr BT_msg_arg; + mutable OwningPtr BT_msg_ret; public: void checkPreStmt(const CallExpr *CE, CheckerContext &C) const; @@ -41,9 +41,9 @@ public: private: static void PreVisitProcessArgs(CheckerContext &C,CallOrObjCMessage callOrMsg, - const char *BT_desc, llvm::OwningPtr &BT); + const char *BT_desc, OwningPtr &BT); static bool PreVisitProcessArg(CheckerContext &C, SVal V,SourceRange argRange, - const Expr *argEx, const char *BT_desc, llvm::OwningPtr &BT); + const Expr *argEx, const char *BT_desc, OwningPtr &BT); static void EmitBadCall(BugType *BT, CheckerContext &C, const CallExpr *CE); void emitNilReceiverBug(CheckerContext &C, const ObjCMessage &msg, @@ -53,7 +53,7 @@ private: ProgramStateRef state, ObjCMessage msg) const; - static void LazyInit_BT(const char *desc, llvm::OwningPtr &BT) { + static void LazyInit_BT(const char *desc, OwningPtr &BT) { if (!BT) BT.reset(new BuiltinBug(desc)); } @@ -75,7 +75,7 @@ void CallAndMessageChecker::EmitBadCall(BugType *BT, CheckerContext &C, void CallAndMessageChecker::PreVisitProcessArgs(CheckerContext &C, CallOrObjCMessage callOrMsg, const char *BT_desc, - llvm::OwningPtr &BT) { + OwningPtr &BT) { for (unsigned i = 0, e = callOrMsg.getNumArgs(); i != e; ++i) if (PreVisitProcessArg(C, callOrMsg.getArgSVal(i), callOrMsg.getArgSourceRange(i), callOrMsg.getArg(i), @@ -87,7 +87,7 @@ bool CallAndMessageChecker::PreVisitProcessArg(CheckerContext &C, SVal V, SourceRange argRange, const Expr *argEx, const char *BT_desc, - llvm::OwningPtr &BT) { + OwningPtr &BT) { if (V.isUndef()) { if (ExplodedNode *N = C.generateSink()) { diff --git a/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp b/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp index 603343d28c..2e184fbaf9 100644 --- a/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp @@ -23,7 +23,7 @@ using namespace ento; namespace { class CastSizeChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const CastExpr *CE, CheckerContext &C) const; }; diff --git a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp index 2a3da7800c..1407638fcd 100644 --- a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp @@ -24,7 +24,7 @@ using namespace ento; namespace { class CastToStructChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const CastExpr *CE, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp b/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp index c8e5e8ff0d..30d060996e 100644 --- a/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp @@ -41,7 +41,7 @@ bool isRootChanged(intptr_t k) { return k == ROOT_CHANGED; } class ChrootChecker : public Checker > { mutable IdentifierInfo *II_chroot, *II_chdir; // This bug refers to possibly break out of a chroot() jail. - mutable llvm::OwningPtr BT_BreakJail; + mutable OwningPtr BT_BreakJail; public: ChrootChecker() : II_chroot(0), II_chdir(0) {} diff --git a/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp b/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp index 055ab9f317..5a1e8b0a5a 100644 --- a/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp @@ -76,7 +76,7 @@ class DeadStoreObs : public LiveVariables::Observer { AnalysisDeclContext* AC; ParentMap& Parents; llvm::SmallPtrSet Escaped; - llvm::OwningPtr reachableCode; + OwningPtr reachableCode; const CFGBlock *currentBlock; enum DeadStoreKind { Standard, Enclosing, DeadIncrement, DeadInit }; diff --git a/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp b/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp index c95df0bf0d..ed04f86341 100644 --- a/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp @@ -27,8 +27,8 @@ namespace { class DereferenceChecker : public Checker< check::Location, EventDispatcher > { - mutable llvm::OwningPtr BT_null; - mutable llvm::OwningPtr BT_undef; + mutable OwningPtr BT_null; + mutable OwningPtr BT_undef; public: void checkLocation(SVal location, bool isLoad, const Stmt* S, diff --git a/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp b/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp index 5f4add1a59..bcc4ad0f26 100644 --- a/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp @@ -24,7 +24,7 @@ using namespace ento; namespace { class DivZeroChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; void reportBug(const char *Msg, ProgramStateRef StateZero, CheckerContext &C) const ; diff --git a/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp b/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp index e098a5ee03..a1f2f3b2ba 100644 --- a/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; namespace { class FixedAddressChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp index 25ffade4cb..9f3220056d 100644 --- a/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp @@ -42,7 +42,7 @@ private: /// Denotes the return vale. static const unsigned ReturnValueIndex = UINT_MAX - 1; - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; inline void initBugType() const { if (!BT) BT.reset(new BugType("Taint Analysis", "General")); diff --git a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp index e1e8b0b13f..83eff9d1d4 100644 --- a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp @@ -30,7 +30,7 @@ class MacOSKeychainAPIChecker : public Checker, check::PostStmt, check::EndPath, check::DeadSymbols> { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: /// AllocationState is a part of the checker specific state together with the diff --git a/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp index 3694585527..075e937f46 100644 --- a/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp @@ -31,7 +31,7 @@ using namespace ento; namespace { class MacOSXAPIChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT_dispatchOnce; + mutable OwningPtr BT_dispatchOnce; public: void checkPreStmt(const CallExpr *CE, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 87ccc54c64..a8bfbcdfff 100644 --- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -74,11 +74,11 @@ class MallocChecker : public Checker { - mutable llvm::OwningPtr BT_DoubleFree; - mutable llvm::OwningPtr BT_Leak; - mutable llvm::OwningPtr BT_UseFree; - mutable llvm::OwningPtr BT_UseRelinquished; - mutable llvm::OwningPtr BT_BadFree; + mutable OwningPtr BT_DoubleFree; + mutable OwningPtr BT_Leak; + mutable OwningPtr BT_UseFree; + mutable OwningPtr BT_UseRelinquished; + mutable OwningPtr BT_BadFree; mutable IdentifierInfo *II_malloc, *II_free, *II_realloc, *II_calloc; public: diff --git a/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp b/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp index a86f586d1d..1da3bd7de2 100644 --- a/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp @@ -32,7 +32,7 @@ using namespace ento; namespace { class NSAutoreleasePoolChecker : public Checker { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; mutable Selector releaseS; public: diff --git a/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp b/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp index eac630400d..96301e7823 100644 --- a/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp @@ -28,8 +28,8 @@ using namespace ento; namespace { class ObjCAtSyncChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT_null; - mutable llvm::OwningPtr BT_undef; + mutable OwningPtr BT_null; + mutable OwningPtr BT_undef; public: void checkPreStmt(const ObjCAtSynchronizedStmt *S, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp b/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp index 0b16b87be3..69e8fbb7ab 100644 --- a/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp @@ -31,7 +31,7 @@ using namespace ento; namespace { class ObjCContainersChecker : public Checker< check::PreStmt, check::PostStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; inline void initBugType() const { if (!BT) BT.reset(new BugType("CFArray API", "Core Foundation/Objective-C")); diff --git a/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp b/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp index 47a0b61f26..fe4845bd88 100644 --- a/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp @@ -24,7 +24,7 @@ using namespace ento; namespace { class PointerArithChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp b/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp index e6d25fd903..fa5c6a30a6 100644 --- a/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; namespace { class PointerSubChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp b/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp index 2f276a294c..f6f01b81a2 100644 --- a/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp @@ -26,8 +26,8 @@ using namespace ento; namespace { class PthreadLockChecker : public Checker< check::PostStmt > { - mutable llvm::OwningPtr BT_doublelock; - mutable llvm::OwningPtr BT_lor; + mutable OwningPtr BT_doublelock; + mutable OwningPtr BT_lor; enum LockingSemantics { NotApplicable = 0, PthreadSemantics, diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 331cfe9349..bfd86a3791 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -2287,19 +2287,19 @@ class RetainCountChecker check::RegionChanges, eval::Assume, eval::Call > { - mutable llvm::OwningPtr useAfterRelease, releaseNotOwned; - mutable llvm::OwningPtr deallocGC, deallocNotOwned; - mutable llvm::OwningPtr overAutorelease, returnNotOwnedForOwned; - mutable llvm::OwningPtr leakWithinFunction, leakAtReturn; - mutable llvm::OwningPtr leakWithinFunctionGC, leakAtReturnGC; + mutable OwningPtr useAfterRelease, releaseNotOwned; + mutable OwningPtr deallocGC, deallocNotOwned; + mutable OwningPtr overAutorelease, returnNotOwnedForOwned; + mutable OwningPtr leakWithinFunction, leakAtReturn; + mutable OwningPtr leakWithinFunctionGC, leakAtReturnGC; typedef llvm::DenseMap SymbolTagMap; // This map is only used to ensure proper deletion of any allocated tags. mutable SymbolTagMap DeadSymbolTags; - mutable llvm::OwningPtr Summaries; - mutable llvm::OwningPtr SummariesGC; + mutable OwningPtr Summaries; + mutable OwningPtr SummariesGC; mutable ARCounts::Factory ARCountFactory; diff --git a/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp b/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp index 312bfdfeba..6e565932d5 100644 --- a/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; namespace { class ReturnPointerRangeChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const; }; diff --git a/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp b/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp index e1316b56e7..c83d63d00a 100644 --- a/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp @@ -25,7 +25,7 @@ using namespace ento; namespace { class ReturnUndefChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const; }; diff --git a/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp b/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp index 41e5917dd7..3046f967c4 100644 --- a/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp @@ -26,8 +26,8 @@ using namespace ento; namespace { class StackAddrEscapeChecker : public Checker< check::PreStmt, check::EndPath > { - mutable llvm::OwningPtr BT_stackleak; - mutable llvm::OwningPtr BT_returnstack; + mutable OwningPtr BT_stackleak; + mutable OwningPtr BT_returnstack; public: void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/lib/StaticAnalyzer/Checkers/StreamChecker.cpp index f05e9a9d0f..137b8cea98 100644 --- a/lib/StaticAnalyzer/Checkers/StreamChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/StreamChecker.cpp @@ -65,7 +65,7 @@ class StreamChecker : public Checker BT_nullfp, BT_illegalwhence, + mutable OwningPtr BT_nullfp, BT_illegalwhence, BT_doubleclose, BT_ResourceLeak; public: diff --git a/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp b/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp index 1eca96424c..113368254d 100644 --- a/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp @@ -22,7 +22,7 @@ using namespace ento; namespace { class TaintTesterChecker : public Checker< check::PostStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; void initBugType() const; /// Given a pointer argument, get the symbol of the value it contains diff --git a/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp index b85bce7c9a..e826a114e7 100644 --- a/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp @@ -24,7 +24,7 @@ using namespace ento; namespace { class UndefBranchChecker : public Checker { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; struct FindUndefExpr { ProgramStateRef St; diff --git a/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp index a13e217d5a..0be5cf1feb 100644 --- a/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp @@ -26,7 +26,7 @@ using namespace ento; namespace { class UndefCapturedBlockVarChecker : public Checker< check::PostStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPostStmt(const BlockExpr *BE, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp index 7eff6dc1bd..c3cc2b591c 100644 --- a/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp @@ -27,7 +27,7 @@ namespace { class UndefResultChecker : public Checker< check::PostStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp index ee58a043cc..9b9e4d5e36 100644 --- a/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp @@ -24,7 +24,7 @@ using namespace ento; namespace { class UndefinedArraySubscriptChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkPreStmt(const ArraySubscriptExpr *A, CheckerContext &C) const; diff --git a/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp index 699563394b..840ae3d2ad 100644 --- a/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp @@ -24,7 +24,7 @@ using namespace ento; namespace { class UndefinedAssignmentChecker : public Checker { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; public: void checkBind(SVal location, SVal val, const Stmt *S, diff --git a/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp index f188d2d7d9..c4f77290f9 100644 --- a/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp @@ -30,7 +30,7 @@ using llvm::Optional; namespace { class UnixAPIChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT_open, BT_pthreadOnce, BT_mallocZero; + mutable OwningPtr BT_open, BT_pthreadOnce, BT_mallocZero; mutable Optional Val_O_CREAT; public: @@ -63,7 +63,7 @@ private: // Utility functions. //===----------------------------------------------------------------------===// -static inline void LazyInitialize(llvm::OwningPtr &BT, +static inline void LazyInitialize(OwningPtr &BT, const char *name) { if (BT) return; diff --git a/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp b/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp index 7c3ee6d669..d5276aa098 100644 --- a/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp @@ -28,7 +28,7 @@ using namespace ento; namespace { class VLASizeChecker : public Checker< check::PreStmt > { - mutable llvm::OwningPtr BT; + mutable OwningPtr BT; enum VLASize_Kind { VLA_Garbage, VLA_Zero, VLA_Tainted }; void reportBug(VLASize_Kind Kind, diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 2c96af5efd..4eebdb7f8d 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -133,7 +133,7 @@ public: class PathDiagnosticBuilder : public BugReporterContext { BugReport *R; PathDiagnosticConsumer *PDC; - llvm::OwningPtr PM; + OwningPtr PM; NodeMapClosure NMC; public: PathDiagnosticBuilder(GRBugReporter &br, @@ -1403,8 +1403,8 @@ MakeReportGraph(const ExplodedGraph* G, // Create owning pointers for GTrim and NMap just to ensure that they are // released when this function exists. - llvm::OwningPtr AutoReleaseGTrim(GTrim); - llvm::OwningPtr AutoReleaseNMap(NMap); + OwningPtr AutoReleaseGTrim(GTrim); + OwningPtr AutoReleaseNMap(NMap); // Find the (first) error node in the trimmed graph. We just need to consult // the node map (NMap) which maps from nodes in the original graph to nodes @@ -1635,8 +1635,8 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, BugReport *R = bugReports[GPair.second.second]; assert(R && "No original report found for sliced graph."); - llvm::OwningPtr ReportGraph(GPair.first.first); - llvm::OwningPtr BackMap(GPair.first.second); + OwningPtr ReportGraph(GPair.first.first); + OwningPtr BackMap(GPair.first.second); const ExplodedNode *N = GPair.second.first; // Start building the path diagnostic... @@ -1866,7 +1866,7 @@ void BugReporter::FlushReport(BugReportEquivClass& EQ) { // Probably doesn't make a difference in practice. BugType& BT = exampleReport->getBugType(); - llvm::OwningPtr + OwningPtr D(new PathDiagnostic(exampleReport->getBugType().getName(), !PD || PD->useVerboseDescription() ? exampleReport->getDescription() diff --git a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index 4752f28b69..8868d95c1b 100644 --- a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -300,7 +300,7 @@ ExplodedGraph::Trim(const NodeTy* const* NBeg, const NodeTy* const* NEnd, assert (NBeg < NEnd); - llvm::OwningPtr M(new InterExplodedGraphMap()); + OwningPtr M(new InterExplodedGraphMap()); ExplodedGraph* G = TrimInternal(NBeg, NEnd, M.get(), InverseMap); diff --git a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 18eed8a0f9..cc8c315c4e 100644 --- a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -30,7 +30,7 @@ namespace { class PlistDiagnostics : public PathDiagnosticConsumer { const std::string OutputFile; const LangOptions &LangOpts; - llvm::OwningPtr SubPD; + OwningPtr SubPD; bool flushed; public: PlistDiagnostics(const std::string& prefix, const LangOptions &LangOpts, diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index 6394577a55..b9130a754c 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -1597,7 +1597,7 @@ StoreRef RegionStoreManager::KillStruct(Store store, const TypedRegion* R, // Remove the old bindings, using 'subReg' as the root of all regions // we will invalidate. RegionBindings B = GetRegionBindings(store); - llvm::OwningPtr + OwningPtr SubRegions(getRegionStoreSubRegionMap(store)); RemoveSubRegionBindings(B, subReg, *SubRegions); @@ -1615,7 +1615,7 @@ StoreRef RegionStoreManager::CopyLazyBindings(nonloc::LazyCompoundVal V, // Nuke the old bindings stemming from R. RegionBindings B = GetRegionBindings(store); - llvm::OwningPtr + OwningPtr SubRegions(getRegionStoreSubRegionMap(store)); // B and DVM are updated after the call to RemoveSubRegionBindings. diff --git a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index ba64d98b98..6e658f9a4d 100644 --- a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -74,8 +74,8 @@ public: StoreManagerCreator CreateStoreMgr; ConstraintManagerCreator CreateConstraintMgr; - llvm::OwningPtr checkerMgr; - llvm::OwningPtr Mgr; + OwningPtr checkerMgr; + OwningPtr Mgr; AnalysisConsumer(const Preprocessor& pp, const std::string& outdir, @@ -315,7 +315,7 @@ static void ActionExprEngine(AnalysisConsumer &C, AnalysisManager &mgr, ExprEngine Eng(mgr, ObjCGCEnabled); // Set the graph auditor. - llvm::OwningPtr Auditor; + OwningPtr Auditor; if (mgr.shouldVisualizeUbigraph()) { Auditor.reset(CreateUbiViz()); ExplodedNode::SetAuditor(Auditor.get()); @@ -377,7 +377,7 @@ ASTConsumer* ento::CreateAnalysisConsumer(const Preprocessor& pp, namespace { class UbigraphViz : public ExplodedNode::Auditor { - llvm::OwningPtr Out; + OwningPtr Out; llvm::sys::Path Dir, Filename; unsigned Cntr; @@ -411,7 +411,7 @@ static ExplodedNode::Auditor* CreateUbiViz() { llvm::errs() << "Writing '" << Filename.str() << "'.\n"; - llvm::OwningPtr Stream; + OwningPtr Stream; Stream.reset(new llvm::raw_fd_ostream(Filename.c_str(), ErrMsg)); if (!ErrMsg.empty()) diff --git a/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp index a59fcad6f8..c06da0d9e4 100644 --- a/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp +++ b/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp @@ -104,7 +104,7 @@ CheckerManager *ento::createCheckerManager(const AnalyzerOptions &opts, const LangOptions &langOpts, ArrayRef plugins, DiagnosticsEngine &diags) { - llvm::OwningPtr checkerMgr(new CheckerManager(langOpts)); + OwningPtr checkerMgr(new CheckerManager(langOpts)); SmallVector checkerOpts; for (unsigned i = 0, e = opts.CheckersControlList.size(); i != e; ++i) { -- 2.40.0