Skip to content

Commit dabe945

Browse files
authored
Merge pull request #40902 from DougGregor/name-import-no-diagnose-pretty-print-5.6
[Clang importer] Don't emit diagnostics while pretty-printing.
2 parents 46c2e8d + bc1ed92 commit dabe945

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)