[PATCH] D38723: [clang-rename] Don't add prefix qualifiers to the declaration and definition of the renamed symbol.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 10 06:48:42 PDT 2017


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

Lg with nits.



================
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:163
     const NestedNameSpecifier *Specifier;
+    // Determine whether the prefix qualifiers of the NewName are known to be
+    // ignored.
----------------
s/are known to/should be/ ?


================
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:166
+    // For example, if it is true and NewName is "a::b::foo", then the symbol
+    // will be renamed to "foo".
+    bool IgnorePrefixQualifers;
----------------
maybe "... for both symbol references and symbol definitions", just for clarity?


================
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:443
+      size_t LastColonPos = NewName.find_last_of(':');
+      if (LastColonPos != std::string::npos) {
+        ReplacedName = NewName.substr(LastColonPos + 1);
----------------
nit: no braces


https://reviews.llvm.org/D38723





More information about the cfe-commits mailing list