[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes
Beren Minor via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 02:18:28 PDT 2016
berenm added a comment.
In http://reviews.llvm.org/D21279#462578, @bmharper wrote:
> 2. friend functions: I don't really understand why the current behavior is what it is, but I think it's reasonable to argue that it actually improves readability by drawing attention to the fact these are friend functions, which ought to be quite rare in most code
Actually it looks like it works now... I'm not sure what I did when I had this misalignment. It would have been fine by me anyway.
Regarding constructors, your comment seems reasonable to me. The patch already improves the current state, so I think it's good like it is and further improvements could be added later on.
Ping @djasper for his review and eventual merge.
================
Comment at: lib/Format/WhitespaceManager.cpp:95
@@ -97,2 +94,3 @@
std::sort(Changes.begin(), Changes.end(), Change::IsBeforeInFile(SourceMgr));
+ calculateScopeLevel();
calculateLineBreakInformation();
----------------
Maybe we could spare the computation if we aren't going to align anything?
Is it better for clarity to always compute additional information? @djasper what's the Clang way to do?
Repository:
rL LLVM
http://reviews.llvm.org/D21279
More information about the cfe-commits
mailing list