[cfe-dev] Declarator object

John McCall rjmccall at apple.com
Thu Oct 28 10:09:48 PDT 2010


On Oct 28, 2010, at 9:49 AM, Nadeem Ahmad wrote:
> I have a question. I am adding new attributes to C++ for functions. Consider the following examples:
> 
> void foo UNSW ( ) { }
> 
> UNSW is an additional attribute associated with the function "foo". I am planning to add it to the Declarator object associated with the function so I can access it for type checking process. Is this the right direction to keep the attribute information for the Semantic analysis phase?

Yes, adding attributes somewhere within the declarator will be necessary.

Note that if you were willing to require this to fall *before* the identifier, you would be able to use one of the existing attribute syntaxes.

John.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101028/3e44c4f3/attachment.html>


More information about the cfe-dev mailing list