xazax.hun added a comment.

In https://reviews.llvm.org/D48027#1142324, @MTC wrote:

> - There is possible match the wrong AST node, e.g. for the NamedDecl `foo()`, 
> if the function body has the `a::b::x`, when we match `a::b::X()`, we will 
> match `foo()` . Because I'm not familiar with ASTMatcher, my bad, I can't 
> think of a perfect way to match only the specified nodes.


Hmm, instead of using the match function which will traverse the ast, we could 
use the `HasNameMatcher` class which can be invoked on only one node. That 
class is in an internal namespace though, so I think the best would be to ask 
the maintainers whether it is ok to use that class externally, or were whe 
should put the functionality we need.


Repository:
  rC Clang

https://reviews.llvm.org/D48027



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

Reply via email to