[PATCH] clang-apply-replacements: Add code-formatting post processing step

Manuel Klimek klimek at google.com
Thu Sep 26 12:32:16 PDT 2013



================
Comment at: clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h:108-110
@@ +107,5 @@
+/// to one another as such ranges are combined into one.
+void calculateChangedRanges(
+    const std::vector<clang::tooling::Replacement> &Replacements,
+    RangeVector &ChangedRanges);
+
----------------
Any specific reason to not return ChangedRanges?

================
Comment at: clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h:126-129
@@ +125,6 @@
+/// applied.
+void reformatRanges(const StringRef FileName, const RangeVector &Ranges,
+                    clang::SourceManager &SM,
+                    const clang::format::FormatStyle &Style,
+                    std::vector<clang::tooling::Replacement> &Replacements);
+
----------------
Here, too, return Replacements.


http://llvm-reviews.chandlerc.com/D1730



More information about the cfe-commits mailing list