Skip to content

Commit cc3fc4a

Browse files
committed
[Clang importer] Don't emit diagnostics while pretty-printing.
We missed a spot during name importing to check this flag. Since we don't have a ClangImporter instance directly available, just check the flag. Fixes rdar://87718892.
1 parent ad9ce5e commit cc3fc4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/ClangImporter/ImportName.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ namespace {
416416
else
417417
nameStr = cast<clang::ObjCPropertyDecl>(decl)->getName().str();
418418
for (unsigned i = 1, n = overriddenNames.size(); i != n; ++i) {
419+
if (ctx.Diags.isPrettyPrintingDecl())
420+
continue;
421+
419422
ctx.Diags.diagnose(SourceLoc(), diag::inconsistent_swift_name,
420423
method == nullptr,
421424
nameStr,

0 commit comments

Comments
 (0)