[PATCH] D50403: [clang-format]AlignConsecutiveAssignments

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 17 19:17:15 PDT 2018


krasimir added inline comments.


================
Comment at: include/clang/Format/Format.h:85
+  /// matching assignment operators. This includes consecutive |=, +=
+  /// -=, /=, *=. This will result in formattings like
   /// \code
----------------
Please add tests for these. Also it's not clear from these examples how would a block of lines using assigments spanning different number of columns would be alined, as in:
```
aaa = 1;
bb += 2;
c <<= 3;
```
vs.
```
aaa = 1;
bb  += 2;
c   <<= 3;
```

I think this might deserve discussion by itself before this patch can get in (personally, I'm in favor of the first version where the right hand sides are alined).


Repository:
  rC Clang

https://reviews.llvm.org/D50403





More information about the cfe-commits mailing list