diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 5510f96596f5..01f9ffc5be5a 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -1101,15 +1101,11 @@ MicrosoftCXXNameMangler::mangleExpression(const Expr *E) { << E->getStmtClassName() << E->getSourceRange(); } -void -MicrosoftCXXNameMangler::mangleTemplateArgs(const TemplateDecl *TD, - const TemplateArgumentList &TemplateArgs) { +void MicrosoftCXXNameMangler::mangleTemplateArgs( + const TemplateDecl *TD, const TemplateArgumentList &TemplateArgs) { // ::= + @ - unsigned NumTemplateArgs = TemplateArgs.size(); - for (unsigned i = 0; i < NumTemplateArgs; ++i) { - const TemplateArgument &TA = TemplateArgs[i]; + for (const TemplateArgument &TA : TemplateArgs.asArray()) mangleTemplateArg(TD, TA); - } Out << '@'; }