<div dir="ltr">Ping.<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 3:14 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br>Currently, the iboutletcollection and vec_type_hint attributes are parsed by contorting the normal list-of-expressions parsing logic. For iboutletcollection, the "type" is parsed manually, by picking out an identifier followed by an (optional) list of angle-bracketed identifiers, and the latter is ignored. This is needlessly complex; the attached patch modifies them to just parse a type as the attribute argument.</div>

<div><br></div><div>The custom handling also breaks parsing for other kinds of attributes which *don't* take a type argument; for instance, in "__attribute__((aligned(int)))" we parse and ignore the 'int', and in "__attribute__((aligned(int(1))))" we reject a valid expression because we get confused and think it's a type. This is not even bug-compatible with g++, which does the right thing in these cases.</div>

<div><br></div><div>Other than fixing bugs, this makes one semantic change: when given a protocol-qualified object type, IBOutletCollectionAttr now stores the full type (including the protocol list) where it previously just stored the interface. I've updated the only consumer of this information that I could find (in libclang).</div>

<div><br></div><div>Please review!</div><div>Thanks.</div></div>
</blockquote></div><br></div></div>