[PATCH] D23651: [clang-rename] improve performance for rename-all

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 03:18:30 PDT 2016


omtcyfz marked an inline comment as done.

================
Comment at: clang-rename/USRFindingAction.cpp:190
@@ -175,6 +189,3 @@
+      USRList.push_back(Finder.Find());
     }
   }
----------------
Yep. Makes sense. Thanks!

================
Comment at: clang-rename/USRFindingAction.cpp:201-202
@@ -188,10 +200,4 @@
 std::unique_ptr<ASTConsumer> USRFindingAction::newASTConsumer() {
-  std::unique_ptr<NamedDeclFindingConsumer> Consumer(
-      new NamedDeclFindingConsumer);
-  SpellingName = "";
-  Consumer->SymbolOffset = SymbolOffset;
-  Consumer->OldName = OldName;
-  Consumer->USRs = &USRs;
-  Consumer->SpellingName = &SpellingName;
-  return std::move(Consumer);
+  return llvm::make_unique<NamedDeclFindingConsumer>(SymbolOffsets, OldNames,
+                                                     SpellingNames, USRList);
 }
----------------
Yes, it's way better.


https://reviews.llvm.org/D23651





More information about the cfe-commits mailing list