[PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 07:46:35 PDT 2016


djasper added inline comments.

================
Comment at: include/clang/Tooling/Refactoring.h:91
@@ +90,3 @@
+                                   Rewriter &Rewrite,
+                                   const format::FormatStyle &Style);
+
----------------
Do you have a use case where we'd want to call this with a fixed style? Otherwise, I'd just remove this function for now.

================
Comment at: include/clang/Tooling/Refactoring.h:93
@@ +92,3 @@
+
+/// \brief Groups \p Replaces by the file path and applies each group of
+/// Replacements on the related file in \p Rewriter. In addition to applying
----------------
Don't copy the comment for the function. It is bound to go out of sync and makes users wonder what the actual differences are. Put this function first and replace "Instead of .." with "This function use the filename stored in the replacements to determine the appropriate style.".

Then in the comment to the other just write: "/// Same as above but use fixed style \p Style."


http://reviews.llvm.org/D17852





More information about the cfe-commits mailing list