[PATCH] D116190: Comment parsing: Don't recognize commands in single-line double quotation

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 14 09:12:30 PST 2022


gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/AST/CommentLexer.cpp:278
+
+again:
+  size_t End =
----------------
aaronpuchert wrote:
> gribozavr2 wrote:
> > I'd suggest refactoring to a `while (true)` if you don't mind.
> I was imitating `lexVerbatimBlockFirstLine`, but I don't mind either way.
I see. No worries then.


================
Comment at: clang/lib/AST/CommentLexer.cpp:290
+    if (End != StringRef::npos && *(TokenPtr + End) == '\"')
+      TokenPtr += End + 1;
+    goto again;
----------------
aaronpuchert wrote:
> gribozavr2 wrote:
> > Does Doxygen understand escaped quotes?
> > 
> > ```
> > /// "@hello\"@hello"
> > ```
> Vim syntax highlighting suggests it does, but at least my version actually doesn't: `"@c a \" @c b"` is translated to `"@c a \" <code>b"</code>`. So the escaped quote seems to end the quotation.
Got it, thanks for checking!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116190



More information about the cfe-commits mailing list