[PATCH] D23279: clang-reorder-fields
Ben Craig via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 10:10:44 PDT 2016
bcraig added a comment.
It is very common for developers to put comments near a field. If this tool doesn't move the "anchored" comments, then its utility will be severely limited.
Does this tool also reorder C++ member initializer lists? If it doesn't, then running this tool will introduce warnings in code.
The static analyzer does have code to find a less padded ordering for a structure (lib/StaticAnalyzer/Checkers/PaddingChecker.cpp, calculateOptimalPad()). You may want to consider using / factoring out that code for this tool. It does have substantial limitations on which kinds of records it can look at though.
Repository:
rL LLVM
https://reviews.llvm.org/D23279
More information about the cfe-commits
mailing list