[clang] [clang-format] Allow line breaking with PointerAlignment configured (PR #164686)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 27 11:57:20 PDT 2025
================
@@ -8644,6 +8644,28 @@ TEST_F(FormatTest, BreaksFunctionDeclarations) {
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}",
Style);
+ Style.ColumnLimit = 70;
+ verifyFormat(
+ "void foo(const MySuperSuperSuperSuperSuperSuperSuperSuperLongTypeName*\n"
+ " my_super_super_super_super_long_variable_name) {}",
+ Style);
+ verifyFormat(
+ "void foo(const MySuperSuperSuperSuperSuperSuperSuperSuperLongTypeName*\n"
+ " const my_super_super_super_super_long_variable_name) {}",
----------------
sstwcw wrote:
The bug report says that they should be on separate lines because they can't fit on the same line. I don't see how to satisfy the requirement. Please post the formatted code.
https://github.com/llvm/llvm-project/pull/164686
More information about the cfe-commits
mailing list