From: Aaron Ballman Date: Fri, 24 Jul 2015 15:47:32 +0000 (+0000) Subject: Correcting some comments. (1) the function is named throughUsingDecl() and not throug... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16ce1e1b49aeb9361374b36dc41e2954b11b2f66;p=clang Correcting some comments. (1) the function is named throughUsingDecl() and not throughUsingDeclaration(). (2) Testing shows that this does work for shadowed variables as well as shadowed functions. I could not find an example where this matcher was failing. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243111 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index a4aa8c8688..cdd56fad4c 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -2367,8 +2367,6 @@ AST_MATCHER_P(DeclRefExpr, to, internal::Matcher, /// \brief Matches a \c DeclRefExpr that refers to a declaration through a /// specific using shadow declaration. /// -/// FIXME: This currently only works for functions. Fix. -/// /// Given /// \code /// namespace a { void f() {} } @@ -2378,7 +2376,7 @@ AST_MATCHER_P(DeclRefExpr, to, internal::Matcher, /// a::f(); // .. but not this. /// } /// \endcode -/// declRefExpr(throughUsingDeclaration(anything())) +/// declRefExpr(throughUsingDecl(anything())) /// matches \c f() AST_MATCHER_P(DeclRefExpr, throughUsingDecl, internal::Matcher, InnerMatcher) {