[cfe-commits] [PATCH] Publish Parser RAIIs

Axel Naumann Axel.Naumann at cern.ch
Wed Oct 31 03:27:28 PDT 2012


Hi John!

On 10/31/2012 02:58 AM, John McCall wrote:
> On Oct 30, 2012, at 8:43 AM, Axel Naumann wrote:
>> We'd like to make use of the RAIIs that make using the Parser so much
>> safer. The attached patch publishes them; it also combines
>> DestroyTemplateIdAnnotationsRAIIObj with the other RAIIs.
> 
> Sorry, I'm missing the context.  You have code outside Parser
> which is manipulating the Parser?

No. We parse for instance for string based lookup, using

ConsumeToken
EnterScope
ExitScope
getTypeAnnotation
NextToken
NotTypeCast
ParseAssignmentExpression
ParseTypeName
ParseUnqualifiedId
SkipUntil
TryAnnotateCXXScopeToken
TryAnnotateTypeOrScopeToken

and it would be really nice to get the Parser back to a sane state
afterwards.

Cheers, Axel.




More information about the cfe-commits mailing list