Thank you Richard and Jordan - committed as r199989, together with a new
test case for the isValueDependent check that was missing.

 

 

From: Jordan Rose [mailto:[email protected]] 
Sent: 24 January 2014 03:53
To: Richard Smith
Cc: Artyom Skrobov; Ted Kremenek; llvm cfe
Subject: Re: [PATCH] Combine the checks for returns_nonnull and for operator
new returning null, in Sema::CheckReturnValExpr

 

 

On Jan 23, 2014, at 13:15 , Richard Smith <[email protected]> wrote:





On Thu, Jan 23, 2014 at 9:20 AM, Jordan Rose <[email protected]> wrote:

This mostly looks good to me. One comment, though:

+          !RetValExp->isValueDependent() &&

The returns_nonnull check doesn't bother to check if it's value-dependent
first. Is that necessary? Should that be folded in somewhere else?

 

Yes, that is necessary. If your CheckNonNullExpr is supposed to
conservatively return false if the expression isn't known to be null, it
should return false on any value-dependent expression.

 

Then we should probably sink the check there, since it's not currently doing
that for the returns_nonnull attribute.

 

Jordan

 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to