diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Driver/Types.h | 2 | ||||
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 4 | ||||
-rw-r--r-- | clang/include/clang/Sema/DeclSpec.h | 2 | ||||
-rw-r--r-- | clang/include/clang/Sema/Sema.h | 4 | ||||
-rw-r--r-- | clang/include/clang/Serialization/ASTReader.h | 2 | ||||
-rw-r--r-- | clang/lib/AST/ASTDiagnostic.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/VTableBuilder.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Driver/Types.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Frontend/ChainedIncludesSource.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Lex/TokenLexer.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp | 20 | ||||
-rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteObjC.cpp | 20 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 10 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 2 |
21 files changed, 53 insertions, 55 deletions
diff --git a/clang/include/clang/Driver/Types.h b/clang/include/clang/Driver/Types.h index 18cd2d5102c..be5015e843a 100644 --- a/clang/include/clang/Driver/Types.h +++ b/clang/include/clang/Driver/Types.h @@ -78,7 +78,7 @@ namespace types { /// done for type 'Id'. void getCompilationPhases( ID Id, - llvm::SmallVector<phases::ID, phases::MaxNumberOfPhases> &Phases); + llvm::SmallVectorImpl<phases::ID> &Phases); /// lookupCXXTypeForCType - Lookup CXX input type that corresponds to given /// C type (used for clang++ emulation of g++ behaviour) diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 60201368158..b376597e1b6 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -2044,11 +2044,11 @@ private: bool isFunctionDeclaratorIdentifierList(); void ParseFunctionDeclaratorIdentifierList( Declarator &D, - SmallVector<DeclaratorChunk::ParamInfo, 16> &ParamInfo); + SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo); void ParseParameterDeclarationClause( Declarator &D, ParsedAttributes &attrs, - SmallVector<DeclaratorChunk::ParamInfo, 16> &ParamInfo, + SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc); void ParseBracketDeclarator(Declarator &D); diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index 2d55c681a69..ef74abe188b 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -1997,7 +1997,7 @@ public: /// \brief Return a source range list of C++11 attributes associated /// with the declarator. - void getCXX11AttributeRanges(SmallVector<SourceRange, 4> &Ranges) { + void getCXX11AttributeRanges(SmallVectorImpl<SourceRange> &Ranges) { AttributeList *AttrList = Attrs.getList(); while (AttrList) { if (AttrList->isCXX11Attribute()) diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 08c8ade33b7..cdf24fc7df9 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -993,7 +993,7 @@ public: sema::CapturedRegionScopeInfo *getCurCapturedRegion(); /// WeakTopLevelDeclDecls - access to \#pragma weak-generated Decls - SmallVector<Decl*,2> &WeakTopLevelDecls() { return WeakTopLevelDecl; } + SmallVectorImpl<Decl *> &WeakTopLevelDecls() { return WeakTopLevelDecl; } void ActOnComment(SourceRange Comment); @@ -6859,7 +6859,7 @@ public: const FunctionProtoType *Proto, unsigned FirstProtoArg, ArrayRef<Expr *> Args, - SmallVector<Expr *, 8> &AllArgs, + SmallVectorImpl<Expr *> &AllArgs, VariadicCallType CallType = VariadicDoesNotApply, bool AllowExplicit = false, bool IsListInitialization = false); diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h index 3861b8f67cc..746850f40dc 100644 --- a/clang/include/clang/Serialization/ASTReader.h +++ b/clang/include/clang/Serialization/ASTReader.h @@ -1732,7 +1732,7 @@ public: /// \brief Read a template argument array. void - ReadTemplateArgumentList(SmallVector<TemplateArgument, 8> &TemplArgs, + ReadTemplateArgumentList(SmallVectorImpl<TemplateArgument> &TemplArgs, ModuleFile &F, const RecordData &Record, unsigned &Idx); diff --git a/clang/lib/AST/ASTDiagnostic.cpp b/clang/lib/AST/ASTDiagnostic.cpp index e0f552ba67c..9a7a2f6f707 100644 --- a/clang/lib/AST/ASTDiagnostic.cpp +++ b/clang/lib/AST/ASTDiagnostic.cpp @@ -990,7 +990,7 @@ class TemplateDiff { /// makeTemplateList - Dump every template alias into the vector. static void makeTemplateList( - SmallVector<const TemplateSpecializationType*, 1> &TemplateList, + SmallVectorImpl<const TemplateSpecializationType *> &TemplateList, const TemplateSpecializationType *TST) { while (TST) { TemplateList.push_back(TST); diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp index 6c968bfe612..69a70a1760d 100644 --- a/clang/lib/AST/VTableBuilder.cpp +++ b/clang/lib/AST/VTableBuilder.cpp @@ -1068,8 +1068,8 @@ void VTableBuilder::AddThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk) { assert(!isBuildingConstructorVTable() && "Can't add thunks for construction vtable"); - SmallVector<ThunkInfo, 1> &ThunksVector = Thunks[MD]; - + SmallVectorImpl<ThunkInfo> &ThunksVector = Thunks[MD]; + // Check if we have this thunk already. if (std::find(ThunksVector.begin(), ThunksVector.end(), Thunk) != ThunksVector.end()) diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 7d6077396a2..9ed50ec67d0 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2178,7 +2178,7 @@ static void checkArgMatches(llvm::Value *Elt, unsigned &ArgNo, } void CodeGenFunction::ExpandTypeToArgs(QualType Ty, RValue RV, - SmallVector<llvm::Value*,16> &Args, + SmallVectorImpl<llvm::Value *> &Args, llvm::FunctionType *IRFuncTy) { if (const ConstantArrayType *AT = getContext().getAsConstantArrayType(Ty)) { unsigned NumElts = AT->getSize().getZExtValue(); diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 83989697ad4..419075fe179 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2332,7 +2332,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, static llvm::Constant *GenerateConstantVector(CGBuilderTy &Builder, - SmallVector<unsigned, 4> &Elts) { + SmallVectorImpl<unsigned> &Elts) { SmallVector<llvm::Constant*, 4> CElts; for (unsigned i = 0, e = Elts.size(); i != e; ++i) CElts.push_back(Builder.getInt32(Elts[i])); diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index a9ed49ef73e..1b62048b31d 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2469,7 +2469,7 @@ private: /// Ty, into individual arguments on the provided vector \arg Args. See /// ABIArgInfo::Expand. void ExpandTypeToArgs(QualType Ty, RValue Src, - SmallVector<llvm::Value*, 16> &Args, + SmallVectorImpl<llvm::Value *> &Args, llvm::FunctionType *IRFuncTy); llvm::Value* EmitAsmInput(const TargetInfo::ConstraintInfo &Info, diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index fa9735705eb..5d6a29b0d5d 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -4699,7 +4699,7 @@ class MipsABIInfo : public ABIInfo { bool IsO32; unsigned MinABIStackAlignInBytes, StackAlignInBytes; void CoerceToIntArgs(uint64_t TySize, - SmallVector<llvm::Type*, 8> &ArgList) const; + SmallVectorImpl<llvm::Type *> &ArgList) const; llvm::Type* HandleAggregates(QualType Ty, uint64_t TySize) const; llvm::Type* returnAggregateInRegs(QualType RetTy, uint64_t Size) const; llvm::Type* getPaddingType(uint64_t Align, uint64_t Offset) const; @@ -4749,7 +4749,7 @@ public: } void MipsABIInfo::CoerceToIntArgs(uint64_t TySize, - SmallVector<llvm::Type*, 8> &ArgList) const { + SmallVectorImpl<llvm::Type *> &ArgList) const { llvm::IntegerType *IntTy = llvm::IntegerType::get(getVMContext(), MinABIStackAlignInBytes * 8); diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp index 7d22596a17e..87c695f1331 100644 --- a/clang/lib/Driver/Types.cpp +++ b/clang/lib/Driver/Types.cpp @@ -180,9 +180,7 @@ types::ID types::lookupTypeForTypeSpecifier(const char *Name) { } // FIXME: Why don't we just put this list in the defs file, eh. -void types::getCompilationPhases( - ID Id, - llvm::SmallVector<phases::ID, phases::MaxNumberOfPhases> &P) { +void types::getCompilationPhases(ID Id, llvm::SmallVectorImpl<phases::ID> &P) { if (Id != TY_Object) { if (getPreprocessedType(Id) != TY_INVALID) { P.push_back(phases::Preprocess); diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp index cde84caade5..442177ec319 100644 --- a/clang/lib/Frontend/ChainedIncludesSource.cpp +++ b/clang/lib/Frontend/ChainedIncludesSource.cpp @@ -26,9 +26,9 @@ using namespace clang; static ASTReader *createASTReader(CompilerInstance &CI, - StringRef pchFile, - SmallVector<llvm::MemoryBuffer *, 4> &memBufs, - SmallVector<std::string, 4> &bufNames, + StringRef pchFile, + SmallVectorImpl<llvm::MemoryBuffer *> &memBufs, + SmallVectorImpl<std::string> &bufNames, ASTDeserializationListener *deserialListener = 0) { Preprocessor &PP = CI.getPreprocessor(); OwningPtr<ASTReader> Reader; diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp index 4f21995391c..ded2b561a28 100644 --- a/clang/lib/Lex/TokenLexer.cpp +++ b/clang/lib/Lex/TokenLexer.cpp @@ -121,7 +121,7 @@ void TokenLexer::destroy() { /// Remove comma ahead of __VA_ARGS__, if present, according to compiler dialect /// settings. Returns true if the comma is removed. -static bool MaybeRemoveCommaBeforeVaArgs(SmallVector<Token, 128> &ResultToks, +static bool MaybeRemoveCommaBeforeVaArgs(SmallVectorImpl<Token> &ResultToks, bool &NextTokGetsSpace, bool HasPasteOperator, MacroInfo *Macro, unsigned MacroArgNo, diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index b3e2a85965c..681468ddc79 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -5118,7 +5118,7 @@ bool Parser::isFunctionDeclaratorIdentifierList() { /// void Parser::ParseFunctionDeclaratorIdentifierList( Declarator &D, - SmallVector<DeclaratorChunk::ParamInfo, 16> &ParamInfo) { + SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) { // If there was no identifier specified for the declarator, either we are in // an abstract-declarator, or we are in a parameter declarator which was found // to be abstract. In abstract-declarators, identifier lists are not valid: @@ -5199,7 +5199,7 @@ void Parser::ParseFunctionDeclaratorIdentifierList( void Parser::ParseParameterDeclarationClause( Declarator &D, ParsedAttributes &FirstArgAttrs, - SmallVector<DeclaratorChunk::ParamInfo, 16> &ParamInfo, + SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc) { while (1) { diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp index fd1f26347ac..546f9217ae1 100644 --- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -307,7 +307,7 @@ namespace { void ConvertSourceLocationToLineDirective(SourceLocation Loc, std::string &LineString); void RewriteForwardClassDecl(DeclGroupRef D); - void RewriteForwardClassDecl(const SmallVector<Decl *, 8> &DG); + void RewriteForwardClassDecl(const SmallVectorImpl<Decl *> &DG); void RewriteForwardClassEpilogue(ObjCInterfaceDecl *ClassDecl, const std::string &typedefString); void RewriteImplementations(); @@ -325,7 +325,7 @@ namespace { void RewriteCategoryDecl(ObjCCategoryDecl *Dcl); void RewriteProtocolDecl(ObjCProtocolDecl *Dcl); void RewriteForwardProtocolDecl(DeclGroupRef D); - void RewriteForwardProtocolDecl(const SmallVector<Decl *, 8> &DG); + void RewriteForwardProtocolDecl(const SmallVectorImpl<Decl *> &DG); void RewriteMethodDeclaration(ObjCMethodDecl *Method); void RewriteProperty(ObjCPropertyDecl *prop); void RewriteFunctionDecl(FunctionDecl *FD); @@ -478,7 +478,7 @@ namespace { StringRef FunName); FunctionDecl *SynthBlockInitFunctionDecl(StringRef name); Stmt *SynthBlockInitExpr(BlockExpr *Exp, - const SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs); + const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs); // Misc. helper routines. QualType getProtocolType(); @@ -490,8 +490,8 @@ namespace { bool IsDeclStmtInForeachHeader(DeclStmt *DS); void CollectBlockDeclRefInfo(BlockExpr *Exp); void GetBlockDeclRefExprs(Stmt *S); - void GetInnerBlockDeclRefExprs(Stmt *S, - SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs, + void GetInnerBlockDeclRefExprs(Stmt *S, + SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs, llvm::SmallPtrSet<const DeclContext *, 8> &InnerContexts); // We avoid calling Type::isBlockPointerType(), since it operates on the @@ -1084,7 +1084,7 @@ void RewriteModernObjC::RewriteForwardClassDecl(DeclGroupRef D) { } void RewriteModernObjC::RewriteForwardClassDecl( - const SmallVector<Decl *, 8> &D) { + const SmallVectorImpl<Decl *> &D) { std::string typedefString; for (unsigned i = 0; i < D.size(); i++) { ObjCInterfaceDecl *ForwardDecl = cast<ObjCInterfaceDecl>(D[i]); @@ -1202,7 +1202,7 @@ void RewriteModernObjC::RewriteForwardProtocolDecl(DeclGroupRef D) { } void -RewriteModernObjC::RewriteForwardProtocolDecl(const SmallVector<Decl *, 8> &DG) { +RewriteModernObjC::RewriteForwardProtocolDecl(const SmallVectorImpl<Decl *> &DG) { SourceLocation LocStart = DG[0]->getLocStart(); if (LocStart.isInvalid()) llvm_unreachable("Invalid SourceLocation"); @@ -4662,8 +4662,8 @@ void RewriteModernObjC::GetBlockDeclRefExprs(Stmt *S) { return; } -void RewriteModernObjC::GetInnerBlockDeclRefExprs(Stmt *S, - SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs, +void RewriteModernObjC::GetInnerBlockDeclRefExprs(Stmt *S, + SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs, llvm::SmallPtrSet<const DeclContext *, 8> &InnerContexts) { for (Stmt::child_range CI = S->children(); CI; ++CI) if (*CI) { @@ -5407,7 +5407,7 @@ FunctionDecl *RewriteModernObjC::SynthBlockInitFunctionDecl(StringRef name) { } Stmt *RewriteModernObjC::SynthBlockInitExpr(BlockExpr *Exp, - const SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs) { + const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs) { const BlockDecl *block = Exp->getBlockDecl(); diff --git a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp index 662efaa63a7..316009fc51a 100644 --- a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -267,7 +267,7 @@ namespace { void RewriteRecordBody(RecordDecl *RD); void RewriteInclude(); void RewriteForwardClassDecl(DeclGroupRef D); - void RewriteForwardClassDecl(const SmallVector<Decl *, 8> &DG); + void RewriteForwardClassDecl(const SmallVectorImpl<Decl *> &DG); void RewriteForwardClassEpilogue(ObjCInterfaceDecl *ClassDecl, const std::string &typedefString); void RewriteImplementations(); @@ -285,7 +285,7 @@ namespace { void RewriteCategoryDecl(ObjCCategoryDecl *Dcl); void RewriteProtocolDecl(ObjCProtocolDecl *Dcl); void RewriteForwardProtocolDecl(DeclGroupRef D); - void RewriteForwardProtocolDecl(const SmallVector<Decl *, 8> &DG); + void RewriteForwardProtocolDecl(const SmallVectorImpl<Decl *> &DG); void RewriteMethodDeclaration(ObjCMethodDecl *Method); void RewriteProperty(ObjCPropertyDecl *prop); void RewriteFunctionDecl(FunctionDecl *FD); @@ -395,7 +395,7 @@ namespace { StringRef FunName); FunctionDecl *SynthBlockInitFunctionDecl(StringRef name); Stmt *SynthBlockInitExpr(BlockExpr *Exp, - const SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs); + const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs); // Misc. helper routines. QualType getProtocolType(); @@ -408,8 +408,8 @@ namespace { bool IsDeclStmtInForeachHeader(DeclStmt *DS); void CollectBlockDeclRefInfo(BlockExpr *Exp); void GetBlockDeclRefExprs(Stmt *S); - void GetInnerBlockDeclRefExprs(Stmt *S, - SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs, + void GetInnerBlockDeclRefExprs(Stmt *S, + SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs, llvm::SmallPtrSet<const DeclContext *, 8> &InnerContexts); // We avoid calling Type::isBlockPointerType(), since it operates on the @@ -926,7 +926,7 @@ void RewriteObjC::RewriteForwardClassDecl(DeclGroupRef D) { RewriteForwardClassEpilogue(cast<ObjCInterfaceDecl>(*I), typedefString); } -void RewriteObjC::RewriteForwardClassDecl(const SmallVector<Decl *, 8> &D) { +void RewriteObjC::RewriteForwardClassDecl(const SmallVectorImpl<Decl *> &D) { std::string typedefString; for (unsigned i = 0; i < D.size(); i++) { ObjCInterfaceDecl *ForwardDecl = cast<ObjCInterfaceDecl>(D[i]); @@ -1038,7 +1038,7 @@ void RewriteObjC::RewriteForwardProtocolDecl(DeclGroupRef D) { } void -RewriteObjC::RewriteForwardProtocolDecl(const SmallVector<Decl *, 8> &DG) { +RewriteObjC::RewriteForwardProtocolDecl(const SmallVectorImpl<Decl *> &DG) { SourceLocation LocStart = DG[0]->getLocStart(); if (LocStart.isInvalid()) llvm_unreachable("Invalid SourceLocation"); @@ -3743,8 +3743,8 @@ void RewriteObjC::GetBlockDeclRefExprs(Stmt *S) { return; } -void RewriteObjC::GetInnerBlockDeclRefExprs(Stmt *S, - SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs, +void RewriteObjC::GetInnerBlockDeclRefExprs(Stmt *S, + SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs, llvm::SmallPtrSet<const DeclContext *, 8> &InnerContexts) { for (Stmt::child_range CI = S->children(); CI; ++CI) if (*CI) { @@ -4452,7 +4452,7 @@ FunctionDecl *RewriteObjC::SynthBlockInitFunctionDecl(StringRef name) { } Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp, - const SmallVector<DeclRefExpr *, 8> &InnerBlockDeclRefs) { + const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs) { const BlockDecl *block = Exp->getBlockDecl(); Blocks.push_back(Exp); diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 8e6b1bd2871..d20023d13a5 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -3309,11 +3309,11 @@ static bool CheckAnonMemberRedeclaration(Sema &SemaRef, /// This routine is recursive, injecting the names of nested anonymous /// structs/unions into the owning context and scope as well. static bool InjectAnonymousStructOrUnionMembers(Sema &SemaRef, Scope *S, - DeclContext *Owner, - RecordDecl *AnonRecord, - AccessSpecifier AS, - SmallVector<NamedDecl*, 2> &Chaining, - bool MSAnonStruct) { + DeclContext *Owner, + RecordDecl *AnonRecord, + AccessSpecifier AS, + SmallVectorImpl<NamedDecl *> &Chaining, + bool MSAnonStruct) { unsigned diagKind = AnonRecord->isUnion() ? diag::err_anonymous_union_member_redecl : diag::err_anonymous_struct_member_redecl; diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 2aab22c9cff..4c18a330614 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -682,7 +682,7 @@ static void handleNoSanitizeThread(Sema &S, Decl *D, static bool checkAcquireOrderAttrCommon(Sema &S, Decl *D, const AttributeList &Attr, - SmallVector<Expr*, 1> &Args) { + SmallVectorImpl<Expr *> &Args) { assert(!Attr.isInvalid()); if (!checkAttributeAtLeastNumArgs(S, Attr, 1)) @@ -743,7 +743,7 @@ static void handleAcquiredBeforeAttr(Sema &S, Decl *D, static bool checkLockFunAttrCommon(Sema &S, Decl *D, const AttributeList &Attr, - SmallVector<Expr*, 1> &Args) { + SmallVectorImpl<Expr *> &Args) { assert(!Attr.isInvalid()); // zero or more arguments ok @@ -818,7 +818,7 @@ static void handleAssertExclusiveLockAttr(Sema &S, Decl *D, static bool checkTryLockFunAttrCommon(Sema &S, Decl *D, const AttributeList &Attr, - SmallVector<Expr*, 2> &Args) { + SmallVectorImpl<Expr *> &Args) { assert(!Attr.isInvalid()); if (!checkAttributeAtLeastNumArgs(S, Attr, 1)) @@ -872,7 +872,7 @@ static void handleExclusiveTrylockFunctionAttr(Sema &S, Decl *D, static bool checkLocksRequiredCommon(Sema &S, Decl *D, const AttributeList &Attr, - SmallVector<Expr*, 1> &Args) { + SmallVectorImpl<Expr *> &Args) { assert(!Attr.isInvalid()); if (!checkAttributeAtLeastNumArgs(S, Attr, 1)) diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 40aeefbf975..c35c1b4e644 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3919,7 +3919,7 @@ bool Sema::GatherArgumentsForCall(SourceLocation CallLoc, const FunctionProtoType *Proto, unsigned FirstProtoArg, ArrayRef<Expr *> Args, - SmallVector<Expr *, 8> &AllArgs, + SmallVectorImpl<Expr *> &AllArgs, VariadicCallType CallType, bool AllowExplicit, bool IsListInitialization) { diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 8c8831a14bb..e2a57f38294 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -6922,7 +6922,7 @@ ASTReader::ReadTemplateParameterList(ModuleFile &F, void ASTReader:: -ReadTemplateArgumentList(SmallVector<TemplateArgument, 8> &TemplArgs, +ReadTemplateArgumentList(SmallVectorImpl<TemplateArgument> &TemplArgs, ModuleFile &F, const RecordData &Record, unsigned &Idx) { unsigned NumTemplateArgs = Record[Idx++]; |