ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.


Comment at: clang-move/ClangMove.cpp:264
+    HeaderGuard += "#define " + GuardName + "\n";
+    clang::tooling::Replacement HeaderGuardInclude(FileName, 0, 0,
+                                                   HeaderGuard);
Might not quite related to this patch:

Considering how `tooling::Replacements::add(...)` is implemented now, it's 
quite inefficient to use `addOrMergeReplacement` in you case since almost all 
replacements will conflict, which would require expensive conflict-resolving 
merge. I think it would be cleaner and easier if you just concatenate all 
`Decl`s and create a single insertion replacement instead of keeping merging 
replacements at offset 0.

cfe-commits mailing list

Reply via email to