diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 16:05:56 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 16:05:56 +0000 |
| commit | b8733c5ba4b0bfca39ac34a8cc9975744313582b (patch) | |
| tree | 7a8e495a1471dc3f6d5eebce7ce96d60b6b32c37 /clang/lib | |
| parent | 2205d2a56a5f77f40c0856eef2a3325c5f78bb50 (diff) | |
| download | bcm5719-llvm-b8733c5ba4b0bfca39ac34a8cc9975744313582b.tar.gz bcm5719-llvm-b8733c5ba4b0bfca39ac34a8cc9975744313582b.zip | |
[C++11] Replacing FunctionTemplateDecl iterators spec_begin() and spec_end() with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203938
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 7 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index bbe777b93c9..c0df591b3d5 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -885,10 +885,9 @@ void DeclPrinter::VisitTemplateDecl(const TemplateDecl *D) { void DeclPrinter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { if (PrintInstantiation) { TemplateParameterList *Params = D->getTemplateParameters(); - for (FunctionTemplateDecl::spec_iterator I = D->spec_begin(), E = D->spec_end(); - I != E; ++I) { - PrintTemplateParameters(Params, (*I)->getTemplateSpecializationArgs()); - Visit(*I); + for (auto *I : D->specializations()) { + PrintTemplateParameters(Params, I->getTemplateSpecializationArgs()); + Visit(I); } } diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 45001fc36e7..2b81b3789ef 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1151,11 +1151,9 @@ CollectCXXMemberFunctions(const CXXRecordDecl *RD, llvm::DIFile Unit, // Add any template specializations that have already been seen. Like // implicit member functions, these may have been added to a declaration // in the case of vtable-based debug info reduction. - for (FunctionTemplateDecl::spec_iterator SI = FTD->spec_begin(), - SE = FTD->spec_end(); - SI != SE; ++SI) { + for (const auto *SI : FTD->specializations()) { llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator MI = - SPCache.find(cast<CXXMethodDecl>(*SI)->getCanonicalDecl()); + SPCache.find(cast<CXXMethodDecl>(SI)->getCanonicalDecl()); if (MI != SPCache.end()) EltTys.push_back(MI->second); } |

