[PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 11:37:35 PDT 2016

alexshap added a subscriber: alexshap.

Comment at: change-namespace/ChangeNamespace.cpp:125
@@ +124,3 @@
+// applying all existing Replaces first if there is conflict.
+void addOrMergeReplacement(const tooling::Replacement &R,
+                           tooling::Replacements *Replaces) {
khm, this seems to be a recurring pattern (if i'm not mistaken),
looks like the interface of tooling::Replacements can be changed/improved (although i don't know).
Another (separate) observation is about duplicates. For example for replacements in headers we can get into if(Err) branch pretty frequently because the same replacement can be generated multiple times (if that header is included into several *.cpp files). 


More information about the cfe-commits mailing list