aaron.ballman marked 5 inline comments as done.
aaron.ballman added inline comments.


================
Comment at: lib/Parse/ParseObjc.cpp:1434
       MaybeParseGNUAttributes(paramAttrs);
-      ArgInfo.ArgAttrs = paramAttrs.getList();
     }
 
----------------
rjmccall wrote:
> ObjC parameter syntax is really its own weird thing.  I think this is the 
> right place to allow attributes, after the parenthesized type but before the 
> parameter-variable name (which is optional).  And of course we also allow 
> them within the parentheses, but hopefully that just falls out from parsing 
> the type.
Within the parens is tricky -- if the attribute appears immediately after the 
type, then it appertain to the *type* and not the *declaration*.
```
-(void)Test: (int) [[foo]] i  to:(int [[bar]]) j from: ([[baz]] int) k;
```
I would expect `foo` to appertain to `i`, `bar` to appertain to the type `int`, 
and `baz` to be ill-formed, which is what will fall out from parsing the type.


https://reviews.llvm.org/D41553



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

Reply via email to