[cfe-commits] [patch] Friend semantics

John McCall rjmccall at apple.com
Tue Aug 4 14:49:25 PDT 2009


This patch implements many, but not all, of the semantics required for 
friend declarations.  There's a lot left to be done, but it at least 
gets friend operators passing Sema.

I'd appreciate a review, since I'm interacting with lookup / etc. in 
ways that I haven't touched before.

Notable points:

- 'friend' is now outlawed by the parser in any context except 
class/struct/union definitions.
- Action::ActOnTag has a new tag kind, TK_Friend, triggered on 
standalone friend class declarations;  the rules turn out to be slightly 
different for these.
- Action::ActOnFriendDecl is the primary Action callback for friend 
declarations, called instead of ActOnDeclarator or 
ParsedFreeStandingDeclSpec.

John.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: friend.patch.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090804/041aba05/attachment.txt>


More information about the cfe-commits mailing list