diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-22 00:13:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-22 00:13:14 +0000 |
commit | a0abc4291178d97662f9b346863f692ecc72c803 (patch) | |
tree | d9c13d9a580c528d81fa8f2be43dde0d619b6e00 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 98eafd67d5657d4d8f28996b32a24235e4396dc7 (diff) | |
download | bcm5719-llvm-a0abc4291178d97662f9b346863f692ecc72c803.tar.gz bcm5719-llvm-a0abc4291178d97662f9b346863f692ecc72c803.zip |
Fix assertion failure when generating debug information for a variable
declaration declared using class template argument deduction.
Patch by Eric Fiselier (who is busy and asked me to commit this on his behalf)!
Differential Revision: https://reviews.llvm.org/D30082
llvm-svn: 295794
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 252ee8d71d9..acfe0a4d7d0 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2475,8 +2475,9 @@ static QualType UnwrapTypeForDebugInfo(QualType T, const ASTContext &C) { case Type::SubstTemplateTypeParm: T = cast<SubstTemplateTypeParmType>(T)->getReplacementType(); break; - case Type::Auto: { - QualType DT = cast<AutoType>(T)->getDeducedType(); + case Type::Auto: + case Type::DeducedTemplateSpecialization: { + QualType DT = cast<DeducedType>(T)->getDeducedType(); assert(!DT.isNull() && "Undeduced types shouldn't reach here."); T = DT; break; |