diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 98da920a8fae..7a12c4da9516 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -373,7 +373,7 @@ isTemplate(const NamedDecl *ND, dyn_cast(ND)) { TypeSourceInfo *TSI = Spec->getTypeAsWritten(); if (TSI) { - TemplateSpecializationTypeLoc &TSTL = + TemplateSpecializationTypeLoc TSTL = cast(TSI->getTypeLoc()); TemplateArgumentListInfo LI(TSTL.getLAngleLoc(), TSTL.getRAngleLoc()); for (unsigned i = 0, e = TSTL.getNumArgs(); i != e; ++i)