arphaman added a comment.

I think I'd rather move `clang-rename` first.



================
Comment at: tools/extra/clang-rename/tool/ClangRename.cpp:167
       FindingAction.getUSRList();
   const std::vector<std::string> &PrevNames = FindingAction.getUSRSpellings();
   if (PrintName) {
----------------
alexshap wrote:
> 1. nit: this line caught my eye (not directly related to the main purpose of 
> this diff):
> getUSRSpellings returns ArrayRef, and ArrayRef has (see the line 271 in 
> include/llvm/ADT/ArrayRef.h) a conversion operator to std::vector<T> (by 
> value). So while it's correct this copy seems to be unnecessary (pls, correct 
> me if i am missing smth) and the fix is easy. If you want i can send a 
> separate diff or i don't mind smb else fixing it.
> 2. nit: USRFindingAction  public methods (getUSRSpellings etc) except 
> newASTConsumer should be const
Thanks for the feedback! I agree with your comments, but would prefer to leave 
them for a separate patch. I have some similar fixes for some of this code as 
well.


Repository:
  rL LLVM

https://reviews.llvm.org/D34696



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

Reply via email to