Skip to content

Commit 8d9ddd4

Browse files
committed
DebugInfo: STN: Handle unreconstitutable types in function types
1 parent e70082e commit 8d9ddd4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4881,7 +4881,7 @@ struct ReconstitutableType : public RecursiveASTVisitor<ReconstitutableType> {
48814881
bool VisitFunctionProtoType(FunctionProtoType *FT) {
48824882
// noexcept is not encoded in DWARF, so the reversi
48834883
Reconstitutable &= !isNoexceptExceptionSpec(FT->getExceptionSpecType());
4884-
return !Reconstitutable;
4884+
return Reconstitutable;
48854885
}
48864886
bool TraverseRecordType(RecordType *RT) {
48874887
// Unnamed classes/lambdas can't be reconstituted due to a lack of column

clang/test/CodeGenCXX/debug-info-simple-template-names.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ void f() {
5555
} unnamed_struct;
5656
f1<decltype(unnamed_struct)>();
5757
// CHECK: !DISubprogram(name: "f1<(unnamed struct at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 3]]:3)>",
58+
f1<void (decltype(unnamed_struct))>();
59+
// CHECK: !DISubprogram(name: "f1<void ((unnamed struct at {{.*}}CodeGenCXX/debug-info-simple-template-names.cpp:[[# @LINE - 5]]:3))>",
5860
enum {} unnamed_enum;
5961
f1<decltype(unnamed_enum)>();
6062
// CHECK: !DISubprogram(name: "f1<(unnamed enum at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 2]]:3)>",

0 commit comments

Comments
 (0)