Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/ASTMatchers/ASTMatchers.h
Show First 20 Lines • Show All 907 Lines • ▼ Show 20 Lines | |||||
/// varDecl(hasInitializer(ignoringImpCasts(declRefExpr()))) | /// varDecl(hasInitializer(ignoringImpCasts(declRefExpr()))) | ||||
/// \endcode | /// \endcode | ||||
/// would match the declarations for a, b, c, and d, but not e. | /// would match the declarations for a, b, c, and d, but not e. | ||||
/// While | /// While | ||||
/// \code | /// \code | ||||
/// varDecl(hasInitializer(integerLiteral())) | /// varDecl(hasInitializer(integerLiteral())) | ||||
/// varDecl(hasInitializer(declRefExpr())) | /// varDecl(hasInitializer(declRefExpr())) | ||||
/// \endcode | /// \endcode | ||||
/// only match the declarations for b, c, and d. | /// only match the declarations for a. | ||||
AST_MATCHER_P(Expr, ignoringImpCasts, | AST_MATCHER_P(Expr, ignoringImpCasts, | ||||
internal::Matcher<Expr>, InnerMatcher) { | internal::Matcher<Expr>, InnerMatcher) { | ||||
return InnerMatcher.matches(*Node.IgnoreImpCasts(), Finder, Builder); | return InnerMatcher.matches(*Node.IgnoreImpCasts(), Finder, Builder); | ||||
} | } | ||||
/// Matches expressions that match InnerMatcher after parentheses and | /// Matches expressions that match InnerMatcher after parentheses and | ||||
/// casts are stripped off. | /// casts are stripped off. | ||||
/// | /// | ||||
▲ Show 20 Lines • Show All 7,093 Lines • Show Last 20 Lines |