[cfe-dev] [clang] declspec(property...) advice

John McCall rjmccall at apple.com
Sun Feb 6 14:16:42 PST 2011

On Feb 6, 2011, at 8:40 AM, Eric Niebler wrote:
> I've been looking into how to generate those AST nodes. First,
> obj.setProperty gets parsed into a MemberExpr, then, the paren and the
> arguments are parsed, and the whole thing gets passed to
> BuildCallToMemberFunction. I figure if we do all of that in the right
> places and it type checks, we're golden. Stuff the result into the AST
> somewhere reasonable and that should do it.

Right.  It should probably just call the appropriate functions on Sema
to do all this.

> So that's my current thinking. This, however, is a radical departure
> from how properties are currently handled in clang, and will require
> some pretty invasive surgery.

I think that's basically right.  It probably deserves its own expression
node to wrap the innards, which hopefully would encompass
compound assignments, non-compound assignments, and unary


More information about the cfe-dev mailing list