[PATCH] D22794: [Sema] Propagate nullability when deducing type of auto
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 15 17:33:26 PDT 2016
rsmith added a subscriber: rsmith.
rsmith added a comment.
Is this really a good idea? If I write:
int *_Nullable f();
int n;
int *_Nonnull g() {
auto *p = f();
if (!p) p = &n;
return p;
}
... it would be wrong to produce a warning that I'm converting from a nullable pointer to a non-nullable pointer.
https://reviews.llvm.org/D22794
More information about the cfe-commits
mailing list