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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 16 11:41:07 PST 2016


aaron.ballman marked an inline comment as done.

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


http://reviews.llvm.org/D17034





More information about the cfe-commits mailing list