DebugInfo: STN: Handle unreconstitutable types in function types

This commit is contained in:
David Blaikie 2021-09-23 21:13:16 -07:00
parent e70082e9ad
commit 8d9ddd4f50
2 changed files with 3 additions and 1 deletions

View File

@ -4881,7 +4881,7 @@ struct ReconstitutableType : public RecursiveASTVisitor<ReconstitutableType> {
bool VisitFunctionProtoType(FunctionProtoType *FT) {
// noexcept is not encoded in DWARF, so the reversi
Reconstitutable &= !isNoexceptExceptionSpec(FT->getExceptionSpecType());
return !Reconstitutable;
return Reconstitutable;
}
bool TraverseRecordType(RecordType *RT) {
// Unnamed classes/lambdas can't be reconstituted due to a lack of column

View File

@ -55,6 +55,8 @@ void f() {
} unnamed_struct;
f1<decltype(unnamed_struct)>();
// CHECK: !DISubprogram(name: "f1<(unnamed struct at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 3]]:3)>",
f1<void (decltype(unnamed_struct))>();
// CHECK: !DISubprogram(name: "f1<void ((unnamed struct at {{.*}}CodeGenCXX/debug-info-simple-template-names.cpp:[[# @LINE - 5]]:3))>",
enum {} unnamed_enum;
f1<decltype(unnamed_enum)>();
// CHECK: !DISubprogram(name: "f1<(unnamed enum at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 2]]:3)>",