Uploaded http://reviews.llvm.org/D21240 with the requested changes.

On Fri, Jun 10, 2016 at 7:39 AM, Aaron Ballman <aa...@aaronballman.com>
wrote:

> > +def Kernel : Attr {
>
> Please rename this to RenderScriptKernel. We have another attribute
> that is spelled "kernel" already, and we want to distinguish between
> them to reduce confusion.
>

Addressed in the above patch.

>
> > +  let Spellings = [GNU<"kernel">];
>
> Is there a reason this isn't also spelled with a C++ attribute spelling?


RenderScript is a C99 variant and the C++ spelling is not needed/supported.


>
>
> +static void handleKernelAttr(Sema &S, Decl *D, const AttributeList
> &Attr) {
> > +  if (S.LangOpts.RenderScript) {
> > +    D->addAttr(::new (S.Context)
> > +               KernelAttr(Attr.getRange(), S.Context,
> > +                          Attr.getAttributeSpellingListIndex()));
> > +  } else {
> > +    S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "kernel";
> > +  }
>
> This is the wrong way to handle this; please add a LangOpt subclass in
> Attr.td and make this a target-specific attribute there.
>
>
Addressed in the above patch.


>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to