Skip to content

Commit 6adc27e

Browse files
authored
Merge pull request #63941 from augusto2112/wrapped-in-extension
Always print ignored Cxx17 diag when printing name for debugger
2 parents 0c8cea6 + d7278e1 commit 6adc27e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/PrintAsClang/ClangSyntaxPrinter.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,13 @@ void ClangSyntaxPrinter::printKnownCType(
438438

439439
void ClangSyntaxPrinter::printSwiftMangledNameForDebugger(
440440
const NominalTypeDecl *typeDecl) {
441-
auto mangled_name =
442-
mangler.mangleTypeForDebugger(typeDecl->getDeclaredInterfaceType(), nullptr);
443-
if (!mangled_name.empty()) {
444-
os << " typedef char " << mangled_name << ";\n";
445-
os << " static inline constexpr " << mangled_name
446-
<< " $__swift_mangled_name = 0;\n";
447-
}
441+
printIgnoredCxx17ExtensionDiagnosticBlock([&]() {
442+
auto mangled_name = mangler.mangleTypeForDebugger(
443+
typeDecl->getDeclaredInterfaceType(), nullptr);
444+
if (!mangled_name.empty()) {
445+
os << " typedef char " << mangled_name << ";\n";
446+
os << " static inline constexpr " << mangled_name
447+
<< " $__swift_mangled_name = 0;\n";
448+
}
449+
});
448450
}

0 commit comments

Comments
 (0)