diff options
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 8 |
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); } } } |