diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 7119402dcb64f7..100ce695f86b3b 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -4881,7 +4881,7 @@ struct ReconstitutableType : public RecursiveASTVisitor { 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 diff --git a/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp b/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp index 98109bc93f0066..be290b3b97e565 100644 --- a/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp +++ b/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp @@ -55,6 +55,8 @@ void f() { } unnamed_struct; f1(); // CHECK: !DISubprogram(name: "f1<(unnamed struct at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 3]]:3)>", + f1(); + // CHECK: !DISubprogram(name: "f1", enum {} unnamed_enum; f1(); // CHECK: !DISubprogram(name: "f1<(unnamed enum at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 2]]:3)>",