[cfe-dev] Stmt refs in serialized AST

Rafael·Stahl via cfe-dev cfe-dev at lists.llvm.org
Thu Feb 8 06:01:23 PST 2018


Hi,

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!

Thanks
Rafael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5449 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180208/1410f2d1/attachment.bin>


More information about the cfe-dev mailing list