Skip to content

Commit 3855855

Browse files
committed
[AST] Disable comment printing while emitting diagnostics
There is a problem in PCH builds where source manager might end up having unorderable source locations for comments, to work around this (which is going to be fixed separately) let's disable comment printing while emitting diagnostics since such comments are not required. Resolves: rdar://problem/38203776 (cherry picked from commit 28d9d8e)
1 parent b2d7fb9 commit 3855855

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/swift/AST/PrintOptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ struct PrintOptions {
397397
result.PrintIfConfig = false;
398398
result.ShouldQualifyNestedDeclarations =
399399
QualifyNestedDeclarations::TypesOnly;
400+
result.PrintDocumentationComments = false;
400401
return result;
401402
}
402403

@@ -413,6 +414,7 @@ struct PrintOptions {
413414
result.ElevateDocCommentFromConformance = true;
414415
result.ShouldQualifyNestedDeclarations =
415416
QualifyNestedDeclarations::Always;
417+
result.PrintDocumentationComments = true;
416418
return result;
417419
}
418420

0 commit comments

Comments
 (0)