owenpan added inline comments.
================ Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2449 } else { - addUnwrappedLine(); - ++Line->Level; - parseStructuralElement(); - if (FormatTok->is(tok::eof)) - addUnwrappedLine(); - --Line->Level; + parseUnbracedBody(/*CheckEOF=*/true); } ---------------- curdeius wrote: > Is it possible to get rid of the `CheckEOF` parameter and do `if > (FormatTok->is(tok::eof)) addUnwrappedLine();` only here? > (I'm unsure about the dependency between `Line` and `addUnwrappedLine`) Unfortunately, no. Decrementing `Line->Level` before calling `addUnwrappedLine()` would fail `MacroDefinitionsWithIncompleteCode` in `FormatTest.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120217/new/ https://reviews.llvm.org/D120217 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits