klimek 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) {
----------------
aaron.ballman wrote:
> 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?
I don't like hasDeclaration, as that's so far used when there is exactly one.
Something like hasAnyDeclaration might also fit, but I think canReferToDecl
makes it clear that there is not yet a specific decl, but a couple of
candidates we'll want to select from.
https://reviews.llvm.org/D23004
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits