etienneb added a subscriber: etienneb. etienneb added a comment. I was wondering why we didn't created that Matcher: IgnoreImplicit
I believe it's more commonly used than 'ignoringExprWithCleanups'. It can be implemented by calling 'Stmt.IgnoreImplicit'. /// Skip past any implicit AST nodes which might surround this /// statement, such as ExprWithCleanups or ImplicitCastExpr nodes. Stmt *IgnoreImplicit(); ================ Comment at: unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:2018 @@ +2017,3 @@ + ignoringParenImpCasts(unless(anything()))))))); + EXPECT_TRUE(notMatches("float y = (float(0));", + varDecl(hasInitializer(ignoringExprWithCleanups( ---------------- nit: you can lift that expression to a local variable: varDecl(hasInitializer(ignoringExprWithCleanups( ignoringParenImpCasts(integerLiteral())))))) It's used 3 times. http://reviews.llvm.org/D21241 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits