[PATCH] D114142: [clang-format] [PR52527] can join * with /* to form an outside of comment error C4138
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 18 02:15:20 PST 2021
MyDeveloperDay added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3219
+ // of comment.
+ if (Left.is(tok::star) && Right.is(TT_BlockComment))
+ return true;
----------------
owenpan wrote:
> Isn't `tok::comment` better than `TT_BlockComment` if a space is also required between `*` and `//`?
I guess for formatting as we type, then perhaps that might be better, I just couldn't think of a use case for legal code where * would be the last value on the line, but perhaps
```
void foo(int * // this is the first parameter
,int second);
```
Let me add that as a test and update the review.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114142/new/
https://reviews.llvm.org/D114142
More information about the cfe-commits
mailing list