[PATCH] D24800: Merge conflicting replacements when they are order-independent.
Alexander Shaposhnikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 28 13:30:54 PDT 2016
alexshap added a subscriber: alexshap.
================
Comment at: cfe/trunk/lib/Tooling/Core/Replacement.cpp:182
@@ +181,3 @@
+llvm::Expected<Replacements>
+Replacements::mergeIfOrderIndependent(const Replacement &R) const {
+ Replacements Rs(R);
----------------
sorry, probably i am late to the party,
however i'd like to ask how this method is supposed to be used by the customers of this code.
If i'm not mistaken we have some concrete examples in clang-extra-tools: for instance @omtcyfz referred to this diff on https://reviews.llvm.org/D24914.
Basically after this diff the class Replacements contains several methods (add, mergeIfOrderIndependent etc), but mergeIfOrderIndependent potentially will copy a lot of replacements (i don't know if the perf is a real issue here, but at least it looks a bit strange to me).
Another question - how are the customers of this code supposed to use the method add ? still suppress the error (like what was happening on https://reviews.llvm.org/D24914) ?
Am i missing smth ?
cc: @klimek, @djasper.
Repository:
rL LLVM
https://reviews.llvm.org/D24800
More information about the cfe-commits
mailing list