A follow-up to
https://github.com/llvm/llvm-project/commit/f6bc614546e169bb1b17a29c422ebace038e6c62
where we handle the case where the semicolon is followed by a trailing
comment.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I thought of it last time but didn't try hard to come up with a test case that would make a difference. :( Thanks for finding the hole!
| clang/lib/Format/TokenAnnotator.cpp | ||
|---|---|---|
| 2486–2487 | if (Next->Next && Next->Next->is(tok::identifier) &&
!Line.endsWith(tok::semi))
return true; | |
if (Next->Next && Next->Next->is(tok::identifier) && !Line.endsWith(tok::semi)) return true;