Skip to content

Commit 2bfb95f

Browse files
authored
Merge pull request swiftlang#36506 from rintaro/quickfix-rdar75010520
[IDE] Explicitly specify 'SerializedOK=false' to 'getRawComment()'
2 parents b34a235 + c991347 commit 2bfb95f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class SwiftDocWordExtractor : public MarkupASTWalker {
261261

262262
void getSwiftDocKeyword(const Decl* D, CommandWordsPairs &Words) {
263263
auto Interested = false;
264-
for (auto C : D->getRawComment().Comments) {
264+
for (auto C : D->getRawComment(/*SerializedOK=*/false).Comments) {
265265
if (containsInterestedWords(C.RawText, "-", /*AllowWhitespace*/true)) {
266266
Interested = true;
267267
break;

lib/IDE/IDETypeChecking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ struct SynthesizedExtensionAnalyzer::Implementation {
264264
ExtensionDecl *EnablingExt, NormalProtocolConformance *Conf) {
265265
SynthesizedExtensionInfo Result(IsSynthesized, EnablingExt);
266266
ExtensionMergeInfo MergeInfo;
267-
MergeInfo.Unmergable = !Ext->getRawComment().isEmpty() || // With comments
267+
MergeInfo.Unmergable = !Ext->getRawComment(/*SerializedOK=*/false).isEmpty() || // With comments
268268
Ext->getAttrs().hasAttribute<AvailableAttr>(); // With @available
269269
MergeInfo.InheritsCount = countInherits(Ext);
270270

lib/IDE/ModuleInterfacePrinting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ static SourceLoc getDeclStartPosition(SourceFile &File) {
810810
for (auto D : File.getTopLevelDecls()) {
811811
if (tryUpdateStart(D->getStartLoc())) {
812812
tryUpdateStart(D->getAttrs().getStartLoc());
813-
auto RawComment = D->getRawComment();
813+
auto RawComment = D->getRawComment(/*SerializedOK=*/false);
814814
if (!RawComment.isEmpty())
815815
tryUpdateStart(RawComment.Comments.front().Range.getStart());
816816
}

lib/IDE/SwiftSourceDocInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ bool NameMatcher::handleCustomAttrs(Decl *D) {
198198

199199
bool NameMatcher::walkToDeclPre(Decl *D) {
200200
// Handle occurrences in any preceding doc comments
201-
RawComment R = D->getRawComment();
201+
RawComment R = D->getRawComment(/*SerializedOK=*/false);
202202
if (!R.isEmpty()) {
203203
for(SingleRawComment C: R.Comments) {
204204
while(!shouldSkip(C.Range))

lib/IDE/SyntaxModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ CharSourceRange parameterNameRangeOfCallArg(const TupleExpr *TE,
513513
static void setDecl(SyntaxStructureNode &N, Decl *D) {
514514
N.Dcl = D;
515515
N.Attrs = D->getAttrs();
516-
N.DocRange = D->getRawComment().getCharSourceRange();
516+
N.DocRange = D->getRawComment(/*SerializedOK=*/false).getCharSourceRange();
517517
}
518518

519519
} // anonymous namespace

0 commit comments

Comments
 (0)