forked from OSchip/llvm-project
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.
llvm-svn: 243111
This commit is contained in:
parent
566060d76f
commit
3ba6fd294e
|
@ -2367,8 +2367,6 @@ AST_MATCHER_P(DeclRefExpr, to, internal::Matcher<Decl>,
|
||||||
/// \brief Matches a \c DeclRefExpr that refers to a declaration through a
|
/// \brief Matches a \c DeclRefExpr that refers to a declaration through a
|
||||||
/// specific using shadow declaration.
|
/// specific using shadow declaration.
|
||||||
///
|
///
|
||||||
/// FIXME: This currently only works for functions. Fix.
|
|
||||||
///
|
|
||||||
/// Given
|
/// Given
|
||||||
/// \code
|
/// \code
|
||||||
/// namespace a { void f() {} }
|
/// namespace a { void f() {} }
|
||||||
|
@ -2378,7 +2376,7 @@ AST_MATCHER_P(DeclRefExpr, to, internal::Matcher<Decl>,
|
||||||
/// a::f(); // .. but not this.
|
/// a::f(); // .. but not this.
|
||||||
/// }
|
/// }
|
||||||
/// \endcode
|
/// \endcode
|
||||||
/// declRefExpr(throughUsingDeclaration(anything()))
|
/// declRefExpr(throughUsingDecl(anything()))
|
||||||
/// matches \c f()
|
/// matches \c f()
|
||||||
AST_MATCHER_P(DeclRefExpr, throughUsingDecl,
|
AST_MATCHER_P(DeclRefExpr, throughUsingDecl,
|
||||||
internal::Matcher<UsingShadowDecl>, InnerMatcher) {
|
internal::Matcher<UsingShadowDecl>, InnerMatcher) {
|
||||||
|
|
Loading…
Reference in New Issue