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

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 4 02:17:30 PST 2016


ioeric added inline comments.

================
Comment at: include/clang/Tooling/Core/Replacement.h:237
@@ +236,3 @@
+/// related to the same file entry are put into the same vector.
+FileToReplacementsMap groupReplacementsByFile(const Replacements &Replaces,
+                                              FileManager &Files);
----------------
djasper wrote:
> Hm... I am not sure here. I think I would implement this entirely without FileManager or FileEntries, just based on the names of the file. I guess you are worried about different paths leading to the same FileEntry?
You are right. Getting rid of `FileManger` would make more sense for users. And yes, I was worrying about different names leading to the same entry. Do we need to worry about this case? Or we can assume Replacements for the same file always have the same file path? 


http://reviews.llvm.org/D17852





More information about the cfe-commits mailing list