[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 12:26:47 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/include/clang/AST/RawCommentList.h:122
+    StringRef Text = getRawText(SourceMgr);
+    if (Text.size() < 6 || Text[0] != '/')
+      return false;
----------------
aaron.ballman wrote:
> Just to double-check, we don't have to worry about there being leading whitespace in `Text` do we?
Afaict, we always have a valid comment, starting with / (and ending with / for a multi line comment). We might not have a comment valid for documentation purposes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148029/new/

https://reviews.llvm.org/D148029



More information about the cfe-commits mailing list