llvm-project
dd47b845 - [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (#145243)

Commit
81 days ago
[clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (#145243) Fixes #145226. Implement [P2223R2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2223r2.pdf) in clang-format to correctly handle cases where a backslash '\\' is followed by trailing whitespace before the newline. Previously, `clang-format` failed to properly detect and handle such cases, leading to misformatted code. With this, `clang-format` matches the behavior already implemented in Clang's lexer and `DependencyDirectivesScanner.cpp`, which allow trailing whitespace after a line continuation in any C++ standard.
Author
Parents
Loading