diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 15:55:35 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 15:55:35 +0000 |
commit | 714b9962604d459f04758b88bd45a4f708b6f130 (patch) | |
tree | b545ca13fe997aadfa15f35b70cec5b625659263 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | e385112444b7202cc7869825eb66efb6fed70940 (diff) |
[C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index c17eb19853..5ea21ff14a 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2305,10 +2305,8 @@ Decl *TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl( Decl *TemplateDeclInstantiator::VisitOMPThreadPrivateDecl( OMPThreadPrivateDecl *D) { SmallVector<Expr *, 5> Vars; - for (ArrayRef<Expr *>::iterator I = D->varlist_begin(), - E = D->varlist_end(); - I != E; ++I) { - Expr *Var = SemaRef.SubstExpr(*I, TemplateArgs).take(); + for (auto *I : D->varlists()) { + Expr *Var = SemaRef.SubstExpr(I, TemplateArgs).take(); assert(isa<DeclRefExpr>(Var) && "threadprivate arg is not a DeclRefExpr"); Vars.push_back(Var); } |