efriedma added a comment.

The problem would come from propagating nonnull-ness from something which isn't 
inherently nonnull.  For example, strlen has a nonnull argument, so 
`strlen(NULL)` is UB, therefore given `int z = strlen(x); if (x) {...}`, we can 
remove the null check.  (Not sure we actually do this transform at the moment, 
but it's something we could do in the future.)


Repository:
  rC Clang

https://reviews.llvm.org/D47894



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to