Drop SerializedOK parameter from getRawComment

It doesn't seem like there's any client that's
actually taking advantage of setting it to `false`,
and its default value of `false` is more likely
than not going to cause clients to accidentally
miss comments that they may want. In fact, this
was exactly the case for code completion's brief
field. Finally, the parameter wasn't even
consistently applied, as we would attempt to
deserialize swiftdoc comments even if it were
`false`.
This commit is contained in:
Hamish Knight
2023-04-26 12:38:37 +01:00
parent f80c472ce2
commit c1843479f1
11 changed files with 52 additions and 73 deletions

View File

@@ -829,7 +829,7 @@ static SourceLoc getDeclStartPosition(SourceFile &File) {
for (auto D : File.getTopLevelDecls()) {
if (tryUpdateStart(D->getStartLoc())) {
tryUpdateStart(D->getAttrs().getStartLoc());
auto RawComment = D->getRawComment(/*SerializedOK=*/false);
auto RawComment = D->getRawComment();
if (!RawComment.isEmpty())
tryUpdateStart(RawComment.Comments.front().Range.getStart());
}