[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 11:48:29 PDT 2017


lebedev.ri added inline comments.


================
Comment at: lib/Sema/Sema.cpp:441
     return;
-  if (E->getType()->isNullPtrType())
+  if (E->IgnoreImpCasts()->getType()->isNullPtrType())
     return;
----------------
erichkeane wrote:
> aaron.ballman wrote:
> > Do we also want to ignore parens here as well with `Expr::IgnoreParenImpCasts()`?
> I don't see a reason why not!  Patch incoming.
Probably needs a test too :)


https://reviews.llvm.org/D39301





More information about the cfe-commits mailing list