diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2011-11-22 20:00:10 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2011-11-22 20:00:10 +0000 |
commit | 1e855657867e95c8302f55de3f63409f9b1927c3 (patch) | |
tree | cd277f284a7f5498b6604e9f84fb6a562520807c /lib/AST/TypeLoc.cpp | |
parent | 3f6f4e65e7806fd49137cf3cf59a1432ed776b2a (diff) |
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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeLoc.cpp')
-rw-r--r-- | lib/AST/TypeLoc.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/AST/TypeLoc.cpp b/lib/AST/TypeLoc.cpp index 9bdea433a9..97b0b501aa 100644 --- a/lib/AST/TypeLoc.cpp +++ b/lib/AST/TypeLoc.cpp @@ -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, } } } - |