From 8ac06afa9bdcc155fc469d3e7309fadf22b12686 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 22 Feb 2012 09:38:11 +0000 Subject: [PATCH] ArrayRef-icize the function arguments. llvm-svn: 151151 --- clang/include/clang/Sema/Sema.h | 2 +- clang/lib/Sema/JumpDiagnostics.cpp | 5 ++--- clang/lib/Sema/SemaTemplateDeduction.cpp | 2 +- clang/lib/Sema/SemaTemplateVariadic.cpp | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index d908937b631d..19db26dd5a89 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -4496,7 +4496,7 @@ public: /// \param Unexpanded the set of unexpanded parameter packs. void DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, - const SmallVectorImpl &Unexpanded); + ArrayRef Unexpanded); /// \brief If the given type contains an unexpanded parameter pack, /// diagnose the error. diff --git a/clang/lib/Sema/JumpDiagnostics.cpp b/clang/lib/Sema/JumpDiagnostics.cpp index 54013a8e9c7d..9a1d023fec6b 100644 --- a/clang/lib/Sema/JumpDiagnostics.cpp +++ b/clang/lib/Sema/JumpDiagnostics.cpp @@ -74,7 +74,7 @@ private: void VerifyJumps(); void VerifyIndirectJumps(); - void NoteJumpIntoScopes(const SmallVectorImpl &ToScopes); + void NoteJumpIntoScopes(ArrayRef ToScopes); void DiagnoseIndirectJump(IndirectGotoStmt *IG, unsigned IGScope, LabelDecl *Target, unsigned TargetScope); void CheckJump(Stmt *From, Stmt *To, SourceLocation DiagLoc, @@ -669,8 +669,7 @@ static void DiagnoseIndirectJumpStmt(Sema &S, IndirectGotoStmt *Jump, } /// Produce note diagnostics for a jump into a protected scope. -void JumpScopeChecker::NoteJumpIntoScopes( - const SmallVectorImpl &ToScopes) { +void JumpScopeChecker::NoteJumpIntoScopes(ArrayRef ToScopes) { assert(!ToScopes.empty()); for (unsigned I = 0, E = ToScopes.size(); I != E; ++I) if (Scopes[ToScopes[I]].InDiag) diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index fa66a5a17918..f2051e929814 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -548,7 +548,7 @@ static TemplateParameter makeTemplateParameter(Decl *D) { /// arguments in a set of argument packs. static void PrepareArgumentPackDeduction(Sema &S, SmallVectorImpl &Deduced, - const SmallVectorImpl &PackIndices, + ArrayRef PackIndices, SmallVectorImpl &SavedPacks, SmallVectorImpl< SmallVector > &NewlyDeducedPacks) { diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp index 972f2236bd4f..15a308575a0b 100644 --- a/clang/lib/Sema/SemaTemplateVariadic.cpp +++ b/clang/lib/Sema/SemaTemplateVariadic.cpp @@ -158,7 +158,7 @@ namespace { void Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, - const SmallVectorImpl &Unexpanded) { + ArrayRef Unexpanded) { if (Unexpanded.empty()) return;