[PATCH] D13408: Skip NonNull sema checks in unevaluated contexts.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 18:07:27 PDT 2015


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

This seems reasonable.

I wonder if it might be better to also suppress warnings for dynamically-unreachable code (you can do this by changing the `Diag` calls inside `CheckNonNullArguments` to `DiagRuntimeBehavior` instead of the current patch). That would help for a case like:

  #define SAFE_FOO(x) if (x) foo(x)
  SAFE_FOO(0);

... but admittedly that's pretty contrived.

Anyway, this looks fine as far as it goes.


http://reviews.llvm.org/D13408





More information about the cfe-commits mailing list