[cfe-dev] Writing a tentative parser for C++0x attributes

Sean Hunt rideau3 at gmail.com
Mon Aug 10 12:21:57 PDT 2009


Hey clang-folk!

I'm working on implementing the new C++0x attribute specification,
currently integrated into the working paper. Aside from a couple issues
in the specification which I've sent forward to the committee in hopes
they can be addressed, my biggest issue is adjusting
isCXXDeclarationStatement

The problem is that C++0x attributes can be the start of all
declarations as well as some statements. As a result, the tentative
parsers that disambiguate need to be able to work in the face of an
attribute-specifier.

Initially, I opened a TentativeParseAction in isCXXDeclarationSatement,
but that was causing crashes in the scope annotation system. Does anyone
have any better ideas for how to do this?

Sean Hunt




More information about the cfe-dev mailing list