Thanks for the feedback!
On Nov 21, 2013, at 5:27 AM, Aaron Ballman <[email protected]> wrote:
> These checks can be simplified once you remove the ,1 from Attr.td --
> the common attribute checker will already bail out if there are no
> args passed, so you can simply do:
I thought so. Thanks for clarifying.
>
> if (!Attr.isArgIdent(0)) {
> S.Diag(Attr.getLoc(), diag::err_attribute_argument_type) << Attr.getName()
> << AANT_ArgumentIdentifier;
> return;
> }
> IdentifierInfo *Parm = Attr.getArgAsIdent(0)->Ident;
>
> You should also add a test case for the number and type of args passed in.
We are deliberately not checking for the type of the arguments. The protocol
does not need to exist in the translation unit for this attribute to be applied.
>
> As for the err_objc_attr_not_id logic, you should actually be checking
> that instead of assuming any identifier counts, and this logic should
> have a test case.
I agree. Thanks.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits