[PATCH] D91950: [clang-format] Add BreakBeforeInlineASMColon configuration

Anastasiia Lukianenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 3 02:25:55 PDT 2021


anastasiia_lukianenko added inline comments.


================
Comment at: clang/lib/Format/Format.cpp:1022
   LLVMStyle.BreakBeforeConceptDeclarations = true;
+  LLVMStyle.BreakBeforeInlineASMColon = FormatStyle::BBIAS_OnlyMultiline;
   LLVMStyle.BreakBeforeTernaryOperators = true;
----------------
MyDeveloperDay wrote:
> Are we happy that is the correct default? didn't it always break before?
It didn't always break before. Old tests in FormatsInlineASM block prove this:


```
verifyFormat("asm(\"nop\" ::: \"memory\");");
  verifyFormat(
      "asm(\"movq\\t%%rbx, %%rsi\\n\\t\"\n"
      "    \"cpuid\\n\\t\"\n"
      "    \"xchgq\\t%%rbx, %%rsi\\n\\t\"\n"
      "    : \"=a\"(*rEAX), \"=S\"(*rEBX), \"=c\"(*rECX), \"=d\"(*rEDX)\n"
      "    : \"a\"(value));");
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91950/new/

https://reviews.llvm.org/D91950



More information about the cfe-commits mailing list