[PATCH] clang-apply-replacements: Add code-formatting post processing step
djasper at google.com
Fri Sep 27 22:26:05 PDT 2013
Two more small things. The rest look very good.. Sorry for making you go through such lengths, but I really like the design much better now. Thanks a lot for working on this!
Comment at: clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp:45
@@ +44,3 @@
+static cl::opt<std::string> FormatStyleConfig(
I think (at least in a long run), this should actually start with the filename for each refactored file. I know of several codebases that have different styles in different sub-trees. So that would mean we would need to call getStyle() per file (at least if its value equals "file"). I don't know how much you'd need to change here. I am fine with just adding a FIXME instead.
Comment at: clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp:79
@@ +78,3 @@
+/// \param[in] Replacements Replacements to apply
+/// \param[in] Rewrites Rewriter to use to apply replacements.
Is there a reason for this precondition. Why not just have the first statement:
if (Replacements.empty()) return;
Like this all the callsites need to worry about that ..
More information about the cfe-commits