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 |