Stmt refs in serialized AST

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Stmt refs in serialized AST

Hans Wennborg via cfe-dev

the goal is to have a serialized source code representation and
references to statements within this code.

As far as I know the only serialization format is the PCH/Module binary
format. Unfortunately the ASTWriter and ASTDeserializationListener only
expose Decls, Identifiers, Macros and Types - not Stmts/Exprs.

The ASTStmtWriter seems to produce some actual offsets, but this class
is entirely internal implementation.

The only other option I see is to store the SourceLocations, but here
some info is lost, because multiple AST nodes can be on the same
location. Even when using SourceRanges, some nodes like implicit casts
introduce ambiguities.

Any pointers would be much appreciated!


cfe-dev mailing list
[hidden email]

smime.p7s (7K) Download Attachment