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

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 10 01:33:04 PDT 2016


omtcyf0 marked an inline comment as done.

================
Comment at: clang-rename/USRLocFinder.cpp:73-75
@@ -73,3 +72,5 @@
           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) {
----------------
Not sure whether I know how to address this one.

clang::tooling:fixit::getText returns text of a whole AST Node, while here we only want to get text of the first token that AST Node has. I.e. 'foo' vs. 'foo(0)'.


http://reviews.llvm.org/D22091





More information about the cfe-commits mailing list