[PATCH] Support constant expressions, including non-type template parameters, in pragma loop hints

Tyler Nowicki tnowicki at apple.com
Thu Jul 31 13:33:41 PDT 2014


I made some changes to the diagnostics to make it more clear what is happening here. I think we can make further changes to unify the diagnostics in a follow-up patch.

I resubmitted the ‘state’ patch so the attached patch is good to apply directly to trunk.

Thanks!

Tyler

-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop_hint_constant_expression-svn.patch
Type: application/octet-stream
Size: 44509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140731/f0b673a3/attachment.obj>
-------------- next part --------------


On Jul 31, 2014, at 10:48 AM, Aaron Ballman <aaron at aaronballman.com> wrote:

> On Thu, Jul 31, 2014 at 12:44 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
>> 
>> -def err_pragma_loop_invalid_value : Error<
>> -  "invalid argument; expected a positive integer value">;
>> +def err_pragma_loop_invalid_argument : Error<
>> +  "invalid argument %0; expected a positive 32-bit integer value">;
>> 
>> 
>> Why is this diagnostic now in Sema and Parser (in the patch attached
>> to your latest email)?
>> 
>> 
>> 
>> I’m not sure whats going on with the patch on the email. It was shorter than
>> the actual file. I’ll try sending it again.
>> 
>> The err_pragma_loop_invalid_argument is used by CheckLoopHintExpr in Sema.
> 
> That diagnostic should be combined with the Parser diagnostic and
> placed into DiagnosticCommonKinds.td with a more general identifier.
> 
> Any chance you can rebase your patch off ToT with your previous patch
> applied? That would make this a bit easier for me to review.
> 
> ~Aaron



More information about the cfe-commits mailing list