[clang] [clang-format] Fix repeated backslash insertion in macro line comments (PR #164300)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 20 12:58:14 PDT 2025


================
@@ -1178,8 +1180,9 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
     }
     unsigned Newlines =
         std::max(1u, std::min(Current.NewlinesBefore, MaxEmptyLinesToKeep));
-    bool ContinuePPDirective =
-        State.Line->InPPDirective && State.Line->Type != LT_ImportStatement;
+    bool ContinuePPDirective = State.Line->InPPDirective &&
----------------
HazardyKnusperkeks wrote:

```suggestion
    const bool ContinuePPDirective = State.Line->InPPDirective &&
```
While at it.

https://github.com/llvm/llvm-project/pull/164300


More information about the cfe-commits mailing list