forked from OSchip/llvm-project
Correctly unwrap 'auto' types. Fixes PR9414.
llvm-svn: 127121
This commit is contained in:
parent
5022863fd8
commit
829c4134b8
|
@ -1374,6 +1374,9 @@ static QualType UnwrapTypeForDebugInfo(QualType T) {
|
|||
case Type::SubstTemplateTypeParm:
|
||||
T = cast<SubstTemplateTypeParmType>(T)->getReplacementType();
|
||||
break;
|
||||
case Type::Auto:
|
||||
T = cast<AutoType>(T)->getDeducedType();
|
||||
break;
|
||||
}
|
||||
|
||||
assert(T != LastT && "Type unwrapping failed to unwrap!");
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// RUN: %clang_cc1 -emit-llvm-only -std=c++0x -g %s
|
||||
|
||||
namespace PR9414 {
|
||||
int f() {
|
||||
auto x = 0;
|
||||
return x;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue