[PATCH] D17034: Add an AST matcher for null pointers

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 16 11:47:02 PST 2016


sbenza added inline comments.

================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:4838
@@ +4837,3 @@
+      gnuNullExpr(), cxxNullPtrLiteralExpr(),
+      expr(integerLiteral(equals(0), hasParent(expr(hasType(pointerType()))))));
+}
----------------
aaron.ballman wrote:
> sbenza wrote:
> > is this expr() necessary?
> Yes, without it I get errors about not having a matching overload for hasParent().
Sorry, I meant the one around integerLiteral().


http://reviews.llvm.org/D17034





More information about the cfe-commits mailing list