malaperle added a comment.

In https://reviews.llvm.org/D38425#922408, @ioeric wrote:

> Drive-by comment: in general, have you considered reusing the existing 
> declarations and occurrences finding functionalities in clang-rename? AFAIK, 
> it deals with templates and macros pretty well.
>
> o 
> https://github.com/llvm-mirror/clang/blob/master/include/clang/Tooling/Refactoring/Rename/USRFinder.h
>  
>  o 
> https://github.com/llvm-mirror/clang/blob/master/include/clang/Tooling/Refactoring/Rename/USRLocFinder.h


This looks interesting. It does solve the problem that currently we traverse 
the whole tree. However, I don't think it has support for macros (they are not 
covered by USRs I believe) and it looks like it only can return one NamedDecl* 
at a location, and it's possible to have multiple, non-named Decls. Perhaps we 
should look at improving this!


https://reviews.llvm.org/D38425



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

Reply via email to