[PATCH] D24192: [clang-refactor] introducing clang-refactor

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 4 16:56:00 PDT 2016


omtcyfz added a comment.

In https://reviews.llvm.org/D24192#533233, @ioeric wrote:

> It was not trivial to me why USREngine is so important to those tools. You might want to address that in the design doc as well. And given the weight USREngine carries in clang-refactor as you suggested, I think it deserves an more detailed introduction in the design doc.


Yes, I agree, it might be a little confusing. The only mention I have is:

> The most important facility would allow lookup of symbol definitions and usages (probably, based on Unified Symbol Resolutions, USR)


But it doesn't get into too much details anyway. However, the idea of the design doc was not to focus on implementation details too much as they are a subject to change.

Thus, I'm not sure whether I should elaborate details of USREngine there.


================
Comment at: clang-refactor/driver/Rename.h:192
@@ +191,3 @@
+      auto ID = Sources.translateFile(Entry);
+      Rewrite.getEditBuffer(ID).write(outs());
+    }
----------------
alexshap wrote:
> if i am not mistaken if the file has not been modified this will print smth like
> "invalid source location" or similar. Pls, double check me.
Sorry, can you please elaborate?

Also, this might be unrelated to this exact patch, but if there is an issue it's good to fix it in another patch. Basically, this is not new code, it's been there in `clang-rename`.


https://reviews.llvm.org/D24192





More information about the cfe-commits mailing list