[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes
Ben Harper via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 20 12:43:01 PDT 2016
bmharper added a comment.
PING
================
Comment at: lib/Format/WhitespaceManager.cpp:95
@@ -97,2 +94,3 @@
std::sort(Changes.begin(), Changes.end(), Change::IsBeforeInFile(SourceMgr));
+ calculateScopeLevel();
calculateLineBreakInformation();
----------------
berenm wrote:
> 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?
>
That's a good point. One certainly could elide that if alignment was turned off. I think so long as it was mentioned in the comments of the ScopeLevel member variable, it would be OK to do so. However, I'll also just defer this decision to @djasper.
Repository:
rL LLVM
https://reviews.llvm.org/D21279
More information about the cfe-commits
mailing list