[PATCH] D150848: [clang-format] Respect ColumnLimit 0 lines breaks in inline asm
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 24 22:06:02 PDT 2023
owenpan accepted this revision.
owenpan added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:361
+ (Style.BreakBeforeInlineASMColon == FormatStyle::BBIAS_OnlyMultiline &&
+ Style.ColumnLimit != 0)))) {
return true;
----------------
FWIW.
================
Comment at: clang/unittests/Format/FormatTest.cpp:4622-4655
+ Style.BreakBeforeInlineASMColon = FormatStyle::BBIAS_OnlyMultiline;
+ verifyFormat("asm(\"xyz\" : \"=a\"(a), \"=d\"(b) : \"a\"(data));", Style);
+ EXPECT_EQ("asm(\"xyz\"\n"
+ " : \"=a\"(a), \"=d\"(b)\n"
+ " : \"a\"(data));",
+ format("asm(\"xyz\"\n"
+ " : \"=a\"(a), \"=d\"(b)\n"
----------------
FWIW, it's easier to read IMO.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150848/new/
https://reviews.llvm.org/D150848
More information about the cfe-commits
mailing list