klimek added inline comments.

================
Comment at: clang-rename/USRFindingAction.cpp:45
@@ +44,3 @@
+namespace {
+// \brief NamedDeclFindingConsumer should delegate finding USRs relevant to
+// given Decl to RelevantUSRFinder.
----------------
Still pondering whether 'relevant' is a good name here...

================
Comment at: clang-rename/USRFindingAction.cpp:72
@@ +71,3 @@
+
+  virtual void run(const MatchFinder::MatchResult &Result) {
+    const auto *VirtualMethod =
----------------
That way, the matchers don't actually get us too much - I'd hoped we already 
had an hasOverriddenMethod matcher (apparently we don't). It might make sense 
to implement one.
Then we can implement a matchesUSR matcher, too (which takes a set of USRs), 
and all those lookups would be cached automatically.
Fine to add a FIXME for this patch though.

================
Comment at: clang-rename/USRFindingAction.cpp:86
@@ +85,3 @@
+
+  void addRelevantUSRs() {
+    // If D is CXXRecordDecl we should add all USRs of its constructors.
----------------
Perhaps call this addUSRsFromOverrideSets or something? addRelevantUSRs doesn't 
really tell me anything about what it does, and it's currently pretty specific.


https://reviews.llvm.org/D22408



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to