owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2303
+static FormatToken *getLastNonComment(const UnwrappedLine &Line) {
+ for (const auto &Token : llvm::reverse(Line.Tokens))
+ if (Token.Tok->isNot(tok::comment))
----------------
HazardyKnusperkeks wrote:
> Get the last token, and if it's a comment `getPreviousNonComment()`?
Almost. I tried to use `getPreviousNonComment()` but sometimes got `nullptr`
when a nonnull was always expected (line 2316).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120217/new/
https://reviews.llvm.org/D120217
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits