]> granicus.if.org Git - clang/commitdiff
Basic: import OwningPtr<> into clang namespace
authorDylan Noblesmith <nobled@dreamwidth.org>
Sun, 5 Feb 2012 02:12:40 +0000 (02:12 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Sun, 5 Feb 2012 02:12:40 +0000 (02:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8

97 files changed:
include/clang/ARCMigrate/FileRemapper.h
include/clang/AST/ASTContext.h
include/clang/Analysis/AnalysisContext.h
include/clang/Basic/FileManager.h
include/clang/Basic/FileSystemStatCache.h
include/clang/Basic/LLVM.h
include/clang/CodeGen/CodeGenAction.h
include/clang/Frontend/ASTUnit.h
include/clang/Frontend/ChainedDiagnosticConsumer.h
include/clang/Frontend/ChainedIncludesSource.h
include/clang/Frontend/CompilerInstance.h
include/clang/Frontend/FrontendAction.h
include/clang/Frontend/MultiplexConsumer.h
include/clang/Frontend/TextDiagnosticPrinter.h
include/clang/Frontend/VerifyDiagnosticConsumer.h
include/clang/Lex/Preprocessor.h
include/clang/Parse/Parser.h
include/clang/Rewrite/FrontendActions.h
include/clang/Rewrite/TokenRewriter.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTReader.h
include/clang/Serialization/Module.h
include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
lib/ARCMigrate/ARCMT.cpp
lib/ARCMigrate/FileRemapper.cpp
lib/ARCMigrate/TransRetainReleaseDealloc.cpp
lib/ARCMigrate/TransUnbridgedCasts.cpp
lib/AST/ASTContext.cpp
lib/Analysis/CFG.cpp
lib/Basic/FileManager.cpp
lib/Basic/Targets.cpp
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenAction.cpp
lib/CodeGen/ModuleBuilder.cpp
lib/Driver/Driver.cpp
lib/Driver/ToolChains.cpp
lib/Frontend/ASTUnit.cpp
lib/Frontend/ChainedIncludesSource.cpp
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/CreateInvocationFromCommandLine.cpp
lib/Frontend/FrontendAction.cpp
lib/Frontend/SerializedDiagnosticPrinter.cpp
lib/FrontendTool/ExecuteCompilerInvocation.cpp
lib/Lex/HeaderMap.cpp
lib/Lex/PTHLexer.cpp
lib/Parse/ParseAST.cpp
lib/Rewrite/FixItRewriter.cpp
lib/Rewrite/FrontendActions.cpp
lib/Sema/SemaLookup.cpp
lib/Serialization/ASTReader.cpp
lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp
lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
lib/StaticAnalyzer/Checkers/CStringChecker.cpp
lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp
lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp
lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp
lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp
lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
lib/StaticAnalyzer/Checkers/StreamChecker.cpp
lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp
lib/StaticAnalyzer/Core/ExplodedGraph.cpp
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
lib/StaticAnalyzer/Core/RegionStore.cpp
lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp

index 9a0b690ad691a28ae2bf1b36d5f7d6dbb2cb0fba..a451988f9330d0557a56c9614f134d8476d6ccb9 100644 (file)
@@ -30,7 +30,7 @@ namespace arcmt {
 
 class FileRemapper {
   // FIXME: Reuse the same FileManager for multiple ASTContexts.
-  llvm::OwningPtr<FileManager> FileMgr;
+  OwningPtr<FileManager> FileMgr;
 
   typedef llvm::PointerUnion<const FileEntry *, llvm::MemoryBuffer *> Target;
   typedef llvm::DenseMap<const FileEntry *, Target> MappingsTy;
index fee8a0573fd185af16f45a799a035ad26bb80e54..a23447197bdbf3ff5153d9ce58b19fcbc36e294a 100644 (file)
@@ -349,7 +349,7 @@ class ASTContext : public llvm::RefCountedBase<ASTContext> {
   PartialDiagnosticStorageAllocator *DiagAllocator;
 
   /// \brief The current C++ ABI.
-  llvm::OwningPtr<CXXABI> ABI;
+  OwningPtr<CXXABI> 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<ExternalASTSource> ExternalSource;
+  OwningPtr<ExternalASTSource> 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<ExternalASTSource> &Source);
+  void setExternalSource(OwningPtr<ExternalASTSource> &Source);
 
   /// \brief Retrieve a pointer to the external AST source associated
   /// with this AST context, if any.
index 468fff5f2367050f1b05bd20fb68b42626d1bc50..6b6f8ef2cc2896a8cfb18b40a64b29f708332308 100644 (file)
@@ -76,19 +76,19 @@ class AnalysisDeclContext {
   // TranslationUnit is NULL if we don't have multiple translation units.
   idx::TranslationUnit *TU;
 
-  llvm::OwningPtr<CFG> cfg, completeCFG;
-  llvm::OwningPtr<CFGStmtMap> cfgStmtMap;
+  OwningPtr<CFG> cfg, completeCFG;
+  OwningPtr<CFGStmtMap> cfgStmtMap;
 
   CFG::BuildOptions cfgBuildOptions;
   CFG::BuildOptions::ForcedBlkExprs *forcedBlkExprs;
 
   bool builtCFG, builtCompleteCFG;
 
-  llvm::OwningPtr<LiveVariables> liveness;
-  llvm::OwningPtr<LiveVariables> relaxedLiveness;
-  llvm::OwningPtr<ParentMap> PM;
-  llvm::OwningPtr<PseudoConstantAnalysis> PCA;
-  llvm::OwningPtr<CFGReverseBlockReachabilityAnalysis> CFA;
+  OwningPtr<LiveVariables> liveness;
+  OwningPtr<LiveVariables> relaxedLiveness;
+  OwningPtr<ParentMap> PM;
+  OwningPtr<PseudoConstantAnalysis> PCA;
+  OwningPtr<CFGReverseBlockReachabilityAnalysis> CFA;
 
   llvm::BumpPtrAllocator A;
 
index d9fe41ac2a645da1dd1aadb67256249c66da7872..90f71f5203210b43a5ebcd56327da0de3ac78299 100644 (file)
@@ -148,7 +148,7 @@ class FileManager : public llvm::RefCountedBase<FileManager> {
   unsigned NumDirCacheMisses, NumFileCacheMisses;
 
   // Caching.
-  llvm::OwningPtr<FileSystemStatCache> StatCache;
+  OwningPtr<FileSystemStatCache> StatCache;
 
   bool getStatValue(const char *Path, struct stat &StatBuf,
                     int *FileDescriptor);
index f27312fadef84acef50c5f985ab7cc80fb12a853..96a2f90ed1941b0968001d111862225cac0823eb 100644 (file)
@@ -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 <sys/types.h>
@@ -27,7 +28,7 @@ namespace clang {
 class FileSystemStatCache {
   virtual void anchor();
 protected:
-  llvm::OwningPtr<FileSystemStatCache> NextStatCache;
+  OwningPtr<FileSystemStatCache> NextStatCache;
   
 public:
   virtual ~FileSystemStatCache() {}
index 27c459dee4e24859e6c1a2935b49ca791b2cd12f..005e17bbf916e6ba676e095b70c14f819bf70c21 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
   class StringRef;
   class Twine;
   template<typename T> class ArrayRef;
+  template<class T> class OwningPtr;
   template<typename T, unsigned N> class SmallVector;
   template<typename T> 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;
   
index 5c2e2bbe8d5283f877d78612cff72eede4f487e0..7fa589feebf8530539dba7c8b39184f7895937a4 100644 (file)
@@ -24,7 +24,7 @@ class BackendConsumer;
 class CodeGenAction : public ASTFrontendAction {
 private:
   unsigned Act;
-  llvm::OwningPtr<llvm::Module> TheModule;
+  OwningPtr<llvm::Module> TheModule;
   llvm::Module *LinkModule;
   llvm::LLVMContext *VMContext;
   bool OwnsVMContext;
index 4b84e6a8d6b872e21d9a7bc24deac89e1bebb6b0..fb368cfaa92371996c3a17cbe5d31c8ea8675456 100644 (file)
@@ -74,7 +74,7 @@ private:
   llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics;
   llvm::IntrusiveRefCntPtr<FileManager>       FileMgr;
   llvm::IntrusiveRefCntPtr<SourceManager>     SourceMgr;
-  llvm::OwningPtr<HeaderSearch>               HeaderInfo;
+  OwningPtr<HeaderSearch>                     HeaderInfo;
   llvm::IntrusiveRefCntPtr<TargetInfo>        Target;
   llvm::IntrusiveRefCntPtr<Preprocessor>      PP;
   llvm::IntrusiveRefCntPtr<ASTContext>        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<ASTConsumer> Consumer;
+  OwningPtr<ASTConsumer> Consumer;
   
   /// \brief The semantic analysis object used to type-check the translation
   /// unit.
-  llvm::OwningPtr<Sema> TheSema;
+  OwningPtr<Sema> TheSema;
   
   /// Optional owned invocation, just used to make the invocation used in
   /// LoadFromCommandLine available.
index 6ffcec51cfacf16978e5c45e24056a45827c366b..ce2b242296ed3a360dde9ac4010f2f1ad9fcb7a4 100644 (file)
@@ -22,8 +22,8 @@ class LangOptions;
 /// diagnostics should be included in counts.
 class ChainedDiagnosticConsumer : public DiagnosticConsumer {
   virtual void anchor();
-  llvm::OwningPtr<DiagnosticConsumer> Primary;
-  llvm::OwningPtr<DiagnosticConsumer> Secondary;
+  OwningPtr<DiagnosticConsumer> Primary;
+  OwningPtr<DiagnosticConsumer> Secondary;
 
 public:
   ChainedDiagnosticConsumer(DiagnosticConsumer *_Primary,
index a08ecb3c995f50e0b85e5d4364b49171f0a30b08..d7119e96536f95a7114d38dcaaca00a252ac2afb 100644 (file)
@@ -30,7 +30,7 @@ private:
   ExternalSemaSource &getFinalReader() const { return *FinalReader; }
 
   std::vector<CompilerInstance *> CIs;
-  llvm::OwningPtr<ExternalSemaSource> FinalReader;
+  OwningPtr<ExternalSemaSource> FinalReader;
 
   
 protected:
index 1e5994fc5815123546d4f620112ad41a6536a68c..e1cfd73fb39751d7282d0271bb090ea3c290a011 100644 (file)
@@ -86,16 +86,16 @@ class CompilerInstance : public ModuleLoader {
   llvm::IntrusiveRefCntPtr<ASTContext> Context;
 
   /// The AST consumer.
-  llvm::OwningPtr<ASTConsumer> Consumer;
+  OwningPtr<ASTConsumer> Consumer;
 
   /// The code completion consumer.
-  llvm::OwningPtr<CodeCompleteConsumer> CompletionConsumer;
+  OwningPtr<CodeCompleteConsumer> CompletionConsumer;
 
   /// \brief The semantic analysis object.
-  llvm::OwningPtr<Sema> TheSema;
+  OwningPtr<Sema> TheSema;
   
   /// \brief The frontend timer
-  llvm::OwningPtr<llvm::Timer> FrontendTimer;
+  OwningPtr<llvm::Timer> FrontendTimer;
 
   /// \brief Non-owning reference to the ASTReader, if one exists.
   ASTReader *ModuleManager;
index 80d0d5fe0c310e70ea8d01c5e5cf0068f3d29693..6839028f97841b027eda320fc4776606f15040cf 100644 (file)
@@ -28,7 +28,7 @@ class CompilerInstance;
 /// the frontend.
 class FrontendAction {
   FrontendInputFile CurrentInput;
-  llvm::OwningPtr<ASTUnit> CurrentASTUnit;
+  OwningPtr<ASTUnit> 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<FrontendAction> WrappedAction;
+  OwningPtr<FrontendAction> WrappedAction;
 
 protected:
   virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
index 7299f73d979a61d6464b2192e7df1879fe2d02b2..0c4f7dcc39e802cc11903a82607cb114c33f0ebd 100644 (file)
@@ -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 <vector>
 
@@ -52,8 +53,8 @@ public:
   static bool classof(const MultiplexConsumer *) { return true; }
 private:
   std::vector<ASTConsumer*> Consumers;  // Owns these.
-  llvm::OwningPtr<MultiplexASTMutationListener> MutationListener;
-  llvm::OwningPtr<MultiplexASTDeserializationListener> DeserializationListener;
+  OwningPtr<MultiplexASTMutationListener> MutationListener;
+  OwningPtr<MultiplexASTDeserializationListener> DeserializationListener;
 };
 
 }  // end namespace clang
index 8051d9ce8b5b8f9a12d8ca9c0e06991fb98b1308..9b6ac24cca7e62080b478992302aa0105fdf8ba6 100644 (file)
@@ -31,7 +31,7 @@ class TextDiagnosticPrinter : public DiagnosticConsumer {
   const SourceManager *SM;
 
   /// \brief Handle to the currently active text diagnostic emitter.
-  llvm::OwningPtr<TextDiagnostic> TextDiag;
+  OwningPtr<TextDiagnostic> TextDiag;
 
   /// A string to prefix to error messages.
   std::string Prefix;
index 28dc9de03af0fc11d784a55caf4979e2cf918354..2fc6ccc36d55190ecc3b06c4fa1ee78a462191d3 100644 (file)
@@ -67,7 +67,7 @@ public:
   DiagnosticsEngine &Diags;
   DiagnosticConsumer *PrimaryClient;
   bool OwnsPrimaryClient;
-  llvm::OwningPtr<TextDiagnosticBuffer> Buffer;
+  OwningPtr<TextDiagnosticBuffer> Buffer;
   Preprocessor *CurrentPreprocessor;
 
 private:
index bf5b9d09395a3e490f92cf076a66078aff13496a..10d934aab27403b5b39bbbc7353b410a9424ad7d 100644 (file)
@@ -75,7 +75,7 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> {
 
   /// PTH - An optional PTHManager object used for getting tokens from
   ///  a token cache rather than lexing the original source file.
-  llvm::OwningPtr<PTHManager> PTH;
+  OwningPtr<PTHManager> 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<Preprocessor> {
   /// 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<Lexer> CurLexer;
+  OwningPtr<Lexer> 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<PTHLexer> CurPTHLexer;
+  OwningPtr<PTHLexer> 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<Preprocessor> {
 
   /// 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<TokenLexer> CurTokenLexer;
+  OwningPtr<TokenLexer> CurTokenLexer;
 
   /// \brief The kind of lexer we're currently working with.
   enum CurLexerKind {
index 6221cfb1d4039dea0fb02e29d72199250f9ccbc5..7fcc37d41f29ce5b71104417a3b91e5954cc5640 100644 (file)
@@ -155,15 +155,15 @@ class Parser : public CodeCompletionHandler {
   mutable IdentifierInfo *Ident_final;
   mutable IdentifierInfo *Ident_override;
 
-  llvm::OwningPtr<PragmaHandler> AlignHandler;
-  llvm::OwningPtr<PragmaHandler> GCCVisibilityHandler;
-  llvm::OwningPtr<PragmaHandler> OptionsHandler;
-  llvm::OwningPtr<PragmaHandler> PackHandler;
-  llvm::OwningPtr<PragmaHandler> MSStructHandler;
-  llvm::OwningPtr<PragmaHandler> UnusedHandler;
-  llvm::OwningPtr<PragmaHandler> WeakHandler;
-  llvm::OwningPtr<PragmaHandler> FPContractHandler;
-  llvm::OwningPtr<PragmaHandler> OpenCLExtensionHandler;
+  OwningPtr<PragmaHandler> AlignHandler;
+  OwningPtr<PragmaHandler> GCCVisibilityHandler;
+  OwningPtr<PragmaHandler> OptionsHandler;
+  OwningPtr<PragmaHandler> PackHandler;
+  OwningPtr<PragmaHandler> MSStructHandler;
+  OwningPtr<PragmaHandler> UnusedHandler;
+  OwningPtr<PragmaHandler> WeakHandler;
+  OwningPtr<PragmaHandler> FPContractHandler;
+  OwningPtr<PragmaHandler> OpenCLExtensionHandler;
 
   /// Whether the '>' token acts as an operator or not. This will be
   /// true except when we are parsing an expression within a C++
index 03dbd0426599074fd3a0be7bfc291c2574feca96..6e9ecace672f90570417ce47d3a94fc3cdbaffa8 100644 (file)
@@ -28,8 +28,8 @@ protected:
 
 class FixItAction : public ASTFrontendAction {
 protected:
-  llvm::OwningPtr<FixItRewriter> Rewriter;
-  llvm::OwningPtr<FixItOptions> FixItOpts;
+  OwningPtr<FixItRewriter> Rewriter;
+  OwningPtr<FixItOptions> FixItOpts;
 
   virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
                                          StringRef InFile);
index 62ea12af1f17c87843fba8b4c0730756d2f8f28f..9ebd33a51970a6a1fb33d059b9815c92b7c49c75 100644 (file)
@@ -41,7 +41,7 @@ namespace clang {
 
     /// ScratchBuf - This is the buffer that we create scratch tokens from.
     ///
-    llvm::OwningPtr<ScratchBuffer> ScratchBuf;
+    OwningPtr<ScratchBuffer> ScratchBuf;
 
     TokenRewriter(const TokenRewriter&);  // DO NOT IMPLEMENT
     void operator=(const TokenRewriter&); // DO NOT IMPLEMENT.
index a9b6827bd0cc82aa8f8402366d38c2381f1d2b2d..d2d61abc7a7c9c8fb1edcff7023c4f9d4f68dfbb 100644 (file)
@@ -260,14 +260,14 @@ public:
   llvm::SmallPtrSet<NamedDecl *, 4> HiddenDefinitions;
   
   /// FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
-  llvm::OwningPtr<CXXFieldCollector> FieldCollector;
+  OwningPtr<CXXFieldCollector> FieldCollector;
 
   typedef llvm::SmallPtrSet<const CXXRecordDecl*, 8> 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<RecordDeclSetTy> PureVirtualClassDiagSet;
+  OwningPtr<RecordDeclSetTy> PureVirtualClassDiagSet;
 
   /// ParsingInitForAutoVars - a set of declarations with auto types for which
   /// we are currently parsing the initializer.
index 2ebdd095a716afa6f1cbee1cf580b2174c1aef72..b99b9c78c64ab36908673ab04c4bb2ad43f98aeb 100644 (file)
@@ -218,7 +218,7 @@ public:
 
 private:
   /// \brief The receiver of some callbacks invoked by ASTReader.
-  llvm::OwningPtr<ASTReaderListener> Listener;
+  OwningPtr<ASTReaderListener> Listener;
 
   /// \brief The receiver of deserialization events.
   ASTDeserializationListener *DeserializationListener;
index 34f208d71f2bfad7cf9a6c142146847de548f88d..4c93c33842cf9857f3a522e7dd3675c8d05d36e0 100644 (file)
@@ -77,7 +77,7 @@ public:
   
   /// \brief The memory buffer that stores the data associated with
   /// this AST file.
-  llvm::OwningPtr<llvm::MemoryBuffer> Buffer;
+  OwningPtr<llvm::MemoryBuffer> Buffer;
 
   /// \brief The size of this file, in bits.
   uint64_t SizeInBits;
index b7294abb52b5edbe12e51c717d5a0a4d385738bc..3a9a1254ba3834521084ae8c776b6b992aebac57 100644 (file)
@@ -38,7 +38,7 @@ class AnalysisManager : public BugReporterData {
   DiagnosticsEngine &Diags;
   const LangOptions &LangInfo;
 
-  llvm::OwningPtr<PathDiagnosticConsumer> PD;
+  OwningPtr<PathDiagnosticConsumer> PD;
 
   // Configurable components creators.
   StoreManagerCreator CreateStoreMgr;
index f393fd1ba0928aa6e7dce3d66cd2b62c5173cdde..d9b613664cbba3e8e83976b1a8235688513843cd 100644 (file)
@@ -58,7 +58,7 @@ private:
   SubEngine& SubEng;
 
   /// G - The simulation graph.  Each node is a (location,state) pair.
-  llvm::OwningPtr<ExplodedGraph> G;
+  OwningPtr<ExplodedGraph> 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
index f19520984e277e1da583941c61aa692c797bd2fb..7779be0e314eff7d0e15067ae9e4c14bb1133f23 100644 (file)
@@ -394,8 +394,8 @@ private:
   SubEngine *Eng; /* Can be null. */
 
   EnvironmentManager                   EnvMgr;
-  llvm::OwningPtr<StoreManager>        StoreMgr;
-  llvm::OwningPtr<ConstraintManager>   ConstraintMgr;
+  OwningPtr<StoreManager>              StoreMgr;
+  OwningPtr<ConstraintManager>         ConstraintMgr;
 
   ProgramState::GenericDataMap::Factory     GDMFactory;
 
@@ -407,7 +407,7 @@ private:
   llvm::FoldingSet<ProgramState> StateSet;
 
   /// Object that manages the data for all created SVals.
-  llvm::OwningPtr<SValBuilder> svalBuilder;
+  OwningPtr<SValBuilder> 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<SubRegionMap> SRM;
+  OwningPtr<SubRegionMap> SRM;
 public:
 
   ScanReachableSymbols(ProgramStateRef st, SymbolVisitor& v)
index f9a1a75d87703199677cdb64c8811a84e1b90c42..0e43ab34fdc0a00245622603c4d2d03a5bf27626 100644 (file)
@@ -185,7 +185,7 @@ static bool HasARCRuntime(CompilerInvocation &origCI) {
 
 static CompilerInvocation *
 createInvocationForMigration(CompilerInvocation &origCI) {
-  llvm::OwningPtr<CompilerInvocation> CInvok;
+  OwningPtr<CompilerInvocation> 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<CompilerInvocation> CInvok;
+  OwningPtr<CompilerInvocation> 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<ASTUnit> Unit(
+  OwningPtr<ASTUnit> 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<CompilerInvocation> CInvok;
+  OwningPtr<CompilerInvocation> 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<ARCMTMacroTrackerAction> ASTAction;
+  OwningPtr<ARCMTMacroTrackerAction> ASTAction;
   ASTAction.reset(new ARCMTMacroTrackerAction(ARCMTMacroLocs));
 
-  llvm::OwningPtr<ASTUnit> Unit(
+  OwningPtr<ASTUnit> Unit(
       ASTUnit::LoadFromCompilerInvocationAction(CInvok.take(), Diags,
                                                 ASTAction.get()));
   if (!Unit)
index 39c9aada4dbfbad72061f5d7cb108a16f41076ce..4a1223226f639541eac0fd956b0243f8a5a78fcb 100644 (file)
@@ -60,7 +60,7 @@ bool FileRemapper::initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag,
 
   std::vector<std::pair<const FileEntry *, const FileEntry *> > pairs;
   
-  llvm::OwningPtr<llvm::MemoryBuffer> fileBuf;
+  OwningPtr<llvm::MemoryBuffer> fileBuf;
   if (llvm::MemoryBuffer::getFile(infoFile.c_str(), fileBuf))
     return report("Error opening file: " + infoFile, Diag);
   
index 6eb82093cf892e0bf1b4310836d037079ff737a8..7bb7b5eeeae9aee3b9e1edee831ef9fba1dc13c4 100644 (file)
@@ -34,7 +34,7 @@ class RetainReleaseDeallocRemover :
   MigrationPass &Pass;
 
   ExprSet Removables;
-  llvm::OwningPtr<ParentMap> StmtMap;
+  OwningPtr<ParentMap> StmtMap;
 
   Selector DelegateSel, FinalizeSel;
 
index 2d9fe5e4bdbe79bb71ca17c2ec3f8ce308d8863f..3e5723dd0064da8257f22cae34edec4673f9b037 100644 (file)
@@ -49,7 +49,7 @@ namespace {
 class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter>{
   MigrationPass &Pass;
   IdentifierInfo *SelfII;
-  llvm::OwningPtr<ParentMap> StmtMap;
+  OwningPtr<ParentMap> StmtMap;
 
 public:
   UnbridgedCastRewriter(MigrationPass &pass) : Pass(pass) {
index ca199c849f7688d60ffed770f7459af69fe0495d..335382bb4c2bed1cf0534263b283b36c60194e2d 100644 (file)
@@ -299,7 +299,7 @@ void ASTContext::AddDeallocation(void (*Callback)(void*), void *Data) {
 }
 
 void
-ASTContext::setExternalSource(llvm::OwningPtr<ExternalASTSource> &Source) {
+ASTContext::setExternalSource(OwningPtr<ExternalASTSource> &Source) {
   ExternalSource.reset(Source.take());
 }
 
index 50393b634dc166ace1a92ce3edb369709f7deaa6..406aca84330f800635ef9a652568dcf5ceea5772 100644 (file)
@@ -250,7 +250,7 @@ class CFGBuilder {
   typedef BlockScopePosPair JumpSource;
 
   ASTContext *Context;
-  llvm::OwningPtr<CFG> cfg;
+  OwningPtr<CFG> cfg;
 
   CFGBlock *Block;
   CFGBlock *Succ;
index 5d352fda28aff672bce2a4dfb4188adea133932e..267db4835295320bd39574e3ed753d2ced9937e2 100644 (file)
@@ -484,7 +484,7 @@ void FileManager::FixupRelativePath(SmallVectorImpl<char> &path) const {
 
 llvm::MemoryBuffer *FileManager::
 getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) {
-  llvm::OwningPtr<llvm::MemoryBuffer> Result;
+  OwningPtr<llvm::MemoryBuffer> 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<llvm::MemoryBuffer> Result;
+  OwningPtr<llvm::MemoryBuffer> Result;
   llvm::error_code ec;
   if (FileSystemOpts.WorkingDir.empty()) {
     ec = llvm::MemoryBuffer::getFile(Filename, Result);
index 698d627a17d7bcfb9fed8278157ca67c6c287e8b..8539727b0a72842dc32c95e64db87687fd00ef44 100644 (file)
@@ -4022,7 +4022,7 @@ TargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags,
   llvm::Triple Triple(Opts.Triple);
 
   // Construct the target
-  llvm::OwningPtr<TargetInfo> Target(AllocateTarget(Triple.str()));
+  OwningPtr<TargetInfo> Target(AllocateTarget(Triple.str()));
   if (!Target) {
     Diags.Report(diag::err_target_unknown_triple) << Triple.str();
     return 0;
index c6d5be059c97d3648bfc9dede82d22c10e1ca112..f676311658aa947b55606f691803d95725d5a174 100644 (file)
@@ -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<CGBlockInfo> blockInfo;
+  OwningPtr<CGBlockInfo> blockInfo;
   blockInfo.reset(findAndRemoveBlockInfo(&FirstBlockInfo,
                                          blockExpr->getBlockDecl()));
 
index 5fd611d44f382180793fc6879544c1428440bce3..760068a9cb469716c10e5e48b5c0bcf7592ad5a7 100644 (file)
@@ -42,7 +42,7 @@ namespace CodeGen {
 class CGCXXABI {
 protected:
   CodeGenModule &CGM;
-  llvm::OwningPtr<MangleContext> MangleCtx;
+  OwningPtr<MangleContext> MangleCtx;
 
   CGCXXABI(CodeGenModule &CGM)
     : CGM(CGM), MangleCtx(CGM.getContext().createMangleContext()) {}
index a306c857e5aa2c595c4cf0b34b652a9c489b5e90..96b304544bc212498feb7a40bf1fc3390bbaac07 100644 (file)
@@ -668,7 +668,7 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD,
                                       bool BaseIsVirtual, 
                                    llvm::GlobalVariable::LinkageTypes Linkage,
                                       VTableAddressPointsMapTy& AddressPoints) {
-  llvm::OwningPtr<VTableLayout> VTLayout(
+  OwningPtr<VTableLayout> VTLayout(
     VTContext.createConstructionVTableLayout(Base.getBase(),
                                              Base.getBaseOffset(),
                                              BaseIsVirtual, RD));
index eedfc57a10618d5b728af0834501cd880e20ed68..02e08602922ad31ab89ebf9a7131afe19f2583f6 100644 (file)
@@ -44,9 +44,9 @@ namespace clang {
 
     Timer LLVMIRGeneration;
 
-    llvm::OwningPtr<CodeGenerator> Gen;
+    OwningPtr<CodeGenerator> Gen;
 
-    llvm::OwningPtr<llvm::Module> TheModule, LinkModule;
+    OwningPtr<llvm::Module> 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<BackendAction>(Act);
-  llvm::OwningPtr<raw_ostream> OS(GetOutputStream(CI, InFile, BA));
+  OwningPtr<raw_ostream> OS(GetOutputStream(CI, InFile, BA));
   if (BA != Backend_EmitNothing && !OS)
     return 0;
 
index 8aa788d9a154f877712ffc7f45f8da3ac3a65fee..ddbe27bc176181f080a9a64ac2c55f2050ffee7c 100644 (file)
@@ -28,12 +28,12 @@ using namespace clang;
 namespace {
   class CodeGeneratorImpl : public CodeGenerator {
     DiagnosticsEngine &Diags;
-    llvm::OwningPtr<const llvm::TargetData> TD;
+    OwningPtr<const llvm::TargetData> TD;
     ASTContext *Ctx;
     const CodeGenOptions CodeGenOpts;  // Intentionally copied in.
   protected:
-    llvm::OwningPtr<llvm::Module> M;
-    llvm::OwningPtr<CodeGen::CodeGenModule> Builder;
+    OwningPtr<llvm::Module> M;
+    OwningPtr<CodeGen::CodeGenModule> Builder;
   public:
     CodeGeneratorImpl(DiagnosticsEngine &diags, const std::string& ModuleName,
                       const CodeGenOptions &CGO, llvm::LLVMContext& C)
index 89e06002a2b563c35c20a3864ce7c89e9b49d4e9..6f93d0be25c0155e5bbb5a8908f2043525ed2ece 100644 (file)
@@ -1061,7 +1061,7 @@ void Driver::BuildActions(const ToolChain &TC, const DerivedArgList &Args,
     }
 
     // Build the pipeline for this file.
-    llvm::OwningPtr<Action> Current(new InputAction(*InputArg, InputType));
+    OwningPtr<Action> Current(new InputAction(*InputArg, InputType));
     for (unsigned i = 0; i != NumSteps; ++i) {
       phases::ID Phase = types::getCompilationPhase(InputType, i);
 
index 4fe29de90dba05802201b615497b459db961c15a..79d84544a85c4bcbbf0b7cbce42789d004036876 100644 (file)
@@ -1823,7 +1823,7 @@ static bool IsUbuntu(enum LinuxDistro Distro) {
 }
 
 static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
-  llvm::OwningPtr<llvm::MemoryBuffer> File;
+  OwningPtr<llvm::MemoryBuffer> File;
   if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
     StringRef Data = File.get()->getBuffer();
     SmallVector<StringRef, 8> Lines;
index a9454a1aa0944d72c6035e1f72ae6a8ce7068fc4..fce28b7488f8111b8da9e0121f6de68ac4ebc39f 100644 (file)
@@ -654,7 +654,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
                                   RemappedFile *RemappedFiles,
                                   unsigned NumRemappedFiles,
                                   bool CaptureDiagnostics) {
-  llvm::OwningPtr<ASTUnit> AST(new ASTUnit(true));
+  OwningPtr<ASTUnit> AST(new ASTUnit(true));
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
@@ -729,7 +729,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
   std::string Predefines;
   unsigned Counter;
 
-  llvm::OwningPtr<ASTReader> Reader;
+  OwningPtr<ASTReader> 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<ExternalASTSource> Source(Reader.take());
+  OwningPtr<ExternalASTSource> 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<CompilerInstance> Clang(new CompilerInstance());
+  OwningPtr<CompilerInstance> Clang(new CompilerInstance());
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<CompilerInstance>
@@ -1114,7 +1114,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
     SavedMainFileBuffer = OverrideMainBuffer;
   }
   
-  llvm::OwningPtr<TopLevelDeclTrackerAction> Act(
+  OwningPtr<TopLevelDeclTrackerAction> 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<llvm::MemoryBuffer> OwnedPreambleBuffer;
+  OwningPtr<llvm::MemoryBuffer> 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<CompilerInstance> Clang(new CompilerInstance());
+  OwningPtr<CompilerInstance> Clang(new CompilerInstance());
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<CompilerInstance>
@@ -1553,7 +1553,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble(
   Clang->setSourceManager(new SourceManager(getDiagnostics(),
                                             Clang->getFileManager()));
   
-  llvm::OwningPtr<PrecompilePreambleAction> Act;
+  OwningPtr<PrecompilePreambleAction> 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<DiagnosticsEngine> Diags,
                          bool CaptureDiagnostics) {
-  llvm::OwningPtr<ASTUnit> AST;
+  OwningPtr<ASTUnit> 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<ASTUnit> OwnAST;
+  OwningPtr<ASTUnit> 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<CompilerInstance> Clang(new CompilerInstance());
+  OwningPtr<CompilerInstance> Clang(new CompilerInstance());
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<CompilerInstance>
@@ -1754,7 +1754,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(CompilerInvocation *CI,
 
   ASTFrontendAction *Act = Action;
 
-  llvm::OwningPtr<TopLevelDeclTrackerAction> TrackerAct;
+  OwningPtr<TopLevelDeclTrackerAction> 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<ASTUnit> AST;
+  OwningPtr<ASTUnit> 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<ASTUnit> AST;
+  OwningPtr<ASTUnit> 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<CompilerInstance> Clang(new CompilerInstance());
+  OwningPtr<CompilerInstance> Clang(new CompilerInstance());
 
   // Recover resources if we crash before exiting this method.
   llvm::CrashRecoveryContextCleanupRegistrar<CompilerInstance>
@@ -2378,7 +2378,7 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column,
   // Disable the preprocessing record
   PreprocessorOpts.DetailedRecord = false;
   
-  llvm::OwningPtr<SyntaxOnlyAction> Act;
+  OwningPtr<SyntaxOnlyAction> Act;
   Act.reset(new SyntaxOnlyAction);
   if (Act->BeginSourceFile(*Clang.get(), Clang->getFrontendOpts().Inputs[0])) {
     if (OverrideMainBuffer) {
index 45cf672aa8b85b0b648d7f2cb0e13e667dd4dc93..4ecc052198a7ed5a5709512f7fb9ff374c76357a 100644 (file)
@@ -31,7 +31,7 @@ static ASTReader *createASTReader(CompilerInstance &CI,
                                   SmallVector<std::string, 4> &bufNames,
                              ASTDeserializationListener *deserialListener = 0) {
   Preprocessor &PP = CI.getPreprocessor();
-  llvm::OwningPtr<ASTReader> Reader;
+  OwningPtr<ASTReader> 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<std::string> &includes = CI.getPreprocessorOpts().ChainedIncludes;
   assert(!includes.empty() && "No '-chain-include' in options!");
 
-  llvm::OwningPtr<ChainedIncludesSource> source(new ChainedIncludesSource());
+  OwningPtr<ChainedIncludesSource> source(new ChainedIncludesSource());
   InputKind IK = CI.getFrontendOpts().Inputs[0].Kind;
 
   SmallVector<llvm::MemoryBuffer *, 4> 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<CompilerInvocation> CInvok;
+    OwningPtr<CompilerInvocation> CInvok;
     CInvok.reset(new CompilerInvocation(CI.getInvocation()));
     
     CInvok->getPreprocessorOpts().ChainedIncludes.clear();
@@ -91,7 +91,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) {
     llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags(
         new DiagnosticsEngine(DiagID, DiagClient));
 
-    llvm::OwningPtr<CompilerInstance> Clang(new CompilerInstance());
+    OwningPtr<CompilerInstance> 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<char, 256> serialAST;
     llvm::raw_svector_ostream OS(serialAST);
-    llvm::OwningPtr<ASTConsumer> consumer;
+    OwningPtr<ASTConsumer> 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<ExternalASTSource> Reader;
+      OwningPtr<ExternalASTSource> 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<ASTReader> Reader;
+  OwningPtr<ASTReader> Reader;
   Reader.reset(createASTReader(CI, pchName, serialBufs, serialBufNames));
   if (!Reader)
     return 0;
index 03dc6261708acaeeeb258a975c119fc854c7daf6..a3669d798ae375888a903ec9db9d7fda64b84795 100644 (file)
@@ -95,7 +95,7 @@ static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts,
                               unsigned argc, const char* const *argv,
                               DiagnosticsEngine &Diags) {
   std::string ErrorInfo;
-  llvm::OwningPtr<raw_ostream> OS(
+  OwningPtr<raw_ostream> 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<llvm::raw_fd_ostream> OS;
+  OwningPtr<llvm::raw_fd_ostream> 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<ExternalASTSource> Source;
+  OwningPtr<ExternalASTSource> 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<ASTReader> Reader;
+  OwningPtr<ASTReader> 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<llvm::raw_fd_ostream> OS;
+  OwningPtr<llvm::raw_fd_ostream> OS;
   std::string OSFile;
 
   if (UseTemporary && OutFile != "-") {
@@ -593,7 +593,7 @@ bool CompilerInstance::InitializeSourceManager(StringRef InputFile,
     }
     SourceMgr.createMainFileID(File, Kind);
   } else {
-    llvm::OwningPtr<llvm::MemoryBuffer> SB;
+    OwningPtr<llvm::MemoryBuffer> 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<ExternalASTSource> Source;
+      OwningPtr<ExternalASTSource> Source;
       Source.reset(ModuleManager);
       getASTContext().setExternalSource(Source);
       if (hasSema())
index 7fd224790788191b91a921a5da172567f6e8dac9..7876bcb24305f1956950b803862bded2291f1784 100644 (file)
@@ -2059,9 +2059,9 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
   bool Success = true;
 
   // Parse the arguments.
-  llvm::OwningPtr<OptTable> Opts(createCC1OptTable());
+  OwningPtr<OptTable> Opts(createCC1OptTable());
   unsigned MissingArgIndex, MissingArgCount;
-  llvm::OwningPtr<InputArgList> Args(
+  OwningPtr<InputArgList> Args(
     Opts->ParseArgs(ArgBegin, ArgEnd,MissingArgIndex, MissingArgCount));
 
   // Check for missing argument error.
index f7a296143fd01c8ac38a511eb784d2abe9a72a49..fec9b6691bb3a9e2342babfc1b0d0b4e9222a560 100644 (file)
@@ -54,7 +54,7 @@ clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList,
   // Don't check that inputs exist, they may have been remapped.
   TheDriver.setCheckInputsExist(false);
 
-  llvm::OwningPtr<driver::Compilation> C(TheDriver.BuildCompilation(Args));
+  OwningPtr<driver::Compilation> 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<const char *> ArgList,
   }
 
   const driver::ArgStringList &CCArgs = Cmd->getArguments();
-  llvm::OwningPtr<CompilerInvocation> CI(new CompilerInvocation());
+  OwningPtr<CompilerInvocation> CI(new CompilerInvocation());
   if (!CompilerInvocation::CreateFromArgs(*CI,
                                      const_cast<const char **>(CCArgs.data()),
                                      const_cast<const char **>(CCArgs.data()) +
index 11ac57247956fe41ad393bff4f03a5c974d8a659..34f445f0628f0890f182b69540d5aa74f1526044 100644 (file)
@@ -144,7 +144,7 @@ ASTConsumer* FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
         ie = FrontendPluginRegistry::end();
         it != ie; ++it) {
       if (it->getName() == CI.getFrontendOpts().AddPluginActions[i]) {
-        llvm::OwningPtr<PluginASTAction> P(it->instantiate());
+        OwningPtr<PluginASTAction> 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<ASTConsumer> Consumer(
+    OwningPtr<ASTConsumer> 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<ExternalASTSource> source;
+      OwningPtr<ExternalASTSource> 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<ExternalASTSource> 
+    OwningPtr<ExternalASTSource> 
       Override(new LayoutOverrideSource(
                      CI.getFrontendOpts().OverrideRecordLayoutsFile));
     CI.getASTContext().setExternalSource(Override);
index 4bf813e1603da0e3711f4db012daeb02b3138583..bdf0b550c75921b6e4741274de4c4480b5490f4a 100644 (file)
@@ -170,7 +170,7 @@ private:
   llvm::BitstreamWriter Stream;
 
   /// \brief The name of the diagnostics file.
-  llvm::OwningPtr<llvm::raw_ostream> OS;
+  OwningPtr<llvm::raw_ostream> OS;
   
   /// \brief The set of constructed record abbreviations.
   AbbreviationMap Abbrevs;
index aef8474b8c7f5a0c3982eb35347ba0bac867cb09..c965692cac6908214c22d34fc79405164bf6ad42 100644 (file)
@@ -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<PluginASTAction> P(it->instantiate());
+        OwningPtr<PluginASTAction> 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<driver::OptTable> Opts(driver::createCC1OptTable());
+    OwningPtr<driver::OptTable> 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<FrontendAction> Act(CreateFrontendAction(*Clang));
+    OwningPtr<FrontendAction> Act(CreateFrontendAction(*Clang));
     if (Act) {
       Success = Clang->ExecuteAction(*Act);
       if (Clang->getFrontendOpts().DisableFree)
index 0cb564c222d5d752ceaf84d2e8192eac169e7b53..9a0b4e985e9067fc3d459ab4e212dea53e220f08 100644 (file)
@@ -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<const llvm::MemoryBuffer> FileBuffer(FM.getBufferForFile(FE));
+  OwningPtr<const llvm::MemoryBuffer> FileBuffer(FM.getBufferForFile(FE));
   if (FileBuffer == 0) return 0;  // Unreadable file?
   const char *FileStart = FileBuffer->getBufferStart();
 
index e0c4cf0c16c8081bfbc192b7da39bea33ff0cccf..f104f9670837fdf15dff72df9d6f8562f0aa3591 100644 (file)
@@ -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<llvm::MemoryBuffer> File;
+  OwningPtr<llvm::MemoryBuffer> 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<PTHFileLookup> FL(PTHFileLookup::Create(FileTable, BufBeg));
+  OwningPtr<PTHFileLookup> 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<PTHStringIdLookup> SL(PTHStringIdLookup::Create(StringIdTable,
+  OwningPtr<PTHStringIdLookup> SL(PTHStringIdLookup::Create(StringIdTable,
                                                                   BufBeg));
 
   // Get the location of the spelling cache.
index a5c345afe290908634b8dcec9a28b4e77c75c98d..b4023983afc9d37751c13d3e4d402dd2a7274842 100644 (file)
@@ -40,7 +40,7 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer,
                      TranslationUnitKind TUKind,
                      CodeCompleteConsumer *CompletionConsumer) {
 
-  llvm::OwningPtr<Sema> S(new Sema(PP, Ctx, *Consumer,
+  OwningPtr<Sema> 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<Parser> ParseOP(new Parser(S.getPreprocessor(), S));
+  OwningPtr<Parser> ParseOP(new Parser(S.getPreprocessor(), S));
   Parser &P = *ParseOP.get();
 
   PrettyStackTraceParserEntry CrashInfo(P);
index aa57813e5982a5888bb86ff561d58944194eb79d..caa7d06ac2e54b2aca4b62c14ae68addf41d611a 100644 (file)
@@ -63,7 +63,7 @@ bool FixItRewriter::WriteFixedFiles(
     int fd;
     std::string Filename = FixItOpts->RewriteFilename(Entry->getName(), fd);
     std::string Err;
-    llvm::OwningPtr<llvm::raw_fd_ostream> OS;
+    OwningPtr<llvm::raw_fd_ostream> OS;
     if (fd != -1) {
       OS.reset(new llvm::raw_fd_ostream(fd, /*shouldClose=*/true));
     } else {
index 49ae4ce1f2cebc7f0a478b80fb6b955e5e28980b..7e7790eea8d7f03822b756004655ba2421c9a5d9 100644 (file)
@@ -112,9 +112,9 @@ bool FixItRecompile::BeginInvocation(CompilerInstance &CI) {
   bool err = false;
   {
     const FrontendOptions &FEOpts = CI.getFrontendOpts();
-    llvm::OwningPtr<FrontendAction> FixAction(new SyntaxOnlyAction());
+    OwningPtr<FrontendAction> FixAction(new SyntaxOnlyAction());
     if (FixAction->BeginSourceFile(CI, FEOpts.Inputs[0])) {
-      llvm::OwningPtr<FixItOptions> FixItOpts;
+      OwningPtr<FixItOptions> FixItOpts;
       if (FEOpts.FixToTemporaries)
         FixItOpts.reset(new FixItRewriteToTemp());
       else
index 610b790d2c15ef10c16f827858ca07dd7a01d8cf..318a71369fac1fba4b34340ef26b823576e14b6a 100644 (file)
@@ -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<IdentifierIterator> Iter(External->getIdentifiers());
+      OwningPtr<IdentifierIterator> Iter(External->getIdentifiers());
       do {
         StringRef Name = Iter->Next();
         if (Name.empty())
index 0bf1da75be4ccf82b371216ab3f9a6bef5d16f5b..39ffbb4aa8d9d5c8c7a0b354f026ff5f85b25599 100644 (file)
@@ -2997,7 +2997,7 @@ std::string ASTReader::getOriginalSourceFile(const std::string &ASTFileName,
                                              DiagnosticsEngine &Diags) {
   // Open the AST file.
   std::string ErrStr;
-  llvm::OwningPtr<llvm::MemoryBuffer> Buffer;
+  OwningPtr<llvm::MemoryBuffer> Buffer;
   Buffer.reset(FileMgr.getBufferForFile(ASTFileName, &ErrStr));
   if (!Buffer) {
     Diags.Report(diag::err_fe_unable_to_read_pch_file) << ErrStr;
index e084a9324e707374e554eecd383f08889144b27e..b2ad18472e0647df2494076bf68a8382e589255e 100644 (file)
@@ -25,7 +25,7 @@ using namespace ento;
 namespace {
 class ArrayBoundChecker : 
     public Checker<check::Location> {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 public:
   void checkLocation(SVal l, bool isLoad, const Stmt* S,
                      CheckerContext &C) const;
index 23a8c449139832414eae6f7369ac777e631f8c79..2d49027dac97bf13e6c52c4a63b38c55b73c2758 100644 (file)
@@ -28,7 +28,7 @@ using namespace ento;
 namespace {
 class ArrayBoundCheckerV2 : 
     public Checker<check::Location> {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
       
   enum OOB_Kind { OOB_Precedes, OOB_Excedes, OOB_Tainted };
   
index 4011024aeeb51cf54c40b8b6bd59187166a168af..e372dbf3cb9dc248f4e6bd84450e6861741ba95e 100644 (file)
@@ -25,7 +25,7 @@ using namespace ento;
 namespace {
 class AttrNonNullChecker
   : public Checker< check::PreStmt<CallExpr> > {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 public:
 
   void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
index bb1c61336a4fcab454d5782eced8372984df2609..615ddbf085b31eff5b2aa9968db49be36777f48c 100644 (file)
@@ -71,7 +71,7 @@ static inline bool isNil(SVal X) {
 
 namespace {
   class NilArgChecker : public Checker<check::PreObjCMessage> {
-    mutable llvm::OwningPtr<APIMisuse> BT;
+    mutable OwningPtr<APIMisuse> 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<CallExpr> > {
-  mutable llvm::OwningPtr<APIMisuse> BT;
+  mutable OwningPtr<APIMisuse> 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<CallExpr> > {
-  mutable llvm::OwningPtr<APIMisuse> BT;
+  mutable OwningPtr<APIMisuse> BT;
   mutable IdentifierInfo *Retain, *Release;
 public:
   CFRetainReleaseChecker(): Retain(0), Release(0) {}
@@ -430,7 +430,7 @@ class ClassReleaseChecker : public Checker<check::PreObjCMessage> {
   mutable Selector retainS;
   mutable Selector autoreleaseS;
   mutable Selector drainS;
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 
 public:
   void checkPreObjCMessage(ObjCMessage msg, CheckerContext &C) const;
@@ -486,7 +486,7 @@ class VariadicMethodTypeChecker : public Checker<check::PreObjCMessage> {
   mutable Selector setWithObjectsS;
   mutable Selector initWithObjectsS;
   mutable Selector initWithObjectsAndKeysS;
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 
   bool isVariadicMessage(const ObjCMessage &msg) const;
 
index a1b7a6caef945d773b03cc10a78353b81a0ce8cd..5ced73a6ddb1c068a46ed068b03b40859288f9ca 100644 (file)
@@ -32,7 +32,7 @@ class CStringChecker : public Checker< eval::Call,
                                          check::DeadSymbols,
                                          check::RegionChanges
                                          > {
-  mutable llvm::OwningPtr<BugType> BT_Null, BT_Bounds,
+  mutable OwningPtr<BugType> BT_Null, BT_Bounds,
                                    BT_Overlap, BT_NotCString,
                                    BT_AdditionOverflow;
   mutable const char *CurrentFunctionDescription;
index 9e312d3307d3f62e2bdcd4ea61b7793a1e06e223..4c7c3883e0662a861fcea0903dc35240aae1fd06 100644 (file)
@@ -28,12 +28,12 @@ using namespace ento;
 namespace {
 class CallAndMessageChecker
   : public Checker< check::PreStmt<CallExpr>, check::PreObjCMessage > {
-  mutable llvm::OwningPtr<BugType> BT_call_null;
-  mutable llvm::OwningPtr<BugType> BT_call_undef;
-  mutable llvm::OwningPtr<BugType> BT_call_arg;
-  mutable llvm::OwningPtr<BugType> BT_msg_undef;
-  mutable llvm::OwningPtr<BugType> BT_msg_arg;
-  mutable llvm::OwningPtr<BugType> BT_msg_ret;
+  mutable OwningPtr<BugType> BT_call_null;
+  mutable OwningPtr<BugType> BT_call_undef;
+  mutable OwningPtr<BugType> BT_call_arg;
+  mutable OwningPtr<BugType> BT_msg_undef;
+  mutable OwningPtr<BugType> BT_msg_arg;
+  mutable OwningPtr<BugType> 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<BugType> &BT);
+                             const char *BT_desc, OwningPtr<BugType> &BT);
   static bool PreVisitProcessArg(CheckerContext &C, SVal V,SourceRange argRange,
-          const Expr *argEx, const char *BT_desc, llvm::OwningPtr<BugType> &BT);
+          const Expr *argEx, const char *BT_desc, OwningPtr<BugType> &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<BugType> &BT) {
+  static void LazyInit_BT(const char *desc, OwningPtr<BugType> &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<BugType> &BT) {
+                                                OwningPtr<BugType> &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<BugType> &BT) {
+                                               OwningPtr<BugType> &BT) {
 
   if (V.isUndef()) {
     if (ExplodedNode *N = C.generateSink()) {
index 603343d28c4adf6b5a3c96e8e37a3607f14521e6..2e184fbaf946ff12d48f2373352df5b5b4d35e44 100644 (file)
@@ -23,7 +23,7 @@ using namespace ento;
 
 namespace {
 class CastSizeChecker : public Checker< check::PreStmt<CastExpr> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 public:
   void checkPreStmt(const CastExpr *CE, CheckerContext &C) const;
 };
index 2a3da7800c5b047fd2007c7ef7c5bd576923d9c0..1407638fcd69d8fff07f4874bff7aadb58591f77 100644 (file)
@@ -24,7 +24,7 @@ using namespace ento;
 
 namespace {
 class CastToStructChecker : public Checker< check::PreStmt<CastExpr> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 
 public:
   void checkPreStmt(const CastExpr *CE, CheckerContext &C) const;
index c8e5e8ff0d1f24b9ab9e5f6e389f3de29c1f3ef6..30d060996ea7a147181ba11f8a3506851655fc76 100644 (file)
@@ -41,7 +41,7 @@ bool isRootChanged(intptr_t k) { return k == ROOT_CHANGED; }
 class ChrootChecker : public Checker<eval::Call, check::PreStmt<CallExpr> > {
   mutable IdentifierInfo *II_chroot, *II_chdir;
   // This bug refers to possibly break out of a chroot() jail.
-  mutable llvm::OwningPtr<BuiltinBug> BT_BreakJail;
+  mutable OwningPtr<BuiltinBug> BT_BreakJail;
 
 public:
   ChrootChecker() : II_chroot(0), II_chdir(0) {}
index 055ab9f31791cc8741520ad14d5815f3a0f82e6e..5a1e8b0a5ad76a71b3160cd1e3d03e62af450f34 100644 (file)
@@ -76,7 +76,7 @@ class DeadStoreObs : public LiveVariables::Observer {
   AnalysisDeclContext* AC;
   ParentMap& Parents;
   llvm::SmallPtrSet<const VarDecl*, 20> Escaped;
-  llvm::OwningPtr<ReachableCode> reachableCode;
+  OwningPtr<ReachableCode> reachableCode;
   const CFGBlock *currentBlock;
 
   enum DeadStoreKind { Standard, Enclosing, DeadIncrement, DeadInit };
index c95df0bf0d57a30d29e3237c86c17999f6db2ba6..ed04f8634150d375f7ce4dd067d97980fbf8236a 100644 (file)
@@ -27,8 +27,8 @@ namespace {
 class DereferenceChecker
     : public Checker< check::Location,
                         EventDispatcher<ImplicitNullDerefEvent> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT_null;
-  mutable llvm::OwningPtr<BuiltinBug> BT_undef;
+  mutable OwningPtr<BuiltinBug> BT_null;
+  mutable OwningPtr<BuiltinBug> BT_undef;
 
 public:
   void checkLocation(SVal location, bool isLoad, const Stmt* S,
index 5f4add1a592bb5f42a6b833b6a80e4621a6e7501..bcc4ad0f266ae2ff0404472f18bef21eefdb02e5 100644 (file)
@@ -24,7 +24,7 @@ using namespace ento;
 
 namespace {
 class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
   void reportBug(const char *Msg,
                  ProgramStateRef StateZero,
                  CheckerContext &C) const ;
index e098a5ee03bb6e7c9eb73d647a21cb9467d6cef0..a1f2f3b2ba984df5c4b00e6b6918981ef33089b5 100644 (file)
@@ -25,7 +25,7 @@ using namespace ento;
 namespace {
 class FixedAddressChecker 
   : public Checker< check::PreStmt<BinaryOperator> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 
 public:
   void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
index 25ffade4cb0f6f75dbf57dc87743d02ef66c59e3..9f3220056dbbf75f456988296c116a1b0671cf24 100644 (file)
@@ -42,7 +42,7 @@ private:
   /// Denotes the return vale.
   static const unsigned ReturnValueIndex = UINT_MAX - 1;
 
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
   inline void initBugType() const {
     if (!BT)
       BT.reset(new BugType("Taint Analysis", "General"));
index e1e8b0b13f52e8dd9ee8ea2fad1b410a33e24955..83eff9d1d4f062496f28ecac6e23c91fdaa19f84 100644 (file)
@@ -30,7 +30,7 @@ class MacOSKeychainAPIChecker : public Checker<check::PreStmt<CallExpr>,
                                                check::PostStmt<CallExpr>,
                                                check::EndPath,
                                                check::DeadSymbols> {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 
 public:
   /// AllocationState is a part of the checker specific state together with the
index 3694585527e377f5fb13c893d64a417824180373..075e937f465260b08b87833b56bd07fd955b24f8 100644 (file)
@@ -31,7 +31,7 @@ using namespace ento;
 
 namespace {
 class MacOSXAPIChecker : public Checker< check::PreStmt<CallExpr> > {
-  mutable llvm::OwningPtr<BugType> BT_dispatchOnce;
+  mutable OwningPtr<BugType> BT_dispatchOnce;
 
 public:
   void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
index 87ccc54c646a100c5a2830a3585c00774b4f28d5..a8bfbcdfff8710110cd5fe75f7187febed6ac055 100644 (file)
@@ -74,11 +74,11 @@ class MallocChecker : public Checker<eval::Call,
                                      check::Bind,
                                      eval::Assume>
 {
-  mutable llvm::OwningPtr<BuiltinBug> BT_DoubleFree;
-  mutable llvm::OwningPtr<BuiltinBug> BT_Leak;
-  mutable llvm::OwningPtr<BuiltinBug> BT_UseFree;
-  mutable llvm::OwningPtr<BuiltinBug> BT_UseRelinquished;
-  mutable llvm::OwningPtr<BuiltinBug> BT_BadFree;
+  mutable OwningPtr<BuiltinBug> BT_DoubleFree;
+  mutable OwningPtr<BuiltinBug> BT_Leak;
+  mutable OwningPtr<BuiltinBug> BT_UseFree;
+  mutable OwningPtr<BuiltinBug> BT_UseRelinquished;
+  mutable OwningPtr<BuiltinBug> BT_BadFree;
   mutable IdentifierInfo *II_malloc, *II_free, *II_realloc, *II_calloc;
 
 public:
index a86f586d1de537b383e3a4f8b9ff49da77b58f6d..1da3bd7de224bfe35661a0db21cbc6d40f5f14ba 100644 (file)
@@ -32,7 +32,7 @@ using namespace ento;
 namespace {
 class NSAutoreleasePoolChecker
   : public Checker<check::PreObjCMessage> {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
   mutable Selector releaseS;
 
 public:
index eac630400da5c5873a80f70f7c33de7b4528767a..96301e7823752a8c4c4fca6b54722672fe75d537 100644 (file)
@@ -28,8 +28,8 @@ using namespace ento;
 namespace {
 class ObjCAtSyncChecker
     : public Checker< check::PreStmt<ObjCAtSynchronizedStmt> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT_null;
-  mutable llvm::OwningPtr<BuiltinBug> BT_undef;
+  mutable OwningPtr<BuiltinBug> BT_null;
+  mutable OwningPtr<BuiltinBug> BT_undef;
 
 public:
   void checkPreStmt(const ObjCAtSynchronizedStmt *S, CheckerContext &C) const;
index 0b16b87be3b4556ebb8a67586ea48873f0f14749..69e8fbb7ab69e17070a21128c666785deb99a9a6 100644 (file)
@@ -31,7 +31,7 @@ using namespace ento;
 namespace {
 class ObjCContainersChecker : public Checker< check::PreStmt<CallExpr>,
                                              check::PostStmt<CallExpr> > {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
   inline void initBugType() const {
     if (!BT)
       BT.reset(new BugType("CFArray API", "Core Foundation/Objective-C"));
index 47a0b61f2651da20503f7c1bc6543b0784fa20ea..fe4845bd889442546165225d251498be8aee3cbe 100644 (file)
@@ -24,7 +24,7 @@ using namespace ento;
 namespace {
 class PointerArithChecker 
   : public Checker< check::PreStmt<BinaryOperator> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 
 public:
   void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
index e6d25fd903317c3e830fb1d3abd80b8e833de4e2..fa5c6a30a68373ce81ff60969c66086466f10a55 100644 (file)
@@ -25,7 +25,7 @@ using namespace ento;
 namespace {
 class PointerSubChecker 
   : public Checker< check::PreStmt<BinaryOperator> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 
 public:
   void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
index 2f276a294c2c4aabba9625ad3acc01197c5efeb5..f6f01b81a25d40099d79609fa7745eb7b16bcaaa 100644 (file)
@@ -26,8 +26,8 @@ using namespace ento;
 
 namespace {
 class PthreadLockChecker : public Checker< check::PostStmt<CallExpr> > {
-  mutable llvm::OwningPtr<BugType> BT_doublelock;
-  mutable llvm::OwningPtr<BugType> BT_lor;
+  mutable OwningPtr<BugType> BT_doublelock;
+  mutable OwningPtr<BugType> BT_lor;
   enum LockingSemantics {
     NotApplicable = 0,
     PthreadSemantics,
index 331cfe93490da56c6ac988035da63b531cdaf2f4..bfd86a3791f5fbdceafe9779d7b03d40db275d46 100644 (file)
@@ -2287,19 +2287,19 @@ class RetainCountChecker
                     check::RegionChanges,
                     eval::Assume,
                     eval::Call > {
-  mutable llvm::OwningPtr<CFRefBug> useAfterRelease, releaseNotOwned;
-  mutable llvm::OwningPtr<CFRefBug> deallocGC, deallocNotOwned;
-  mutable llvm::OwningPtr<CFRefBug> overAutorelease, returnNotOwnedForOwned;
-  mutable llvm::OwningPtr<CFRefBug> leakWithinFunction, leakAtReturn;
-  mutable llvm::OwningPtr<CFRefBug> leakWithinFunctionGC, leakAtReturnGC;
+  mutable OwningPtr<CFRefBug> useAfterRelease, releaseNotOwned;
+  mutable OwningPtr<CFRefBug> deallocGC, deallocNotOwned;
+  mutable OwningPtr<CFRefBug> overAutorelease, returnNotOwnedForOwned;
+  mutable OwningPtr<CFRefBug> leakWithinFunction, leakAtReturn;
+  mutable OwningPtr<CFRefBug> leakWithinFunctionGC, leakAtReturnGC;
 
   typedef llvm::DenseMap<SymbolRef, const SimpleProgramPointTag *> SymbolTagMap;
 
   // This map is only used to ensure proper deletion of any allocated tags.
   mutable SymbolTagMap DeadSymbolTags;
 
-  mutable llvm::OwningPtr<RetainSummaryManager> Summaries;
-  mutable llvm::OwningPtr<RetainSummaryManager> SummariesGC;
+  mutable OwningPtr<RetainSummaryManager> Summaries;
+  mutable OwningPtr<RetainSummaryManager> SummariesGC;
 
   mutable ARCounts::Factory ARCountFactory;
 
index 312bfdfebaad558c68b3c2266935bce2fef6e32a..6e565932d556e56912bfe2c8ea29991feae0be52 100644 (file)
@@ -25,7 +25,7 @@ using namespace ento;
 namespace {
 class ReturnPointerRangeChecker : 
     public Checker< check::PreStmt<ReturnStmt> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 public:
     void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const;
 };
index e1316b56e7840e5dd964a42793a5bf54c31f5b3f..c83d63d00a33881a83b79cab2694daa8b822b171 100644 (file)
@@ -25,7 +25,7 @@ using namespace ento;
 namespace {
 class ReturnUndefChecker : 
     public Checker< check::PreStmt<ReturnStmt> > {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 public:
   void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const;
 };
index 41e5917dd7c199342883cf815f91988e841b441d..3046f967c44cfdc153a3a3369a0ad72ad6452f94 100644 (file)
@@ -26,8 +26,8 @@ using namespace ento;
 namespace {
 class StackAddrEscapeChecker : public Checker< check::PreStmt<ReturnStmt>,
                                                check::EndPath > {
-  mutable llvm::OwningPtr<BuiltinBug> BT_stackleak;
-  mutable llvm::OwningPtr<BuiltinBug> BT_returnstack;
+  mutable OwningPtr<BuiltinBug> BT_stackleak;
+  mutable OwningPtr<BuiltinBug> BT_returnstack;
 
 public:
   void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const;
index f05e9a9d0f7bc68c83ff49093d3f7ef7878b9875..137b8cea98dc0b8b6b35165ea723200b84a3a20f 100644 (file)
@@ -65,7 +65,7 @@ class StreamChecker : public Checker<eval::Call,
                  *II_fwrite, 
                  *II_fseek, *II_ftell, *II_rewind, *II_fgetpos, *II_fsetpos,  
                  *II_clearerr, *II_feof, *II_ferror, *II_fileno;
-  mutable llvm::OwningPtr<BuiltinBug> BT_nullfp, BT_illegalwhence,
+  mutable OwningPtr<BuiltinBug> BT_nullfp, BT_illegalwhence,
                                       BT_doubleclose, BT_ResourceLeak;
 
 public:
index 1eca96424c6ad8c18b33eb70a31e4594e092a806..113368254d67dd6fe6207fc70bfffc1a2914e66b 100644 (file)
@@ -22,7 +22,7 @@ using namespace ento;
 namespace {
 class TaintTesterChecker : public Checker< check::PostStmt<Expr> > {
 
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
   void initBugType() const;
 
   /// Given a pointer argument, get the symbol of the value it contains
index b85bce7c9a905420cb11586ae29910a00a19e9e5..e826a114e7c4ce4d4d7e89ab12095a7d6074fee8 100644 (file)
@@ -24,7 +24,7 @@ using namespace ento;
 namespace {
 
 class UndefBranchChecker : public Checker<check::BranchCondition> {
-  mutable llvm::OwningPtr<BuiltinBug> BT;
+  mutable OwningPtr<BuiltinBug> BT;
 
   struct FindUndefExpr {
     ProgramStateRef St;
index a13e217d5aae468e2e0ff8866296d32a9a74362b..0be5cf1feb99c8ccd4e85f63508ab07acbca4f77 100644 (file)
@@ -26,7 +26,7 @@ using namespace ento;
 namespace {
 class UndefCapturedBlockVarChecker
   : public Checker< check::PostStmt<BlockExpr> > {
- mutable llvm::OwningPtr<BugType> BT;
+ mutable OwningPtr<BugType> BT;
 
 public:
   void checkPostStmt(const BlockExpr *BE, CheckerContext &C) const;
index 7eff6dc1bd040034fa71ed42d13a22bb8437088f..c3cc2b591cbd06655c3a3d8951b91142130bb4d2 100644 (file)
@@ -27,7 +27,7 @@ namespace {
 class UndefResultChecker 
   : public Checker< check::PostStmt<BinaryOperator> > {
 
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
   
 public:
   void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const;
index ee58a043cc0e0fc64b23f367426ad731c628fc0e..9b9e4d5e36d518541d6f0ed0398f85de4b9b5232 100644 (file)
@@ -24,7 +24,7 @@ using namespace ento;
 namespace {
 class UndefinedArraySubscriptChecker
   : public Checker< check::PreStmt<ArraySubscriptExpr> > {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 
 public:
   void checkPreStmt(const ArraySubscriptExpr *A, CheckerContext &C) const;
index 699563394b1e9401fe678f3d7300515a06552dbc..840ae3d2ad50ad200d523c8d86476bb5ae5217a2 100644 (file)
@@ -24,7 +24,7 @@ using namespace ento;
 namespace {
 class UndefinedAssignmentChecker
   : public Checker<check::Bind> {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
 
 public:
   void checkBind(SVal location, SVal val, const Stmt *S,
index f188d2d7d9309aafc0da81cfccc450844aeed0c7..c4f77290f94793ec914dcbf7e31ecd35600efc34 100644 (file)
@@ -30,7 +30,7 @@ using llvm::Optional;
 
 namespace {
 class UnixAPIChecker : public Checker< check::PreStmt<CallExpr> > {
-  mutable llvm::OwningPtr<BugType> BT_open, BT_pthreadOnce, BT_mallocZero;
+  mutable OwningPtr<BugType> BT_open, BT_pthreadOnce, BT_mallocZero;
   mutable Optional<uint64_t> Val_O_CREAT;
 
 public:
@@ -63,7 +63,7 @@ private:
 // Utility functions.
 //===----------------------------------------------------------------------===//
 
-static inline void LazyInitialize(llvm::OwningPtr<BugType> &BT,
+static inline void LazyInitialize(OwningPtr<BugType> &BT,
                                   const char *name) {
   if (BT)
     return;
index 7c3ee6d669de179f3d3e9fb188ebda7ae65e9216..d5276aa0987c6829c6dc13b5b9ccf713fc02d991 100644 (file)
@@ -28,7 +28,7 @@ using namespace ento;
 
 namespace {
 class VLASizeChecker : public Checker< check::PreStmt<DeclStmt> > {
-  mutable llvm::OwningPtr<BugType> BT;
+  mutable OwningPtr<BugType> BT;
   enum VLASize_Kind { VLA_Garbage, VLA_Zero, VLA_Tainted };
 
   void reportBug(VLASize_Kind Kind,
index 2c96af5efd69221bf3c5b1a22b2d142d9d1c483c..4eebdb7f8ddd7e4b6cfc607fa8cad89049ef2da9 100644 (file)
@@ -133,7 +133,7 @@ public:
 class PathDiagnosticBuilder : public BugReporterContext {
   BugReport *R;
   PathDiagnosticConsumer *PDC;
-  llvm::OwningPtr<ParentMap> PM;
+  OwningPtr<ParentMap> 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<ExplodedGraph> AutoReleaseGTrim(GTrim);
-  llvm::OwningPtr<InterExplodedGraphMap> AutoReleaseNMap(NMap);
+  OwningPtr<ExplodedGraph> AutoReleaseGTrim(GTrim);
+  OwningPtr<InterExplodedGraphMap> 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<ExplodedGraph> ReportGraph(GPair.first.first);
-  llvm::OwningPtr<NodeBackMap> BackMap(GPair.first.second);
+  OwningPtr<ExplodedGraph> ReportGraph(GPair.first.first);
+  OwningPtr<NodeBackMap> 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<PathDiagnostic>
+  OwningPtr<PathDiagnostic>
     D(new PathDiagnostic(exampleReport->getBugType().getName(),
                          !PD || PD->useVerboseDescription()
                          ? exampleReport->getDescription() 
index 4752f28b69663e43e6621ae0ac918d82ab1de1b3..8868d95c1bbf3d855e7bfd8898206763a38ad8c0 100644 (file)
@@ -300,7 +300,7 @@ ExplodedGraph::Trim(const NodeTy* const* NBeg, const NodeTy* const* NEnd,
 
   assert (NBeg < NEnd);
 
-  llvm::OwningPtr<InterExplodedGraphMap> M(new InterExplodedGraphMap());
+  OwningPtr<InterExplodedGraphMap> M(new InterExplodedGraphMap());
 
   ExplodedGraph* G = TrimInternal(NBeg, NEnd, M.get(), InverseMap);
 
index 18eed8a0f997a7895879976c6c4836d15233c6ed..cc8c315c4e34ac40a183909df0e49f59d4ca63ef 100644 (file)
@@ -30,7 +30,7 @@ namespace {
   class PlistDiagnostics : public PathDiagnosticConsumer {
     const std::string OutputFile;
     const LangOptions &LangOpts;
-    llvm::OwningPtr<PathDiagnosticConsumer> SubPD;
+    OwningPtr<PathDiagnosticConsumer> SubPD;
     bool flushed;
   public:
     PlistDiagnostics(const std::string& prefix, const LangOptions &LangOpts,
index 6394577a55bc10e3d4885808fcf7f0e479b9cabd..b9130a754ceef5b3dcafd0e1fdca04ba47d13a26 100644 (file)
@@ -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<RegionStoreSubRegionMap>
+  OwningPtr<RegionStoreSubRegionMap>
     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<RegionStoreSubRegionMap>
+  OwningPtr<RegionStoreSubRegionMap>
     SubRegions(getRegionStoreSubRegionMap(store));
 
   // B and DVM are updated after the call to RemoveSubRegionBindings.
index ba64d98b98889789dd42e24d498d713d1b99de28..6e658f9a4dad73eb158878a4762c66434d4e666d 100644 (file)
@@ -74,8 +74,8 @@ public:
   StoreManagerCreator CreateStoreMgr;
   ConstraintManagerCreator CreateConstraintMgr;
 
-  llvm::OwningPtr<CheckerManager> checkerMgr;
-  llvm::OwningPtr<AnalysisManager> Mgr;
+  OwningPtr<CheckerManager> checkerMgr;
+  OwningPtr<AnalysisManager> 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<ExplodedNode::Auditor> Auditor;
+  OwningPtr<ExplodedNode::Auditor> 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<raw_ostream> Out;
+  OwningPtr<raw_ostream> Out;
   llvm::sys::Path Dir, Filename;
   unsigned Cntr;
 
@@ -411,7 +411,7 @@ static ExplodedNode::Auditor* CreateUbiViz() {
 
   llvm::errs() << "Writing '" << Filename.str() << "'.\n";
 
-  llvm::OwningPtr<llvm::raw_fd_ostream> Stream;
+  OwningPtr<llvm::raw_fd_ostream> Stream;
   Stream.reset(new llvm::raw_fd_ostream(Filename.c_str(), ErrMsg));
 
   if (!ErrMsg.empty())
index a59fcad6f819aba0df3f71fff5fc755dd4603260..c06da0d9e4b0263551aacb30de9935dcb1825850 100644 (file)
@@ -104,7 +104,7 @@ CheckerManager *ento::createCheckerManager(const AnalyzerOptions &opts,
                                            const LangOptions &langOpts,
                                            ArrayRef<std::string> plugins,
                                            DiagnosticsEngine &diags) {
-  llvm::OwningPtr<CheckerManager> checkerMgr(new CheckerManager(langOpts));
+  OwningPtr<CheckerManager> checkerMgr(new CheckerManager(langOpts));
 
   SmallVector<CheckerOptInfo, 8> checkerOpts;
   for (unsigned i = 0, e = opts.CheckersControlList.size(); i != e; ++i) {