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

Aaron Ballman aaron at aaronballman.com
Thu Jul 31 10:48:02 PDT 2014


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