[cfe-commits] r48366 - in /cfe/trunk: Sema/SemaDecl.cpp test/Sema/address_spaces.c

Nate Begeman natebegeman at mac.com
Fri Mar 14 15:01:14 PDT 2008


On Mar 14, 2008, at 2:38 PM, Chris Lattner wrote:

> On Mar 14, 2008, at 11:07 AM, Nate Begeman wrote:
>> URL: http://llvm.org/viewvc/llvm-project?rev=48366&view=rev
>> Log:
>> Correctly error on arrays with automatic storage full of objects with
>> non-default address space, and fix comment.
>> Add a test for this.
>
> Hey Nate,
>
> I don't think this is the right fix.  It will probably fail for _AS1  
> int x[10][10] for example.  I think that the fix is to propagate the  
> address space qualifier out of structs and arrays when formed.   
> Specifically, if you have:
>
> _AS1 int x;
>
> we should have: ASQualType(int, 1)
>
> if we have:
>
> _AS1 int x[10];
>
> we currently have:  ArrayType(ASQualType(int, 1), 10)
>
> but I think we should get:
>
> ASQualType(ArrayType(int, 10), 1)
>
> What do you think?  This means that the sema for applying  
> constructoring arrays (in SemaType) should be aware of this.
>
> -Chris

Yeah that makes more sense.  I'll look into it this weekend.

Nate



More information about the cfe-commits mailing list