[PATCH] D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 04:17:09 PDT 2020


krasimir updated this revision to Diff 272964.
krasimir added a comment.

- refresh Phabricator diff


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82199

Files:
  clang/unittests/Format/FormatTest.cpp


Index: clang/unittests/Format/FormatTest.cpp
===================================================================
--- clang/unittests/Format/FormatTest.cpp
+++ clang/unittests/Format/FormatTest.cpp
@@ -6284,6 +6284,10 @@
 
   Style.AlignOperands = FormatStyle::OAS_DontAlign;
   Style.BreakBeforeTernaryOperators = false;
+  // FIXME: Aligning the question marks is weird given DontAlign.
+  // Consider disabling this alignment in this case. Also check whether this
+  // will render the adjustment from https://reviews.llvm.org/D82199
+  // unnecessary.
   verifyFormat("int x = aaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaa :\n"
                "    bbbb                ? cccccccccccccccccc :\n"
                "                          ddddd;\n",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82199.272964.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200624/f1294df3/attachment-0001.bin>


More information about the cfe-commits mailing list