Previously, clang-format would consider the following code line to be part of
the comment and incorrectly format the rest of the file.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lg
lib/Format/FormatTokenLexer.cpp | ||
---|---|---|
544–545 ↗ | (On Diff #109145) | Just wondering whether the \n can be in the next token. Probably not, though, the way we set up the lexer. |
lib/Format/FormatTokenLexer.cpp | ||
---|---|---|
544–545 ↗ | (On Diff #109145) | AFAIU (and experimentation confirms) LLVM always lexes the \n as separate whitespace from the // ... line comment, but for backslash escaped line endings after the \\ the \n is inside of it - after all it's part of the one comment token that continues on the next line. |