diff options
Diffstat (limited to 'include/clang')
60 files changed, 177 insertions, 187 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index 29ec1a2686..aad2fb8577 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -88,7 +88,7 @@ public: virtual bool isLateParsed() const { return false; } // Pretty print this attribute. - virtual void printPretty(llvm::raw_ostream &OS, + virtual void printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const = 0; }; diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h index 3fa61ae2c7..83fa8be0ee 100644 --- a/include/clang/AST/Comment.h +++ b/include/clang/AST/Comment.h @@ -172,7 +172,7 @@ public: LLVM_ATTRIBUTE_USED void dump() const; LLVM_ATTRIBUTE_USED void dump(const ASTContext &Context) const; - void dump(llvm::raw_ostream &OS, const CommandTraits *Traits, + void dump(raw_ostream &OS, const CommandTraits *Traits, const SourceManager *SM) const; SourceRange getSourceRange() const LLVM_READONLY { return Range; } @@ -282,14 +282,14 @@ public: protected: /// Command arguments. - llvm::ArrayRef<Argument> Args; + ArrayRef<Argument> Args; public: InlineCommandComment(SourceLocation LocBegin, SourceLocation LocEnd, unsigned CommandID, RenderKind RK, - llvm::ArrayRef<Argument> Args) : + ArrayRef<Argument> Args) : InlineContentComment(InlineCommandCommentKind, LocBegin, LocEnd), Args(Args) { InlineCommandCommentBits.RenderKind = RK; @@ -504,10 +504,10 @@ public: /// A single paragraph that contains inline content. class ParagraphComment : public BlockContentComment { - llvm::ArrayRef<InlineContentComment *> Content; + ArrayRef<InlineContentComment *> Content; public: - ParagraphComment(llvm::ArrayRef<InlineContentComment *> Content) : + ParagraphComment(ArrayRef<InlineContentComment *> Content) : BlockContentComment(ParagraphCommentKind, SourceLocation(), SourceLocation()), @@ -565,7 +565,7 @@ public: protected: /// Word-like arguments. - llvm::ArrayRef<Argument> Args; + ArrayRef<Argument> Args; /// Paragraph argument. ParagraphComment *Paragraph; @@ -633,7 +633,7 @@ public: return Args[Idx].Range; } - void setArgs(llvm::ArrayRef<Argument> A) { + void setArgs(ArrayRef<Argument> A) { Args = A; if (Args.size() > 0) { SourceLocation NewLocEnd = Args.back().Range.getEnd(); @@ -746,7 +746,7 @@ private: /// For C: Position = { 0 } /// For TT: Position = { 1 } /// For T: Position = { 1, 0 } - llvm::ArrayRef<unsigned> Position; + ArrayRef<unsigned> Position; public: TParamCommandComment(SourceLocation LocBegin, @@ -826,7 +826,7 @@ class VerbatimBlockComment : public BlockCommandComment { protected: StringRef CloseName; SourceLocation CloseNameLocBegin; - llvm::ArrayRef<VerbatimBlockLineComment *> Lines; + ArrayRef<VerbatimBlockLineComment *> Lines; public: VerbatimBlockComment(SourceLocation LocBegin, @@ -853,7 +853,7 @@ public: CloseNameLocBegin = LocBegin; } - void setLines(llvm::ArrayRef<VerbatimBlockLineComment *> L) { + void setLines(ArrayRef<VerbatimBlockLineComment *> L) { Lines = L; } @@ -1021,11 +1021,11 @@ struct DeclInfo { /// A full comment attached to a declaration, contains block content. class FullComment : public Comment { - llvm::ArrayRef<BlockContentComment *> Blocks; + ArrayRef<BlockContentComment *> Blocks; DeclInfo *ThisDeclInfo; public: - FullComment(llvm::ArrayRef<BlockContentComment *> Blocks, DeclInfo *D) : + FullComment(ArrayRef<BlockContentComment *> Blocks, DeclInfo *D) : Comment(FullCommentKind, SourceLocation(), SourceLocation()), Blocks(Blocks), ThisDeclInfo(D) { if (Blocks.empty()) @@ -1062,7 +1062,7 @@ public: return ThisDeclInfo; } - llvm::ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; } + ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; } }; } // end namespace comments diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index da12a5f591..bb0794ed04 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1093,8 +1093,7 @@ public: /// not a constant expression. Returns a pointer to the value if evaluation /// succeeded, 0 otherwise. APValue *evaluateValue() const; - APValue *evaluateValue( - llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const; + APValue *evaluateValue(SmallVectorImpl<PartialDiagnosticAt> &Notes) const; /// \brief Return the already-evaluated value of this variable's /// initializer, or NULL if the value is not yet known. Returns pointer @@ -1457,7 +1456,7 @@ private: /// DeclsInPrototypeScope - Array of pointers to NamedDecls for /// decls defined in the function prototype that are not parameters. E.g. /// 'enum Y' in 'void f(enum Y {AA} x) {}'. - llvm::ArrayRef<NamedDecl*> DeclsInPrototypeScope; + ArrayRef<NamedDecl *> DeclsInPrototypeScope; LazyDeclStmtPtr Body; @@ -1548,7 +1547,7 @@ private: void setInstantiationOfMemberFunction(ASTContext &C, FunctionDecl *FD, TemplateSpecializationKind TSK); - void setParams(ASTContext &C, llvm::ArrayRef<ParmVarDecl *> NewParamInfo); + void setParams(ASTContext &C, ArrayRef<ParmVarDecl *> NewParamInfo); protected: FunctionDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc, @@ -1835,14 +1834,14 @@ public: assert(i < getNumParams() && "Illegal param #"); return ParamInfo[i]; } - void setParams(llvm::ArrayRef<ParmVarDecl *> NewParamInfo) { + void setParams(ArrayRef<ParmVarDecl *> NewParamInfo) { setParams(getASTContext(), NewParamInfo); } - const llvm::ArrayRef<NamedDecl*> &getDeclsInPrototypeScope() const { + const ArrayRef<NamedDecl *> &getDeclsInPrototypeScope() const { return DeclsInPrototypeScope; } - void setDeclsInPrototypeScope(llvm::ArrayRef<NamedDecl *> NewDecls); + void setDeclsInPrototypeScope(ArrayRef<NamedDecl *> NewDecls); /// getMinRequiredArguments - Returns the minimum number of arguments /// needed to call this function. This may be fewer than the number of @@ -3182,7 +3181,7 @@ public: assert(i < getNumParams() && "Illegal param #"); return ParamInfo[i]; } - void setParams(llvm::ArrayRef<ParmVarDecl *> NewParamInfo); + void setParams(ArrayRef<ParmVarDecl *> NewParamInfo); /// hasCaptures - True if this block (or its nested blocks) captures /// anything of local storage from its enclosing scopes. @@ -3323,7 +3322,7 @@ void Redeclarable<decl_type>::setPreviousDeclaration(decl_type *PrevDecl) { First = PrevDecl->getFirstDeclaration(); assert(First->RedeclLink.NextIsLatest() && "Expected first"); decl_type *MostRecent = First->RedeclLink.getNext(); - RedeclLink = PreviousDeclLink(llvm::cast<decl_type>(MostRecent)); + RedeclLink = PreviousDeclLink(cast<decl_type>(MostRecent)); } else { // Make this first. First = static_cast<decl_type*>(this); diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 115edf6d92..bf588d77d6 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -904,7 +904,7 @@ public: typedef llvm::MutableArrayRef<NamedDecl*> DeclContextLookupResult; -typedef llvm::ArrayRef<NamedDecl*> DeclContextLookupConstResult; +typedef ArrayRef<NamedDecl *> DeclContextLookupConstResult; /// DeclContext - This is used only as base class of specific decl types that /// can act as declaration contexts. These decls are (only the top classes @@ -1151,7 +1151,7 @@ public: /// contexts that are semanticaly connected to this declaration context, /// in source order, including this context (which may be the only result, /// for non-namespace contexts). - void collectAllContexts(llvm::SmallVectorImpl<DeclContext *> &Contexts); + void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts); /// decl_iterator - Iterates through the declarations stored /// within this context. @@ -1414,7 +1414,7 @@ public: /// usual relationship between a DeclContext and the external source. /// See the ASTImporter for the (few, but important) use cases. void localUncachedLookup(DeclarationName Name, - llvm::SmallVectorImpl<NamedDecl *> &Results); + SmallVectorImpl<NamedDecl *> &Results); /// @brief Makes a declaration visible within this context. /// diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 8620116662..2db4910ccd 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -1205,7 +1205,7 @@ public: unsigned P, IdentifierInfo *Id, TemplateParameterList *Params, - llvm::ArrayRef<TemplateParameterList*> Expansions); + ArrayRef<TemplateParameterList *> Expansions); static TemplateTemplateParmDecl *CreateDeserialized(ASTContext &C, unsigned ID); diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 44c6cb0570..10bb353101 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -490,7 +490,7 @@ public: /// constexpr. Return false if the function can never produce a constant /// expression, along with diagnostics describing why not. static bool isPotentialConstantExpr(const FunctionDecl *FD, - llvm::SmallVectorImpl< + SmallVectorImpl< PartialDiagnosticAt> &Diags); /// isConstantInitializer - Returns true if this expression can be emitted to @@ -510,7 +510,7 @@ public: /// foldable. If the expression is foldable, but not a constant expression, /// the notes will describes why it isn't a constant expression. If the /// expression *is* a constant expression, no notes will be produced. - llvm::SmallVectorImpl<PartialDiagnosticAt> *Diag; + SmallVectorImpl<PartialDiagnosticAt> *Diag; EvalStatus() : HasSideEffects(false), Diag(0) {} @@ -569,7 +569,7 @@ public: /// integer. This must be called on an expression that constant folds to an /// integer. llvm::APSInt EvaluateKnownConstInt(const ASTContext &Ctx, - llvm::SmallVectorImpl<PartialDiagnosticAt> *Diag=0) const; + SmallVectorImpl<PartialDiagnosticAt> *Diag=0) const; /// EvaluateAsLValue - Evaluate an expression to see if we can fold it to an /// lvalue with link time known address, with no side-effects. @@ -581,7 +581,7 @@ public: /// notes will be produced if the expression is not a constant expression. bool EvaluateAsInitializer(APValue &Result, const ASTContext &Ctx, const VarDecl *VD, - llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const; + SmallVectorImpl<PartialDiagnosticAt> &Notes) const; /// \brief Enumeration used to describe the kind of Null pointer constant /// returned from \c isNullPointerConstant(). @@ -729,7 +729,7 @@ public: return const_cast<Expr*>(this)->IgnoreParenNoopCasts(Ctx); } - static bool hasAnyTypeDependentArguments(llvm::ArrayRef<Expr *> Exprs); + static bool hasAnyTypeDependentArguments(ArrayRef<Expr *> Exprs); /// \brief For an expression of class type or pointer to class type, /// return the most derived class decl the expression is known to refer to. diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index d6d61e27db..b896680d30 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -3631,7 +3631,7 @@ public: static FunctionParmPackExpr *Create(ASTContext &Context, QualType T, ParmVarDecl *ParamPack, SourceLocation NameLoc, - llvm::ArrayRef<Decl*> Params); + ArrayRef<Decl *> Params); static FunctionParmPackExpr *CreateEmpty(ASTContext &Context, unsigned NumParams); diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h index 2037faf096..798b0423cb 100644 --- a/include/clang/AST/ExprObjC.h +++ b/include/clang/AST/ExprObjC.h @@ -135,7 +135,7 @@ class ObjCArrayLiteral : public Expr { SourceRange Range; ObjCMethodDecl *ArrayWithObjectsMethod; - ObjCArrayLiteral(llvm::ArrayRef<Expr *> Elements, + ObjCArrayLiteral(ArrayRef<Expr *> Elements, QualType T, ObjCMethodDecl * Method, SourceRange SR); @@ -144,7 +144,7 @@ class ObjCArrayLiteral : public Expr { public: static ObjCArrayLiteral *Create(ASTContext &C, - llvm::ArrayRef<Expr *> Elements, + ArrayRef<Expr *> Elements, QualType T, ObjCMethodDecl * Method, SourceRange SR); diff --git a/include/clang/AST/LambdaMangleContext.h b/include/clang/AST/LambdaMangleContext.h index d686365335..bbaee26494 100644 --- a/include/clang/AST/LambdaMangleContext.h +++ b/include/clang/AST/LambdaMangleContext.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_LAMBDAMANGLECONTEXT_H #define LLVM_CLANG_LAMBDAMANGLECONTEXT_H +#include "clang/Basic/LLVM.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" @@ -24,7 +25,7 @@ class FunctionProtoType; /// \brief Keeps track of the mangled names of lambda expressions within a /// particular context. -class LambdaMangleContext : public llvm::RefCountedBase<LambdaMangleContext> { +class LambdaMangleContext : public RefCountedBase<LambdaMangleContext> { llvm::DenseMap<const FunctionProtoType *, unsigned> ManglingNumbers; public: diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index e475c3859c..e1073627bc 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -1773,7 +1773,7 @@ public: } CompoundStmt *getBlock() const { - return llvm::cast<CompoundStmt>(Children[BLOCK]); + return cast<CompoundStmt>(Children[BLOCK]); } child_range children() { @@ -1808,7 +1808,7 @@ public: SourceLocation getFinallyLoc() const { return Loc; } SourceLocation getEndLoc() const { return Block->getLocEnd(); } - CompoundStmt *getBlock() const { return llvm::cast<CompoundStmt>(Block); } + CompoundStmt *getBlock() const { return cast<CompoundStmt>(Block); } child_range children() { return child_range(&Block,&Block+1); @@ -1852,7 +1852,7 @@ public: bool getIsCXXTry() const { return IsCXXTry; } CompoundStmt* getTryBlock() const { - return llvm::cast<CompoundStmt>(Children[TRY]); + return cast<CompoundStmt>(Children[TRY]); } Stmt *getHandler() const { return Children[HANDLER]; } diff --git a/include/clang/AST/StmtCXX.h b/include/clang/AST/StmtCXX.h index 34b45625dc..0112befb29 100644 --- a/include/clang/AST/StmtCXX.h +++ b/include/clang/AST/StmtCXX.h @@ -94,18 +94,18 @@ public: } CompoundStmt *getTryBlock() { - return llvm::cast<CompoundStmt>(getStmts()[0]); + return cast<CompoundStmt>(getStmts()[0]); } const CompoundStmt *getTryBlock() const { - return llvm::cast<CompoundStmt>(getStmts()[0]); + return cast<CompoundStmt>(getStmts()[0]); } unsigned getNumHandlers() const { return NumHandlers; } CXXCatchStmt *getHandler(unsigned i) { - return llvm::cast<CXXCatchStmt>(getStmts()[i + 1]); + return cast<CXXCatchStmt>(getStmts()[i + 1]); } const CXXCatchStmt *getHandler(unsigned i) const { - return llvm::cast<CXXCatchStmt>(getStmts()[i + 1]); + return cast<CXXCatchStmt>(getStmts()[i + 1]); } static bool classof(const Stmt *T) { diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index f9b072f503..ffffe52c2c 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -1228,8 +1228,8 @@ inline internal::Matcher<Stmt> sizeOfExpr( AST_MATCHER_P(NamedDecl, hasName, std::string, Name) { assert(!Name.empty()); const std::string FullNameString = "::" + Node.getQualifiedNameAsString(); - const llvm::StringRef FullName = FullNameString; - const llvm::StringRef Pattern = Name; + const StringRef FullName = FullNameString; + const StringRef Pattern = Name; if (Pattern.startswith("::")) { return FullName == Pattern; } else { @@ -1705,8 +1705,7 @@ AST_MATCHER_P(DeclRefExpr, to, internal::Matcher<Decl>, AST_MATCHER_P(DeclRefExpr, throughUsingDecl, internal::Matcher<UsingShadowDecl>, InnerMatcher) { const NamedDecl *FoundDecl = Node.getFoundDecl(); - if (const UsingShadowDecl *UsingDecl = - llvm::dyn_cast<UsingShadowDecl>(FoundDecl)) + if (const UsingShadowDecl *UsingDecl = dyn_cast<UsingShadowDecl>(FoundDecl)) return InnerMatcher.matches(*UsingDecl, Finder, Builder); return false; } diff --git a/include/clang/ASTMatchers/ASTMatchersInternal.h b/include/clang/ASTMatchers/ASTMatchersInternal.h index d77cccd82f..ac0e30e750 100644 --- a/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -193,7 +193,7 @@ class ASTMatchFinder; /// current node and doesn't care about its children or descendants, /// implement SingleNodeMatcherInterface instead. template <typename T> -class MatcherInterface : public llvm::RefCountedBaseVPTR { +class MatcherInterface : public RefCountedBaseVPTR { public: virtual ~MatcherInterface() {} @@ -343,7 +343,7 @@ private: const Matcher<Base> From; }; - llvm::IntrusiveRefCntPtr< MatcherInterface<T> > Implementation; + IntrusiveRefCntPtr< MatcherInterface<T> > Implementation; }; // class Matcher /// \brief A convenient helper for creating a Matcher<T> without specifying @@ -676,7 +676,7 @@ public: virtual bool matches(const T &Node, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder) const { - const To *InnerMatchValue = llvm::dyn_cast<To>(&Node); + const To *InnerMatchValue = dyn_cast<To>(&Node); return InnerMatchValue != NULL && InnerMatcher.matches(*InnerMatchValue, Finder, Builder); } diff --git a/include/clang/Analysis/Analyses/ThreadSafety.h b/include/clang/Analysis/Analyses/ThreadSafety.h index f7f12d4820..1ca434ea0b 100644 --- a/include/clang/Analysis/Analyses/ThreadSafety.h +++ b/include/clang/Analysis/Analyses/ThreadSafety.h @@ -67,7 +67,7 @@ enum LockErrorKind { /// Handler class for thread safety warnings. class ThreadSafetyHandler { public: - typedef llvm::StringRef Name; + typedef StringRef Name; ThreadSafetyHandler() : IssueBetaWarnings(false) { } virtual ~ThreadSafetyHandler(); diff --git a/include/clang/Analysis/Analyses/UninitializedValues.h b/include/clang/Analysis/Analyses/UninitializedValues.h index 663628b765..e8810c32a1 100644 --- a/include/clang/Analysis/Analyses/UninitializedValues.h +++ b/include/clang/Analysis/Analyses/UninitializedValues.h @@ -43,7 +43,7 @@ private: /// This use is always uninitialized if it occurs after any of these branches /// is taken. - llvm::SmallVector<Branch, 2> UninitBranches; + SmallVector<Branch, 2> UninitBranches; public: UninitUse(const Expr *User, bool AlwaysUninit) : @@ -72,7 +72,7 @@ public: !branch_empty() ? Sometimes : Maybe; } - typedef llvm::SmallVectorImpl<Branch>::const_iterator branch_iterator; + typedef SmallVectorImpl<Branch>::const_iterator branch_iterator; /// Branches which inevitably result in the variable being used uninitialized. branch_iterator branch_begin() const { return UninitBranches.begin(); } branch_iterator branch_end() const { return UninitBranches.end(); } diff --git a/include/clang/Analysis/CallGraph.h b/include/clang/Analysis/CallGraph.h index 998076d1e1..5015eb6149 100644 --- a/include/clang/Analysis/CallGraph.h +++ b/include/clang/Analysis/CallGraph.h @@ -139,13 +139,13 @@ private: Decl *FD; /// \brief The list of functions called from this node. - llvm::SmallVector<CallRecord, 5> CalledFunctions; + SmallVector<CallRecord, 5> CalledFunctions; public: CallGraphNode(Decl *D) : FD(D) {} - typedef llvm::SmallVector<CallRecord, 5>::iterator iterator; - typedef llvm::SmallVector<CallRecord, 5>::const_iterator const_iterator; + typedef SmallVector<CallRecord, 5>::iterator iterator; + typedef SmallVector<CallRecord, 5>::const_iterator const_iterator; /// Iterators through all the callees/children of the node. inline iterator begin() { return CalledFunctions.begin(); } diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 2a2b7044e4..322f0cb523 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -218,7 +218,7 @@ public: const Stmt *getStmt() const { return (const Stmt*) getData1(); } template <typename T> - const T* getStmtAs() const { return llvm::dyn_cast<T>(getStmt()); } + const T* getStmtAs() const { return dyn_cast<T>(getStmt()); } static bool classof(const ProgramPoint* Location) { unsigned k = Location->getKind(); diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h index 5cbfa7a2fa..c030254bf8 100644 --- a/include/clang/Basic/DiagnosticIDs.h +++ b/include/clang/Basic/DiagnosticIDs.h @@ -19,10 +19,6 @@ #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" -namespace llvm { - template<typename T, unsigned> class SmallVector; -} - namespace clang { class DiagnosticsEngine; class SourceLocation; @@ -231,10 +227,10 @@ public: /// \param Diags [out] - On return, the diagnostics in the group. /// \returns True if the given group is unknown, false otherwise. bool getDiagnosticsInGroup(StringRef Group, - llvm::SmallVectorImpl<diag::kind> &Diags) const; + SmallVectorImpl<diag::kind> &Diags) const; /// \brief Get the set of all diagnostic IDs. - void getAllDiagnostics(llvm::SmallVectorImpl<diag::kind> &Diags) const; + void getAllDiagnostics(SmallVectorImpl<diag::kind> &Diags) const; /// \brief Get the warning option with the closest edit distance to the given /// group name. @@ -245,7 +241,7 @@ private: /// /// \param Diags [out] - On return, the diagnostics in the group. void getDiagnosticsInGroup(const WarningOption *Group, - llvm::SmallVectorImpl<diag::kind> &Diags) const; + SmallVectorImpl<diag::kind> &Diags) const; /// \brief Based on the way the client configured the DiagnosticsEngine /// object, classify the specified diagnostic ID into a Level, consumable by diff --git a/include/clang/Basic/DiagnosticOptions.h b/include/clang/Basic/DiagnosticOptions.h index 2113047495..2b80e9b9ea 100644 --- a/include/clang/Basic/DiagnosticOptions.h +++ b/include/clang/Basic/DiagnosticOptions.h @@ -10,6 +10,7 @@ #ifndef LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H #define LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H +#include "clang/Basic/LLVM.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include <string> #include <vector> @@ -25,7 +26,7 @@ enum OverloadsShown { /// DiagnosticOptions - Options for controlling the compiler diagnostics /// engine. -class DiagnosticOptions : public llvm::RefCountedBase<DiagnosticOptions>{ +class DiagnosticOptions : public RefCountedBase<DiagnosticOptions>{ public: enum TextDiagnosticFormat { Clang, Msvc, Vi }; diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h index d0ef8e426c..b638068e74 100644 --- a/include/clang/Basic/Module.h +++ b/include/clang/Basic/Module.h @@ -38,8 +38,7 @@ class LangOptions; class TargetInfo; /// \brief Describes the name of a module. -typedef llvm::SmallVector<std::pair<std::string, SourceLocation>, 2> - ModuleId; +typedef SmallVector<std::pair<std::string, SourceLocation>, 2> ModuleId; /// \brief Describes a module or submodule. class Module { @@ -71,10 +70,10 @@ private: public: /// \brief The headers that are part of this module. - llvm::SmallVector<const FileEntry *, 2> Headers; + SmallVector<const FileEntry *, 2> Headers; /// \brief The headers that are explicitly excluded from this module. - llvm::SmallVector<const FileEntry *, 2> ExcludedHeaders; + SmallVector<const FileEntry *, 2> ExcludedHeaders; /// \brief The top-level headers associated with this module. llvm::SmallSetVector<const FileEntry *, 2> TopHeaders; @@ -84,7 +83,7 @@ public: /// If any of these features is not present, the \c IsAvailable bit /// will be false to indicate that this (sub)module is not /// available. - llvm::SmallVector<std::string, 2> Requires; + SmallVector<std::string, 2> Requires; /// \brief Whether this module is available in the current /// translation unit. @@ -137,7 +136,7 @@ public: /// \brief The set of modules imported by this module, and on which this /// module depends. - llvm::SmallVector<Module *, 2> Imports; + SmallVector<Module *, 2> Imports; /// \brief Describes an exported module. /// @@ -146,7 +145,7 @@ public: typedef llvm::PointerIntPair<Module *, 1, bool> ExportDecl; /// \brief The set of export declarations. - llvm::SmallVector<ExportDecl, 2> Exports; + SmallVector<ExportDecl, 2> Exports; /// \brief Describes an exported module that has not yet been resolved /// (perhaps because the module it refers to has not yet been loaded). @@ -164,7 +163,7 @@ public: }; /// \brief The set of export declarations that have yet to be resolved. - llvm::SmallVector<UnresolvedExportDecl, 2> UnresolvedExports; + SmallVector<UnresolvedExportDecl, 2> UnresolvedExports; /// \brief Construct a top-level module. explicit Module(StringRef Name, SourceLocation DefinitionLoc, @@ -299,7 +298,7 @@ public: /// \brief Print the module map for this module to the given stream. /// - void print(llvm::raw_ostream &OS, unsigned Indent = 0) const; + void print(raw_ostream &OS, unsigned Indent = 0) const; /// \brief Dump the contents of this module to the given output stream. void dump() const; diff --git a/include/clang/Basic/PartialDiagnostic.h b/include/clang/Basic/PartialDiagnostic.h index 0ac42961d3..3f68160f69 100644 --- a/include/clang/Basic/PartialDiagnostic.h +++ b/include/clang/Basic/PartialDiagnostic.h @@ -321,7 +321,7 @@ public: } void EmitToString(DiagnosticsEngine &Diags, - llvm::SmallVectorImpl<char> &Buf) const { + SmallVectorImpl<char> &Buf) const { // FIXME: It should be possible to render a diagnostic to a string without // messing with the state of the diagnostics engine. DiagnosticBuilder DB(Diags.Report(getDiagID())); diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 6aa5347231..ec8f533dc1 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -522,7 +522,7 @@ public: /// \brief The stack used when building modules on demand, which is used /// to provide a link between the source managers of the different compiler /// instances. -typedef llvm::ArrayRef<std::pair<std::string, FullSourceLoc> > ModuleBuildStack; +typedef ArrayRef<std::pair<std::string, FullSourceLoc> > ModuleBuildStack; /// \brief This class handles loading and caching of source files into memory. /// diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 328ffd9601..463c2ea691 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -62,7 +62,7 @@ enum TargetCXXABI { /// \brief Exposes information about the current target. /// class TargetInfo : public RefCountedBase<TargetInfo> { - llvm::IntrusiveRefCntPtr<TargetOptions> TargetOpts; + IntrusiveRefCntPtr<TargetOptions> TargetOpts; llvm::Triple Triple; protected: // Target values set by the ctor of the actual target implementation. Default diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 8b4e5e1bd6..ae858d34bb 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -11,6 +11,7 @@ #define CLANG_DRIVER_DRIVER_H_ #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/LLVM.h" #include "clang/Driver/Phases.h" #include "clang/Driver/Types.h" #include "clang/Driver/Util.h" @@ -23,9 +24,6 @@ #include <set> #include <string> -namespace llvm { - template<typename T> class ArrayRef; -} namespace clang { namespace driver { class Action; diff --git a/include/clang/Frontend/LayoutOverrideSource.h b/include/clang/Frontend/LayoutOverrideSource.h index 225efe690b..ec34e14765 100644 --- a/include/clang/Frontend/LayoutOverrideSource.h +++ b/include/clang/Frontend/LayoutOverrideSource.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_LAYOUTOVERRIDESOURCE_H #include "clang/AST/ExternalASTSource.h" +#include "clang/Basic/LLVM.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" @@ -31,7 +32,7 @@ namespace clang { uint64_t Align; /// \brief The offsets of the fields, in source order. - llvm::SmallVector<uint64_t, 8> FieldOffsets; + SmallVector<uint64_t, 8> FieldOffsets; }; /// \brief The set of layouts that will be overridden. @@ -42,7 +43,7 @@ namespace clang { /// set of record types. /// /// The file is the result of passing -fdump-record-layouts to a file. - explicit LayoutOverrideSource(llvm::StringRef Filename); + explicit LayoutOverrideSource(StringRef Filename); /// \brief If this particular record type has an overridden layout, /// return that layout. diff --git a/include/clang/Frontend/LogDiagnosticPrinter.h b/include/clang/Frontend/LogDiagnosticPrinter.h index ac24fec173..0c700a7671 100644 --- a/include/clang/Frontend/LogDiagnosticPrinter.h +++ b/include/clang/Frontend/LogDiagnosticPrinter.h @@ -42,7 +42,7 @@ class LogDiagnosticPrinter : public DiagnosticConsumer { raw_ostream &OS; const LangOptions *LangOpts; - llvm::IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; + IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; SourceLocation LastWarningLoc; FullSourceLoc LastLoc; diff --git a/include/clang/Frontend/SerializedDiagnosticPrinter.h b/include/clang/Frontend/SerializedDiagnosticPrinter.h index ab70afd21f..117771d157 100644 --- a/include/clang/Frontend/SerializedDiagnosticPrinter.h +++ b/include/clang/Frontend/SerializedDiagnosticPrinter.h @@ -10,6 +10,7 @@ #ifndef LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_ #define LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_ +#include "clang/Basic/LLVM.h" #include "llvm/Bitcode/BitstreamWriter.h" namespace llvm { @@ -53,7 +54,7 @@ enum RecordIDs { /// This allows wrapper tools for Clang to get diagnostics from Clang /// (via libclang) without needing to parse Clang's command line output. /// -DiagnosticConsumer *create(llvm::raw_ostream *OS, +DiagnosticConsumer *create(raw_ostream *OS, DiagnosticOptions *diags); } // end serialized_diags namespace diff --git a/include/clang/Frontend/TextDiagnosticPrinter.h b/include/clang/Frontend/TextDiagnosticPrinter.h index 831e501918..470438e7bd 100644 --- a/include/clang/Frontend/TextDiagnosticPrinter.h +++ b/include/clang/Frontend/TextDiagnosticPrinter.h @@ -27,7 +27,7 @@ class TextDiagnostic; class TextDiagnosticPrinter : public DiagnosticConsumer { raw_ostream &OS; - llvm::IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; + IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; /// \brief Handle to the currently active text diagnostic emitter. OwningPtr<TextDiagnostic> TextDiag; diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h index fe2dcef623..36e179c84b 100644 --- a/include/clang/Lex/HeaderSearch.h +++ b/include/clang/Lex/HeaderSearch.h @@ -134,7 +134,7 @@ class HeaderSearch { }; /// \brief Header-search options used to initialize this header search. - llvm::IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts; + IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts; FileManager &FileMgr; /// \#include search path information. Requests for \#include "x" search the @@ -217,7 +217,7 @@ class HeaderSearch { friend class DirectoryLookup; public: - HeaderSearch(llvm::IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts, + HeaderSearch(IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts, FileManager &FM, DiagnosticsEngine &Diags, const LangOptions &LangOpts, const TargetInfo *Target); ~HeaderSearch(); @@ -480,7 +480,7 @@ public: /// \brief Collect the set of all known, top-level modules. /// /// \param Modules Will be filled with the set of known, top-level modules. - void collectAllModules(llvm::SmallVectorImpl<Module *> &Modules); + void collectAllModules(SmallVectorImpl<Module *> &Modules); private: /// \brief Retrieve a module with the given name, which may be part of the diff --git a/include/clang/Lex/HeaderSearchOptions.h b/include/clang/Lex/HeaderSearchOptions.h index eaa2623583..1d7534e88d 100644 --- a/include/clang/Lex/HeaderSearchOptions.h +++ b/include/clang/Lex/HeaderSearchOptions.h @@ -38,7 +38,7 @@ namespace frontend { /// HeaderSearchOptions - Helper class for storing options related to the /// initialization of the HeaderSearch object. -class HeaderSearchOptions : public llvm::RefCountedBase<HeaderSearchOptions> { +class HeaderSearchOptions : public RefCountedBase<HeaderSearchOptions> { public: struct Entry { std::string Path; diff --git a/include/clang/Lex/ModuleLoader.h b/include/clang/Lex/ModuleLoader.h index f086c082f9..933cfd36e5 100644 --- a/include/clang/Lex/ModuleLoader.h +++ b/include/clang/Lex/ModuleLoader.h @@ -26,8 +26,7 @@ class Module; /// \brief A sequence of identifier/location pairs used to describe a particular /// module or submodule, e.g., std.vector. -typedef llvm::ArrayRef<std::pair<IdentifierInfo*, SourceLocation> > - ModuleIdPath; +typedef ArrayRef<std::pair<IdentifierInfo *, SourceLocation> > ModuleIdPath; /// \brief Describes the result of attempting to load a module. class ModuleLoadResult { diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 96a53849cf..388c7b3d20 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -104,7 +104,7 @@ class ModuleMap { /// \brief The names of modules that cannot be inferred within this /// directory. - llvm::SmallVector<std::string, 2> ExcludedModules; + SmallVector<std::string, 2> ExcludedModules; }; /// \brief A mapping from directories to information about inferring diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 9d7db5d709..8457cc5ad6 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -84,7 +84,7 @@ public: /// like the \#include stack, token expansion, etc. /// class Preprocessor : public RefCountedBase<Preprocessor> { - llvm::IntrusiveRefCntPtr<PreprocessorOptions> PPOpts; + IntrusiveRefCntPtr<PreprocessorOptions> PPOpts; DiagnosticsEngine *Diags; LangOptions &LangOpts; const TargetInfo *Target; @@ -215,8 +215,7 @@ class Preprocessor : public RefCountedBase<Preprocessor> { SourceLocation ModuleImportLoc; /// \brief The module import path that we're currently processing. - llvm::SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> - ModuleImportPath; + SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> ModuleImportPath; /// \brief Whether the module import expectes an identifier next. Otherwise, /// it expects a '.' or ';'. @@ -396,7 +395,7 @@ private: // Cached tokens state. MacroInfoChain *MICache; public: - Preprocessor(llvm::IntrusiveRefCntPtr<PreprocessorOptions> PPOpts, + Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts, DiagnosticsEngine &diags, LangOptions &opts, const TargetInfo *target, SourceManager &SM, HeaderSearch &Headers, diff --git a/include/clang/Lex/PreprocessorOptions.h b/include/clang/Lex/PreprocessorOptions.h index 93208c040e..7c79e6228a 100644 --- a/include/clang/Lex/PreprocessorOptions.h +++ b/include/clang/Lex/PreprocessorOptions.h @@ -41,7 +41,7 @@ enum ObjCXXARCStandardLibraryKind { /// PreprocessorOptions - This class is used for passing the various options /// used in preprocessor initialization to InitializePreprocessor(). -class PreprocessorOptions : public llvm::RefCountedBase<PreprocessorOptions> { +class PreprocessorOptions : public RefCountedBase<PreprocessorOptions> { public: std::vector<std::pair<std::string, bool/*isUndef*/> > Macros; std::vector<std::string> Includes; @@ -118,7 +118,7 @@ public: ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary; /// \brief Records the set of modules - class FailedModulesSet : public llvm::RefCountedBase<FailedModulesSet> { + class FailedModulesSet : public RefCountedBase<FailedModulesSet> { llvm::StringSet<> Failed; public: @@ -137,7 +137,7 @@ public: /// to (re)build modules, so that once a module fails to build anywhere, /// other instances will see that the module has failed and won't try to /// build it again. - llvm::IntrusiveRefCntPtr<FailedModulesSet> FailedModules; + IntrusiveRefCntPtr<FailedModulesSet> FailedModules; typedef std::vector<std::pair<std::string, std::string> >::iterator remapped_file_iterator; diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index c4b1bdcefa..e5511a17fa 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -804,7 +804,7 @@ private: }; // A list of late-parsed attributes. Used by ParseGNUAttributes. - class LateParsedAttrList: public llvm::SmallVector<LateParsedAttribute*, 2> { + class LateParsedAttrList: public SmallVector<LateParsedAttribute *, 2> { public: LateParsedAttrList(bool PSoon = false) : ParseSoon(PSoon) { } @@ -1245,7 +1245,7 @@ private: SmallVectorImpl<SourceLocation> &CommaLocs, void (Sema::*Completer)(Scope *S, Expr *Data, - llvm::ArrayRef<Expr *> Args) = 0, + ArrayRef<Expr *> Args) = 0, Expr *Data = 0); /// ParenParseOption - Control what ParseParenExpression will parse. @@ -1911,7 +1911,7 @@ private: ParsedAttributes &attrs, SourceLocation *endLoc); - bool IsThreadSafetyAttribute(llvm::StringRef AttrName); + bool IsThreadSafetyAttribute(StringRef AttrName); void ParseThreadSafetyAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h index f3f32e3d48..d2b4a7ce30 100644 --- a/include/clang/Sema/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -2010,7 +2010,7 @@ struct LambdaIntroducer { SourceRange Range; SourceLocation DefaultLoc; LambdaCaptureDefault Default; - llvm::SmallVector<LambdaCapture, 4> Captures; + SmallVector<LambdaCapture, 4> Captures; LambdaIntroducer() : Default(LCD_None) {} diff --git a/include/clang/Sema/DelayedDiagnostic.h b/include/clang/Sema/DelayedDiagnostic.h index a20480c7e4..77cacfbdeb 100644 --- a/include/clang/Sema/DelayedDiagnostic.h +++ b/include/clang/Sema/DelayedDiagnostic.h @@ -224,14 +224,14 @@ private: /// delayed. class DelayedDiagnosticPool { const DelayedDiagnosticPool *Parent; - llvm::SmallVector<DelayedDiagnostic, 4> Diagnostics; + SmallVector<DelayedDiagnostic, 4> Diagnostics; DelayedDiagnosticPool(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION; void operator=(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION; public: DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) {} ~DelayedDiagnosticPool() { - for (llvm::SmallVectorImpl<DelayedDiagnostic>::iterator + for (SmallVectorImpl<DelayedDiagnostic>::iterator i = Diagnostics.begin(), e = Diagnostics.end(); i != e; ++i) i->Destroy(); } @@ -260,8 +260,7 @@ public: pool.Diagnostics.clear(); } - typedef llvm::SmallVectorImpl<DelayedDiagnostic>::const_iterator - pool_iterator; + typedef SmallVectorImpl<DelayedDiagnostic>::const_iterator pool_iterator; pool_iterator pool_begin() const { return Diagnostics.begin(); } pool_iterator pool_end() const { return Diagnostics.end(); } bool pool_empty() const { return Diagnostics.empty(); } diff --git a/include/clang/Sema/MultiplexExternalSemaSource.h b/include/clang/Sema/MultiplexExternalSemaSource.h index 052af98732..25db3e7a21 100644 --- a/include/clang/Sema/MultiplexExternalSemaSource.h +++ b/include/clang/Sema/MultiplexExternalSemaSource.h @@ -39,7 +39,7 @@ namespace clang { class MultiplexExternalSemaSource : public ExternalSemaSource { private: - llvm::SmallVector<ExternalSemaSource*, 2> Sources; // doesn't own them. + SmallVector<ExternalSemaSource *, 2> Sources; // doesn't own them. public: diff --git a/include/clang/Sema/Overload.h b/include/clang/Sema/Overload.h index 65ed781f74..305b067548 100644 --- a/include/clang/Sema/Overload.h +++ b/include/clang/Sema/Overload.h @@ -809,7 +809,7 @@ namespace clang { void NoteCandidates(Sema &S, OverloadCandidateDisplayKind OCD, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, StringRef Opc = "", SourceLocation Loc = SourceLocation()); }; diff --git a/include/clang/Sema/ScopeInfo.h b/include/clang/Sema/ScopeInfo.h index feda9c96b8..990bb53c09 100644 --- a/include/clang/Sema/ScopeInfo.h +++ b/include/clang/Sema/ScopeInfo.h @@ -511,11 +511,11 @@ public: bool ContainsUnexpandedParameterPack; /// \brief Variables used to index into by-copy array captures. - llvm::SmallVector<VarDecl *, 4> ArrayIndexVars; + SmallVector<VarDecl *, 4> ArrayIndexVars; /// \brief Offsets into the ArrayIndexVars array at which each capture starts /// its list of array index variables. - llvm::SmallVector<unsigned, 4> ArrayIndexStarts; + SmallVector<unsigned, 4> ArrayIndexStarts; LambdaScopeInfo(DiagnosticsEngine &Diag, CXXRecordDecl *Lambda, CXXMethodDecl *CallOperator) diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 1f56acee64..da1e50fbba 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -540,7 +540,7 @@ public: RecordDecl *MSVCGuidDecl; /// \brief Caches identifiers/selectors for NSFoundation APIs. - llvm::OwningPtr<NSAPI> NSAPIObj; + OwningPtr<NSAPI> NSAPIObj; /// \brief The declaration of the Objective-C NSNumber class. ObjCInterfaceDecl *NSNumberDecl; @@ -630,7 +630,7 @@ public: /// \brief The lambdas that are present within this context, if it /// is indeed an unevaluated context. - llvm::SmallVector<LambdaExpr *, 2> Lambdas; + SmallVector<LambdaExpr *, 2> Lambdas; /// \brief The declaration that provides context for the lambda expression /// if the normal declaration context does not suffice, e.g., in a @@ -646,11 +646,11 @@ public: /// \brief If we are processing a decltype type, a set of call expressions /// for which we have deferred checking the completeness of the return type. - llvm::SmallVector<CallExpr*, 8> DelayedDecltypeCalls; + SmallVector<CallExpr *, 8> DelayedDecltypeCalls; /// \brief If we are processing a decltype type, a set of temporary binding /// expressions for which we have deferred checking the destructor. - llvm::SmallVector<CXXBindTemporaryExpr*, 8> DelayedDecltypeBinds; + SmallVector<CXXBindTemporaryExpr *, 8> DelayedDecltypeBinds; ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context, unsigned NumCleanupObjects, @@ -1554,7 +1554,7 @@ public: // This is used for both record definitions and ObjC interface declarations. void ActOnFields(Scope* S, SourceLocation RecLoc, Decl *TagDecl, - llvm::ArrayRef<Decl *> Fields, + ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList); @@ -1899,13 +1899,13 @@ public: void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, bool PartialOverloading = false, bool AllowExplicit = false); void AddFunctionCandidates(const UnresolvedSetImpl &Functions, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, TemplateArgumentListInfo *ExplicitTemplateArgs = 0); @@ -1919,7 +1919,7 @@ public: DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false); void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl, @@ -1928,13 +1928,13 @@ public: TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false); void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false); void AddConversionCandidate(CXXConversionDecl *Conversion, @@ -1951,7 +1951,7 @@ public: DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, - Expr *Object, llvm::ArrayRef<Expr*> Args, + Expr *Object, ArrayRef<Expr *> Args, OverloadCandidateSet& CandidateSet); void AddMemberOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, @@ -1969,7 +1969,7 @@ public: OverloadCandidateSet& CandidateSet); void AddArgumentDependentLookupCandidates(DeclarationName Name, bool Operator, SourceLocation Loc, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet& CandidateSet, bool PartialOverloading = false); @@ -2017,7 +2017,7 @@ public: FunctionDecl *Fn); void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading = false); @@ -2264,7 +2264,7 @@ public: void ArgumentDependentLookup(DeclarationName Name, bool Operator, SourceLocation Loc, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, ADLResult &Functions); void LookupVisibleDecls(Scope *S, LookupNameKind Kind, @@ -2283,7 +2283,7 @@ public: const ObjCObjectPointerType *OPT = 0); void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses); @@ -2920,7 +2920,7 @@ public: bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs = 0, - llvm::ArrayRef<Expr *> Args = llvm::ArrayRef<Expr *>()); + ArrayRef<Expr *> Args = ArrayRef<Expr *>()); ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S, IdentifierInfo *II, @@ -3525,7 +3525,7 @@ public: ArrayRef<ParsedType> DynamicExceptions, ArrayRef<SourceRange> DynamicExceptionRanges, Expr *NoexceptExpr, - llvm::SmallVectorImpl<QualType> &Exceptions, + SmallVectorImpl<QualType> &Exceptions, FunctionProtoType::ExtProtoInfo &EPI); /// \brief Determine if a special member function should have a deleted @@ -4141,7 +4141,7 @@ public: SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, - llvm::ArrayRef<ParmVarDecl *> Params); + ArrayRef<ParmVarDecl *> Params); /// \brief Introduce the scope for a lambda expression. sema::LambdaScopeInfo *enterLambdaScope(CXXMethodDecl *CallOperator, @@ -5344,7 +5344,7 @@ public: /// must be set. bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, - llvm::ArrayRef<UnexpandedParameterPack> Unexpanded, + ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, @@ -5469,7 +5469,7 @@ public: TemplateDeductionResult DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, - llvm::ArrayRef<Expr *> Args, + ArrayRef<Expr *> Args, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info); @@ -7086,7 +7086,7 @@ public: void CodeCompleteTag(Scope *S, unsigned TagSpec); void CodeCompleteTypeQualifiers(DeclSpec &DS); void CodeCompleteCase(Scope *S); - void CodeCompleteCall(Scope *S, Expr *Fn, llvm::ArrayRef<Expr *> Args); + void CodeCompleteCall(Scope *S, Expr *Fn, ArrayRef<Expr *> Args); void CodeCompleteInitializer(Scope *S, Decl *D); void CodeCompleteReturn(Scope *S); void CodeCompleteAfterIf(Scope *S); diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h index 45f08fe0e2..0b897b55cc 100644 --- a/include/clang/Sema/TypoCorrection.h +++ b/include/clang/Sema/TypoCorrection.h @@ -182,12 +182,12 @@ public: return CorrectionRange; } - typedef llvm::SmallVector<NamedDecl*, 1>::iterator decl_iterator; + typedef SmallVector<NamedDecl *, 1>::iterator decl_iterator; decl_iterator begin() { return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin(); } decl_iterator end() { return CorrectionDecls.end(); } - typedef llvm::SmallVector<NamedDecl*, 1>::const_iterator const_decl_iterator; + typedef SmallVector<NamedDecl *, 1>::const_iterator const_decl_iterator; const_decl_iterator begin() const { return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin(); } @@ -201,7 +201,7 @@ private: // Results. DeclarationName CorrectionName; NestedNameSpecifier *CorrectionNameSpec; - llvm::SmallVector<NamedDecl*, 1> CorrectionDecls; + SmallVector<NamedDecl *, 1> CorrectionDecls; unsigned CharDistance; unsigned QualifierDistance; unsigned CallbackDistance; diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 61d77b0a75..07ccab4706 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -388,7 +388,7 @@ private: typedef llvm::MapVector<Decl *, uint64_t, llvm::SmallDenseMap<Decl *, unsigned, 4>, - llvm::SmallVector<std::pair<Decl *, uint64_t>, 4> > + SmallVector<std::pair<Decl *, uint64_t>, 4> > PendingBodiesMap; /// \brief Functions or methods that have bodies that will be attached. @@ -433,7 +433,7 @@ private: GlobalMacroMapType GlobalMacroMap; typedef llvm::DenseMap<serialization::MacroID, - llvm::SmallVector<std::pair<serialization::SubmoduleID, + SmallVector<std::pair<serialization::SubmoduleID, MacroUpdate>, 1> > MacroUpdatesMap; @@ -503,8 +503,7 @@ private: }; /// \brief A set of hidden declarations. - typedef llvm::SmallVector<HiddenName, 2> - HiddenNames; + typedef SmallVector<HiddenName, 2> HiddenNames; typedef llvm::DenseMap<Module *, HiddenNames> HiddenNamesMapType; @@ -533,8 +532,7 @@ private: /// \brief The set of module imports and exports that still need to be /// resolved. - llvm::SmallVector<UnresolvedModuleImportExport, 2> - UnresolvedModuleImportExports; + SmallVector<UnresolvedModuleImportExport, 2> UnresolvedModuleImportExports; /// \brief A vector containing selectors that have already been loaded. /// @@ -556,7 +554,7 @@ private: llvm::DenseMap<Selector, unsigned> SelectorGeneration; typedef llvm::MapVector<IdentifierInfo *, - llvm::SmallVector<serialization::MacroID, 2> > + SmallVector<serialization::MacroID, 2> > PendingMacroIDsMap; /// \brief Mapping from identifiers that have a macro history to the global @@ -798,7 +796,7 @@ private: /// Each element is the global declaration ID of the first declaration in /// the chain. Elements in this vector should be unique; use /// PendingDeclChainsKnown to ensure uniqueness. - llvm::SmallVector<serialization::DeclID, 16> PendingDeclChains; + SmallVector<serialization::DeclID, 16> PendingDeclChains; /// \brief Keeps track of the elements added to PendingDeclChains. llvm::SmallSet<serialization::DeclID, 16> PendingDeclChainsKnown; @@ -810,9 +808,9 @@ private: /// \brief The set of Objective-C class definitions that have already been /// loaded, for which we will need to check for categories whenever a new /// module is loaded. - llvm::SmallVector<ObjCInterfaceDecl *, 16> ObjCClassesLoaded; + SmallVector<ObjCInterfaceDecl *, 16> ObjCClassesLoaded; - typedef llvm::DenseMap<Decl *, llvm::SmallVector<serialization::DeclID, 2> > + typedef llvm::DenseMap<Decl *, SmallVector<serialization::DeclID, 2> > MergedDeclsMap; /// \brief A mapping from canonical declarations to the set of additional @@ -821,7 +819,7 @@ private: MergedDeclsMap MergedDecls; typedef llvm::DenseMap<serialization::GlobalDeclID, - llvm::SmallVector<serialization::DeclID, 2> > + SmallVector<serialization::DeclID, 2> > StoredMergedDeclsMap; /// \brief A mapping from canonical declaration IDs to the set of additional @@ -909,10 +907,10 @@ private: ASTReadResult ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, - llvm::SmallVectorImpl<ImportedModule> &Loaded, + SmallVectorImpl<ImportedModule> &Loaded, unsigned ClientLoadCapabilities); ASTReadResult ReadControlBlock(ModuleFile &F, - llvm::SmallVectorImpl<ImportedModule> &Loaded, + SmallVectorImpl<ImportedModule> &Loaded, unsigned ClientLoadCapabilities); bool ReadASTBlock(ModuleFile &F); bool ParseLineTable(ModuleFile &F, SmallVectorImpl<uint64_t> &Record); diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 8bc83d13ee..d632ba5c6e 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -344,7 +344,7 @@ private: /// \brief The set of declarations that may have redeclaration chains that /// need to be serialized. - llvm::SetVector<Decl *, llvm::SmallVector<Decl *, 4>, + llvm::SetVector<Decl *, SmallVector<Decl *, 4>, llvm::SmallPtrSet<Decl *, 4> > Redeclarations; /// \brief Statements that we've encountered while serializing a @@ -729,7 +729,7 @@ class PCHGenerator : public SemaConsumer { std::string isysroot; raw_ostream *Out; Sema *SemaPtr; - llvm::SmallVector<char, 128> Buffer; + SmallVector<char, 128> Buffer; llvm::BitstreamWriter Stream; ASTWriter Writer; diff --git a/include/clang/Serialization/ModuleManager.h b/include/clang/Serialization/ModuleManager.h index 81e879ef6f..512d7e9b66 100644 --- a/include/clang/Serialization/ModuleManager.h +++ b/include/clang/Serialization/ModuleManager.h @@ -27,7 +27,7 @@ namespace serialization { class ModuleManager { /// \brief The chain of AST files. The first entry is the one named by the /// user, the last one is the one that doesn't depend on anything further. - llvm::SmallVector<ModuleFile*, 2> Chain; + SmallVector<ModuleFile *, 2> Chain; /// \brief All loaded modules, indexed by name. llvm::DenseMap<const FileEntry *, ModuleFile *> Modules; diff --git a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h index 5ae8262abe..24f33bcda1 100644 --- a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h +++ b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h @@ -103,7 +103,7 @@ enum CXXInlineableMemberKind { }; -class AnalyzerOptions : public llvm::RefCountedBase<AnalyzerOptions> { +class AnalyzerOptions : public RefCountedBase<AnalyzerOptions> { public: typedef llvm::StringMap<std::string> ConfigTable; @@ -207,7 +207,7 @@ private: bool DefaultVal); /// Interprets an option's string value as an integer value. - int getOptionAsInteger(llvm::StringRef Name, int DefaultVal); + int getOptionAsInteger(StringRef Name, int DefaultVal); public: /// Returns the option controlling which C++ member functions will be @@ -309,7 +309,7 @@ public: } }; -typedef llvm::IntrusiveRefCntPtr<AnalyzerOptions> AnalyzerOptionsRef; +typedef IntrusiveRefCntPtr<AnalyzerOptions> AnalyzerOptionsRef; } diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h index deb2ef6dcc..7a87e47f74 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -89,14 +89,14 @@ protected: /// diagnostics to include when constructing the final path diagnostic. /// The stack is largely used by BugReporter when generating PathDiagnostics /// for multiple PathDiagnosticConsumers. - llvm::SmallVector<Symbols *, 2> interestingSymbols; + SmallVector<Symbols *, 2> interestingSymbols; /// A (stack of) set of regions that are registered with this report as being /// "interesting", and thus used to help decide which diagnostics /// to include when constructing the final path diagnostic. /// The stack is largely used by BugReporter when generating PathDiagnostics /// for multiple PathDiagnosticConsumers. - llvm::SmallVector<Regions *, 2> interestingRegions; + SmallVector<Regions *, 2> interestingRegions; /// A set of location contexts that correspoind to call sites which should be /// considered "interesting". diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h index 78e35ca82b..dcd078f5b3 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h @@ -223,7 +223,7 @@ public: const ExplodedNode *N); bool patternMatch(const Expr *Ex, - llvm::raw_ostream &Out, + raw_ostream &Out, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N, diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index 01d7f48275..253ac8862e 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -341,7 +341,7 @@ protected: public: virtual ~PathDiagnosticPiece(); - llvm::StringRef getString() const { return str; } + StringRef getString() const { return str; } /// Tag this PathDiagnosticPiece with the given C-string. void setTag(const char *tag) { Tag = tag; } @@ -467,7 +467,7 @@ class PathDiagnosticEventPiece : public PathDiagnosticSpotPiece { /// supply a message that will be used to construct an extra hint on the /// returns from all the calls on the stack from this event to the final /// diagnostic. - llvm::OwningPtr<StackHintGenerator> CallStackHint; + OwningPtr<StackHintGenerator> CallStackHint; public: PathDiagnosticEventPiece(const PathDiagnosticLocation &pos, @@ -670,7 +670,7 @@ class PathDiagnostic : public llvm::FoldingSetNode { std::deque<std::string> OtherDesc; PathDiagnosticLocation Loc; PathPieces pathImpl; - llvm::SmallVector<PathPieces *, 3> pathStack; + SmallVector<PathPieces *, 3> pathStack; /// \brief Important bug uniqueing location. /// The location info is useful to differentiate between bugs. diff --git a/include/clang/StaticAnalyzer/Core/Checker.h b/include/clang/StaticAnalyzer/Core/Checker.h index 710bbc0d99..a190e1f5ef 100644 --- a/include/clang/StaticAnalyzer/Core/Checker.h +++ b/include/clang/StaticAnalyzer/Core/Checker.h @@ -34,11 +34,11 @@ class ASTDecl { template <typename CHECKER> static void _checkDecl(void *checker, const Decl *D, AnalysisManager& mgr, BugReporter &BR) { - ((const CHECKER *)checker)->checkASTDecl(llvm::cast<DECL>(D), mgr, BR); + ((const CHECKER *)checker)->checkASTDecl(cast<DECL>(D), mgr, BR); } static bool _handlesDecl(const Decl *D) { - return llvm::isa<DECL>(D); + return isa<DECL>(D); } public: template <typename CHECKER> @@ -86,11 +86,11 @@ template <typename STMT> class PreStmt { template <typename CHECKER> static void _checkStmt(void *checker, const Stmt *S, CheckerContext &C) { - ((const CHECKER *)checker)->checkPreStmt(llvm::cast<STMT>(S), C); + ((const CHECKER *)checker)->checkPreStmt(cast<STMT>(S), C); } static bool _handlesStmt(const Stmt *S) { - return llvm::isa<STMT>(S); + return isa<STMT>(S); } public: template <typename CHECKER> @@ -105,11 +105,11 @@ template <typename STMT> class PostStmt { template <typename CHECKER> static void _checkStmt(void *checker, const Stmt *S, CheckerContext &C) { - ((const CHECKER *)checker)->checkPostStmt(llvm::cast<STMT>(S), C); + ((const CHECKER *)checker)->checkPostStmt(cast<STMT>(S), C); } static bool _handlesStmt(const Stmt *S) { - return llvm::isa<STMT>(S); + return isa<STMT>(S); } public: template <typename CHECKER> diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h index 5153bcd87c..3afe5e77b9 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h @@ -122,7 +122,7 @@ public: /// Convenience method to query the state to see if a symbol is null or /// not null, or if neither assumption can be made. ConditionTruthVal isNull(ProgramStateRef State, SymbolRef Sym) { - llvm::SaveAndRestore<bool> DisableNotify(NotifyAssumeClients, false); + SaveAndRestore<bool> DisableNotify(NotifyAssumeClients, false); return checkNull(State, Sym); } diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h index f31e1cbfb9..d8a7245730 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h @@ -463,7 +463,7 @@ public: bool operator!=(const iterator &X) const { return I != X.I; } const LabelDecl *getLabel() const { - return llvm::cast<LabelStmt>((*I)->getLabel())->getDecl(); + return cast<LabelStmt>((*I)->getLabel())->getDecl(); } const CFGBlock *getBlock() const { @@ -510,7 +510,7 @@ public: bool operator==(const iterator &X) const { return I == X.I; } const CaseStmt *getCase() const { - return llvm::cast<CaseStmt>((*I)->getLabel()); + return cast<CaseStmt>((*I)->getLabel()); } const CFGBlock *getBlock() const { @@ -522,7 +522,7 @@ public: iterator end() { return iterator(Src->succ_rend()); } const SwitchStmt *getSwitch() const { - return llvm::cast<SwitchStmt>(Src->getTerminator()); + return cast<SwitchStmt>(Src->getTerminator()); } ExplodedNode *generateCaseStmtNode(const iterator &I, diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index 0d5a0cffaa..48f0ab962f 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -432,7 +432,7 @@ public: template <typename REGION> const REGION* getRegionAs() const { - return llvm::dyn_cast<REGION>(getRegion()); + return dyn_cast<REGION>(getRegion()); } inline bool operator==(const MemRegionVal& R) const { diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index 950525f826..56afca24f6 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -96,7 +96,7 @@ public: }; typedef const SymExpr* SymbolRef; -typedef llvm::SmallVector<SymbolRef, 2> SymbolRefSmallVectorTy; +typedef SmallVector<SymbolRef, 2> SymbolRefSmallVectorTy; typedef unsigned SymbolID; /// \brief A symbol representing data which can be stored in a memory location diff --git a/include/clang/Tooling/CommonOptionsParser.h b/include/clang/Tooling/CommonOptionsParser.h index d313773d3d..6775934139 100644 --- a/include/clang/Tooling/CommonOptionsParser.h +++ b/include/clang/Tooling/CommonOptionsParser.h @@ -79,7 +79,7 @@ public: static const char *const HelpMessage; private: - llvm::OwningPtr<CompilationDatabase> Compilations; + OwningPtr<CompilationDatabase> Compilations; std::vector<std::string> SourcePathList; }; diff --git a/include/clang/Tooling/CompilationDatabase.h b/include/clang/Tooling/CompilationDatabase.h index fdf07f0700..7a8054ffc3 100644 --- a/include/clang/Tooling/CompilationDatabase.h +++ b/include/clang/Tooling/CompilationDatabase.h @@ -152,7 +152,7 @@ public: /// The argument list is meant to be compatible with normal llvm command line /// parsing in main methods. /// int main(int argc, char **argv) { - /// llvm::OwningPtr<FixedCompilationDatabase> Compilations( + /// OwningPtr<FixedCompilationDatabase> Compilations( /// FixedCompilationDatabase::loadFromCommandLine(argc, argv)); /// cl::ParseCommandLineOptions(argc, argv); /// ... diff --git a/include/clang/Tooling/FileMatchTrie.h b/include/clang/Tooling/FileMatchTrie.h index 6a2b2734f1..e531854cca 100644 --- a/include/clang/Tooling/FileMatchTrie.h +++ b/include/clang/Tooling/FileMatchTrie.h @@ -76,7 +76,7 @@ public: /// matches, an empty \c StringRef is returned and a corresponding message /// written to 'Error'. StringRef findEquivalent(StringRef FileName, - llvm::raw_ostream &Error) const; + raw_ostream &Error) const; private: FileMatchTrieNode *Root; OwningPtr<PathComparator> Comparator; diff --git a/include/clang/Tooling/JSONCompilationDatabase.h b/include/clang/Tooling/JSONCompilationDatabase.h index 0424d94629..e3f149bebc 100644 --- a/include/clang/Tooling/JSONCompilationDatabase.h +++ b/include/clang/Tooling/JSONCompilationDatabase.h @@ -104,7 +104,7 @@ private: FileMatchTrie MatchTrie; - llvm::OwningPtr<llvm::MemoryBuffer> Database; + OwningPtr<llvm::MemoryBuffer> Database; llvm::SourceMgr SM; llvm::yaml::Stream YAMLStream; }; diff --git a/include/clang/Tooling/Refactoring.h b/include/clang/Tooling/Refactoring.h index 5f2f8082f2..079ce7420d 100644 --- a/include/clang/Tooling/Refactoring.h +++ b/include/clang/Tooling/Refactoring.h @@ -47,22 +47,22 @@ public: /// \param FilePath A source file accessible via a SourceManager. /// \param Offset The byte offset of the start of the range in the file. /// \param Length The length of the range in bytes. - Replacement(llvm::StringRef FilePath, unsigned Offset, - unsigned Length, llvm::StringRef ReplacementText); + Replacement(StringRef FilePath, unsigned Offset, + unsigned Length, StringRef ReplacementText); /// \brief Creates a Replacement of the range [Start, Start+Length) with /// ReplacementText. Replacement(SourceManager &Sources, SourceLocation Start, unsigned Length, - llvm::StringRef ReplacementText); + StringRef ReplacementText); /// \brief Creates a Replacement of the given range with ReplacementText. Replacement(SourceManager &Sources, const CharSourceRange &Range, - llvm::StringRef ReplacementText); + StringRef ReplacementText); /// \brief Creates a Replacement of the node with ReplacementText. template <typename Node> Replacement(SourceManager &Sources, const Node &NodeToReplace, - llvm::StringRef ReplacementText); + StringRef ReplacementText); /// \brief Returns whether this replacement can be applied to a file. /// @@ -91,9 +91,9 @@ public: private: void setFromSourceLocation(SourceManager &Sources, SourceLocation Start, - unsigned Length, llvm::StringRef ReplacementText); + unsigned Length, StringRef ReplacementText); void setFromSourceRange(SourceManager &Sources, const CharSourceRange &Range, - llvm::StringRef ReplacementText); + StringRef ReplacementText); std::string FilePath; unsigned Offset; @@ -152,7 +152,7 @@ private: template <typename Node> Replacement::Replacement(SourceManager &Sources, const Node &NodeToReplace, - llvm::StringRef ReplacementText) { + StringRef ReplacementText) { const CharSourceRange Range = CharSourceRange::getTokenRange(NodeToReplace->getSourceRange()); setFromSourceRange(Sources, Range, ReplacementText); diff --git a/include/clang/Tooling/Tooling.h b/include/clang/Tooling/Tooling.h index dae848dddf..6d92442457 100644 --- a/include/clang/Tooling/Tooling.h +++ b/include/clang/Tooling/Tooling.h @@ -155,7 +155,7 @@ class ToolInvocation { const clang::driver::ArgStringList &CC1Args); std::vector<std::string> CommandLine; - llvm::OwningPtr<FrontendAction> ToolAction; + OwningPtr<FrontendAction> ToolAction; FileManager *Files; // Maps <file name> -> <file content>. llvm::StringMap<StringRef> MappedFileContents; @@ -212,7 +212,7 @@ class ClangTool { // Contains a list of pairs (<file name>, <file content>). std::vector< std::pair<StringRef, StringRef> > MappedFileContents; - llvm::OwningPtr<ArgumentsAdjuster> ArgsAdjuster; + OwningPtr<ArgumentsAdjuster> ArgsAdjuster; }; template <typename T> @@ -246,7 +246,7 @@ inline FrontendActionFactory *newFrontendActionFactory( : ConsumerFactory(ConsumerFactory), EndCallback(EndCallback) {} clang::ASTConsumer *CreateASTConsumer(clang::CompilerInstance &, - llvm::StringRef) { + StringRef) { return ConsumerFactory->newASTConsumer(); } |