On Jan 30, 2013, at 10:21 AM, Tanya Lattner <[email protected]> wrote:

> 
> On Jan 30, 2013, at 10:17 AM, Joey Gouly <[email protected]> wrote:
> 
>> I prefer "kernel cannot have void return type" over "kernel function must
>> return void".
> 
> I honestly have no strong preference, so sure. You and Anton L can duke it 
> out if he complains ;)

Actually, I think you mean "kernel must have return void type" (from IRC).

-Tanya

> 
>> 
>> Apart from putting the check in test/SemaOpenCL/invalid-kernels.cl, it looks
>> good, please commit!
> 
> Yes, I will. Thanks!
> 
> -Tanya
> 
>> 
>> Joey
>> 
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Tanya Lattner
>> Sent: 30 January 2013 18:11
>> To: Richard Smith
>> Cc: [email protected]
>> Subject: Re: [PATCH][OpenCL] Check that kernel returns void type
>> 
>> I am guessing this patch is ok since its so small and Richard already
>> approved the part and I removed the one he questioned.
>> 
>> If anyone has any final comments, please let me know.
>> 
>> -Tanya
>> 
>> On Jan 29, 2013, at 4:51 PM, Tanya Lattner <[email protected]> wrote:
>> 
>>> 
>>> On Jan 29, 2013, at 4:14 PM, Richard Smith <[email protected]> wrote:
>>> 
>>>> --- lib/Sema/SemaDecl.cpp  (revision 173469)
>>>> +++ lib/Sema/SemaDecl.cpp  (working copy)
>>>> @@ -6178,7 +6178,15 @@
>>>>    Diag(D.getIdentifierLoc(), diag::err_static_kernel);
>>>>    D.setInvalidType();
>>>>  }
>>>> -
>>>> +
>>>> +    // OpenCL v1.2, s6.9 -- Kernels can only have return type void.
>>>> +    if (!NewFD->getResultType()->isVoidType() &&
>>>> +        !NewFD->getAttr<SectionAttr>()) {
>>>> 
>>>> Use hasAttr<SectionAttr> not getAttr<SectionAttr>. Also, test coverage
>>>> for this half of the check would be useful.
>>>> 
>>> 
>>> Actually, this is a mistake as that check is not standard for OpenCL so I
>> will remove it. Updated patch attached.
>>> 
>>> 
>>> -Tanya
>>> 
>>> <voidKernelCheck2.patch>
>>> 
>>> 
>>>> On Tue, Jan 29, 2013 at 3:50 PM, Tanya Lattner <[email protected]> wrote:
>>>>> Sending this patch for review. I made some changes to it based upon
>> previous feedback. This is a simple error check to see if the kernel returns
>> void type.
>>>>> 
>>>>> Thanks,
>>>>> Tanya
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> cfe-commits mailing list
>>>>> [email protected]
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>> 
>>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>> 
>> 
>> 
>> 
> 

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

Reply via email to