[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes
Ben Harper via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 00:52:53 PDT 2016
bmharper updated this revision to Diff 72444.
bmharper added a comment.
This revision merges NestingLevel and IndentLevel into an std::pair, as suggested by @djasper.
IMO this makes the code slightly harder to read, because you lose the unique variable names "IndentLevel" and "NestingLevel". Those are now replaced by .first and .second, respectively. In addition, NestingLevel is no longer equal to the original NestingLevel that gets passed in, because it needs to be tweaked slightly to better work with the recursive technique we use for alignment scope.
However, the approach presented here certainly does work, and it's actually not too much of a code change from the previous patch.
https://reviews.llvm.org/D21279
Files:
lib/Format/WhitespaceManager.cpp
lib/Format/WhitespaceManager.h
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21279.72444.patch
Type: text/x-patch
Size: 25487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160926/d2346a32/attachment-0001.bin>
More information about the cfe-commits
mailing list