Skip to content

Commit 28d9d8e

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
1 parent d3f6b87 commit 28d9d8e

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
@@ -402,6 +402,7 @@ struct PrintOptions {
402402
result.PrintIfConfig = false;
403403
result.ShouldQualifyNestedDeclarations =
404404
QualifyNestedDeclarations::TypesOnly;
405+
result.PrintDocumentationComments = false;
405406
return result;
406407
}
407408

@@ -418,6 +419,7 @@ struct PrintOptions {
418419
result.ElevateDocCommentFromConformance = true;
419420
result.ShouldQualifyNestedDeclarations =
420421
QualifyNestedDeclarations::Always;
422+
result.PrintDocumentationComments = true;
421423
return result;
422424
}
423425

0 commit comments

Comments
 (0)