Provide better source info for template specializations with non-type arguments.

This fixes a crasher in tools like Include-What-You-Use which examine such
arguments. Patch from Dean Sturtevant at Google!

llvm-svn: 145077
This commit is contained in:
Matt Beaumont-Gay 2011-11-22 20:00:10 +00:00
parent f281702686
commit 31fcb9f291
1 changed files with 1 additions and 3 deletions

View File

@ -304,8 +304,7 @@ void TemplateSpecializationTypeLoc::initializeArgLocs(ASTContext &Context,
case TemplateArgument::Integral:
case TemplateArgument::Pack:
case TemplateArgument::Expression:
// FIXME: Can we do better for declarations and integral values?
ArgInfos[i] = TemplateArgumentLocInfo();
ArgInfos[i] = TemplateArgumentLocInfo(Args[i].getAsExpr());
break;
case TemplateArgument::Type:
@ -334,4 +333,3 @@ void TemplateSpecializationTypeLoc::initializeArgLocs(ASTContext &Context,
}
}
}