[PATCH] D22091: [clang-rename] exit code-related bugfix and code cleanup

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 00:14:03 PDT 2016


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

LG with one comment.


================
Comment at: clang-rename/USRLocFinder.cpp:73-76
@@ -73,3 +72,6 @@
           SourceLocation Location = Initializer->getSourceLocation();
-          StringRef TokenName = Lexer::getSourceText(CharSourceRange::getTokenRange(Location), Context.getSourceManager(), Context.getLangOpts());
+          StringRef TokenName = Lexer::getSourceText(
+              CharSourceRange::getTokenRange(Location),
+              Context.getSourceManager(), Context.getLangOpts());
           if (TokenName == PrevName) {
+            // The token of the source location we find actually has the old
----------------
Fair enough. I didn't get the intent of the code then.

================
Comment at: clang-rename/USRLocFinder.h:33
@@ -35,1 +32,3 @@
+std::vector<SourceLocation>
+getLocationsOfUSR(llvm::StringRef usr, llvm::StringRef PrevName, Decl *decl);
 }
----------------
Use llvm style for names: USR, Decl.


http://reviews.llvm.org/D22091





More information about the cfe-commits mailing list