diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-02-22 09:38:11 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-02-22 09:38:11 +0000 |
commit | 4fe5be028b723fedc28bb33be96cde1ab2574ee6 (patch) | |
tree | b95e6a6f98d1cd52f0934bb4bc0d78e35afc3e69 | |
parent | 795b10062c2eaffae9e04241fb1a73cdbcb24a37 (diff) |
ArrayRef-icize the function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151151 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Sema/Sema.h | 2 | ||||
-rw-r--r-- | lib/Sema/JumpDiagnostics.cpp | 5 | ||||
-rw-r--r-- | lib/Sema/SemaTemplateDeduction.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaTemplateVariadic.cpp | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index d908937b63..19db26dd5a 100644 --- a/include/clang/Sema/Sema.h +++ b/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<UnexpandedParameterPack> &Unexpanded); + ArrayRef<UnexpandedParameterPack> Unexpanded); /// \brief If the given type contains an unexpanded parameter pack, /// diagnose the error. diff --git a/lib/Sema/JumpDiagnostics.cpp b/lib/Sema/JumpDiagnostics.cpp index 54013a8e9c..9a1d023fec 100644 --- a/lib/Sema/JumpDiagnostics.cpp +++ b/lib/Sema/JumpDiagnostics.cpp @@ -74,7 +74,7 @@ private: void VerifyJumps(); void VerifyIndirectJumps(); - void NoteJumpIntoScopes(const SmallVectorImpl<unsigned> &ToScopes); + void NoteJumpIntoScopes(ArrayRef<unsigned> 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<unsigned> &ToScopes) { +void JumpScopeChecker::NoteJumpIntoScopes(ArrayRef<unsigned> ToScopes) { assert(!ToScopes.empty()); for (unsigned I = 0, E = ToScopes.size(); I != E; ++I) if (Scopes[ToScopes[I]].InDiag) diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index fa66a5a179..f2051e9298 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/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<DeducedTemplateArgument> &Deduced, - const SmallVectorImpl<unsigned> &PackIndices, + ArrayRef<unsigned> PackIndices, SmallVectorImpl<DeducedTemplateArgument> &SavedPacks, SmallVectorImpl< SmallVector<DeducedTemplateArgument, 4> > &NewlyDeducedPacks) { diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp index 972f2236bd..15a308575a 100644 --- a/lib/Sema/SemaTemplateVariadic.cpp +++ b/lib/Sema/SemaTemplateVariadic.cpp @@ -158,7 +158,7 @@ namespace { void Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, - const SmallVectorImpl<UnexpandedParameterPack> &Unexpanded) { + ArrayRef<UnexpandedParameterPack> Unexpanded) { if (Unexpanded.empty()) return; |