[clang] [clang-format] Stop inserting blank line in disabled region (PR #201995)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 6 12:12:06 PDT 2026


================
@@ -88,6 +88,8 @@ void DefinitionBlockSeparator::separateBlocks(
       assert(TargetLine);
       assert(TargetToken);
 
+      if (TargetToken->FinalizedNewLinesBefore)
----------------
HazardyKnusperkeks wrote:

```suggestion
      if (isClangFormatOn(TargetToken->TokenText))
```
This way we don't need a to add bool to all tokens, just to state exactly this.

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


More information about the cfe-commits mailing list