alexfh added inline comments.

================
Comment at: clang-rename/USRLocFinder.cpp:63
@@ -62,3 +62,3 @@
     const ASTContext &Context = ConstructorDecl->getASTContext();
-    for (clang::CXXConstructorDecl::init_const_iterator it = 
ConstructorDecl->init_begin(); it != ConstructorDecl->init_end(); ++it) {
-      const clang::CXXCtorInitializer* Initializer = *it;
+    for (clang::CXXConstructorDecl::init_const_iterator it =
+             ConstructorDecl->init_begin();
----------------
This would look better as a range-based for loop.

================
Comment at: clang-rename/USRLocFinder.cpp:76
@@ -73,2 +75,3 @@
           SourceLocation Location = Initializer->getSourceLocation();
-          StringRef TokenName = 
Lexer::getSourceText(CharSourceRange::getTokenRange(Location), 
Context.getSourceManager(), Context.getLangOpts());
+          StringRef TokenName = Lexer::getSourceText(
+              CharSourceRange::getTokenRange(Location),
----------------
clang::tooling:fixit::getText may be a good alternative here.


http://reviews.llvm.org/D22091



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

Reply via email to