[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 4 12:30:06 PDT 2018

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.

  rC Clang


More information about the cfe-commits mailing list