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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits