aaron.ballman added inline comments.
================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2859 +AST_MATCHER_P(CXXDependentScopeMemberExpr, hasMemberName, std::string, N) { + return Node.getMember().getAsString() == N; +} ---------------- steveire wrote: > aaron.ballman wrote: > > This will allow users to match on members that don't have identifiers -- is > > that intentional? If not, my recommendation is to use something like: > > ``` > > if (const IdentifierInfo *II = Node.getMember().getAsIdentifierInfo()) > > return II->isStr(N); > > return false; > > ``` > > Either way, we should document and test what the expected behavior is for > > things like constructors/destructors, overloaded operators, and the likes. > > (But we don't have to test every kind of odd declaration name.) > I was not able to demonstrate the problem with a test: > https://godbolt.org/z/3Grd1b > > Can you be more specific? I was thinking of something along these lines: https://godbolt.org/z/K8serj Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90767/new/ https://reviews.llvm.org/D90767 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits