r183359 - [analyzer] Fix a crash that occurs when processing an rvalue array.

Jordan Rose jordan_rose at apple.com
Wed Jun 5 18:05:31 PDT 2013


On Jun 5, 2013, at 17:51 , Richard Smith <richard at metafoo.co.uk> wrote:

> On Wed, Jun 5, 2013 at 5:19 PM, Anna Zaks <ganna at apple.com> wrote:
> Author: zaks
> Date: Wed Jun  5 19:19:36 2013
> New Revision: 183359
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=183359&view=rev
> Log:
> [analyzer] Fix a crash that occurs when processing an rvalue array.
> 
> When processing ArrayToPointerDecay, we expect the array to be a location, not a LazyCompoundVal.
> Special case the rvalue arrays by using a location to represent them. This case is handled similarly
> elsewhere in the code.
> 
> Hmm, maybe we should be generating a MaterializeTemporaryExpr between the ImplicitCastExpr and the array temporary?

Is there an array temporary? Or is the whole struct materialized?

The analyzer's had to do this before (for compound literals), so I didn't think about the wider implications, but clearly at run time some sort of temporary allocation is needed.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130605/007cfe7b/attachment.html>


More information about the cfe-commits mailing list