summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-08 18:45:14 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-08 18:45:14 +0000
commit23a6dcb365f5c6a9b803e9ab08088c67e2e55780 (patch)
tree00673f5d3476b95f4ce1691dbc32ba36c063bb4a /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent951b235be21c7dad91f5036f330560a9a0807c17 (diff)
downloadbcm5719-llvm-23a6dcb365f5c6a9b803e9ab08088c67e2e55780.tar.gz
bcm5719-llvm-23a6dcb365f5c6a9b803e9ab08088c67e2e55780.zip
[C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203353
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 259c0030d0a..93041a8cc90 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -733,9 +733,7 @@ void TemplateDeclInstantiator::InstantiateEnumDefinition(
SmallVector<Decl*, 4> Enumerators;
EnumConstantDecl *LastEnumConst = 0;
- for (EnumDecl::enumerator_iterator EC = Pattern->enumerator_begin(),
- ECEnd = Pattern->enumerator_end();
- EC != ECEnd; ++EC) {
+ for (auto *EC : Pattern->enumerators()) {
// The specified value for the enumerator.
ExprResult Value = SemaRef.Owned((Expr *)0);
if (Expr *UninstValue = EC->getInitExpr()) {
@@ -765,7 +763,7 @@ void TemplateDeclInstantiator::InstantiateEnumDefinition(
}
if (EnumConst) {
- SemaRef.InstantiateAttrs(TemplateArgs, *EC, EnumConst);
+ SemaRef.InstantiateAttrs(TemplateArgs, EC, EnumConst);
EnumConst->setAccess(Enum->getAccess());
Enum->addDecl(EnumConst);
@@ -776,7 +774,7 @@ void TemplateDeclInstantiator::InstantiateEnumDefinition(
!Enum->isScoped()) {
// If the enumeration is within a function or method, record the enum
// constant as a local.
- SemaRef.CurrentInstantiationScope->InstantiatedLocal(*EC, EnumConst);
+ SemaRef.CurrentInstantiationScope->InstantiatedLocal(EC, EnumConst);
}
}
}
OpenPOWER on IntegriCloud