@@ -357,7 +357,9 @@ static void writeDeclCommentTable(
357357 if (!D->canHaveComment ())
358358 return false ;
359359
360- // Skip the decl if it does not have a comment.
360+ // Skip the decl if it does not have a comment. Note this means
361+ // we'll only serialize "direct" brief comments, but that's okay
362+ // because clients can compute the semantic brief comment themselves.
361363 if (D->getRawComment ().Comments .empty ())
362364 return false ;
363365 return true ;
@@ -372,9 +374,8 @@ static void writeDeclCommentTable(
372374 return ;
373375 }
374376 generator.insert (copyString (USRBuffer.str ()),
375- { ED->getBriefComment (), ED->getRawComment (),
376- GroupContext.getGroupSequence (ED),
377- SourceOrder++ });
377+ {ED->getSemanticBriefComment (), ED->getRawComment (),
378+ GroupContext.getGroupSequence (ED), SourceOrder++});
378379 }
379380
380381 MacroWalking getMacroWalkingBehavior () const override {
@@ -407,9 +408,8 @@ static void writeDeclCommentTable(
407408 }
408409
409410 generator.insert (copyString (USRBuffer.str ()),
410- { VD->getBriefComment (), D->getRawComment (),
411- GroupContext.getGroupSequence (VD),
412- SourceOrder++ });
411+ {VD->getSemanticBriefComment (), D->getRawComment (),
412+ GroupContext.getGroupSequence (VD), SourceOrder++});
413413 return Action::Continue ();
414414 }
415415
0 commit comments