[cfe-commits] r108019 - in /cfe/trunk: lib/Sema/TreeTransform.h test/CodeGenCXX/instantiate-blocks.cpp test/SemaCXX/instantiate-blocks.cpp

Fariborz Jahanian fjahanian at apple.com
Mon Jul 12 14:15:13 PDT 2010


On Jul 10, 2010, at 4:45 PM, Douglas Gregor wrote:

>
>
> Sent from my iPhone
>
> On Jul 10, 2010, at 10:50 AM, Fariborz Jahanian  
> <fjahanian at apple.com> wrote:
>
>>
>> On Jul 9, 2010, at 7:03 PM, Douglas Gregor wrote:
>>
>>>
>>>
>>> Sent from my iPhone
>>>
>>> On Jul 9, 2010, at 2:27 PM, Fariborz Jahanian  
>>> <fjahanian at apple.com> wrote:
>>>
>>>> Author: fjahanian
>>>> Date: Fri Jul  9 16:27:28 2010
>>>> New Revision: 108019
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=108019&view=rev
>>>> Log:
>>>> Instantiation of byref variable in
>>>> block literal expression.
>>>>
>>>> Added:
>>>> cfe/trunk/test/SemaCXX/instantiate-blocks.cpp
>>>> Modified:
>>>> cfe/trunk/lib/Sema/TreeTransform.h
>>>> cfe/trunk/test/CodeGenCXX/instantiate-blocks.cpp
>>>>
>>>> Modified: cfe/trunk/lib/Sema/TreeTransform.h
>>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=108019&r1=108018&r2=108019&view=diff
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> = 
>>>> ===================================================================
>>>> --- cfe/trunk/lib/Sema/TreeTransform.h (original)
>>>> +++ cfe/trunk/lib/Sema/TreeTransform.h Fri Jul  9 16:27:28 2010
>>>> @@ -6279,6 +6279,10 @@
>>>> if (!ND)
>>>>  return SemaRef.ExprError();
>>>>
>>>> +  // Is this instantiation of a __block variable?
>>>> +  if (E->getDecl()->getAttr<BlocksAttr>())
>>>> +    ND->addAttr(::new (SemaRef.Context)  
>>>> BlocksAttr(BlocksAttr::ByRef));
>>>> +
>>>
>>> It seems like this attribute should have been copied to the  
>>> instantiated declaration when the VarDecl itself was created. Is  
>>> that not the case?
>>
>> Unlike our expectation it wasn't doing that. AFAIK, no other  
>> attributes are moved over either. But I will
>> look further.
>
> Sounds like a bug in that instantiation code, then.

Done in TOT r108195

- Fariborz

>



More information about the cfe-commits mailing list