[clang] [clang-format] Fix missing indentation for assignment with attributes (PR #230417)
Priyanshu Ranjan via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 9 22:44:14 PDT 2026
================
@@ -7790,6 +7790,15 @@ TEST_F(FormatTest, BreakBinaryOperatorsInPresenceOfTemplates) {
" and is_swappable_v<hash<T>>\n"
" and is_callable_v<hash<T>(T)>;",
Style);
+
+ FormatStyle Style80 = getLLVMStyle();
----------------
priyanshujaiz wrote:
Thank you for the feedback. I've updated the test to use a dedicated `FormatTest.BreakBinaryOperatorsAfterAttributes` block and reduced the column limit to 25.
I verified the formatting using the locally built `clang-format` binary. With this limit, the variable declarations remain intact on the first line, while the complete statements exceed the column limit and cause the `=` operator to move to the next line. This keeps the test focused on the intended continuation indentation behavior without introducing unwanted breaks within the declarations.
The updated test now reproduces the intended formatting scenario with shorter, more targeted inputs.
https://github.com/llvm/llvm-project/pull/230417
More information about the cfe-commits
mailing list