[PATCH] D25613: [clang-move] Don't overuse Replacements::add.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 06:30:13 PDT 2016


ioeric added inline comments.


================
Comment at: clang-move/ClangMove.cpp:472
     std::string FilePath = RemoveReplacement.getFilePath().str();
     addOrMergeReplacement(RemoveReplacement, &FileToReplacements[FilePath]);
 
----------------
For deletions, you can simply use `add`, which now simply merges overlapping deletions. And I think it should be considered an error if `add` fails. With `add`, you can get rid of `addOrMergeReplacement`.


https://reviews.llvm.org/D25613





More information about the cfe-commits mailing list