[PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 11:34:16 PDT 2016


aaron.ballman added inline comments.

================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:2809
@@ +2808,3 @@
+///   matches \c foo in \c foo(t);
+AST_MATCHER_P(OverloadExpr, canReferToDecl, internal::Matcher<Decl>,
+              InnerMatcher) {
----------------
I find the name of this matcher a little bit confusing. The documentation doesn't describe what the matcher does (can you please clarify the docs?). The implementation suggests that this is looking to see if the given decl exists in the overload expression set, which makes me wonder why this isn't implemented on the `hasDeclaration()` traversal matcher rather than adding a new matcher name?


https://reviews.llvm.org/D23004





More information about the cfe-commits mailing list