[clang] [clang-format][NFC] Annotate attribute squares more effectively (PR #164052)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 18 22:14:06 PDT 2025


================
@@ -6453,8 +6448,8 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
        Left.getPrecedence() == prec::Assignment)) {
     return true;
   }
----------------
owenca wrote:

```suggestion
  }
  if (Left.is(TT_AttributeLSquare) && Right.is(tok::l_square)) {
    assert(Right.isNot(TT_AttributeLSquare));
    return false;
  }
```
The deleted/replaced two lines below (lines 6456-6457) were for both `[[` and `]]`.

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


More information about the cfe-commits mailing list