Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
--dump-ast: write the same version of AST that was read #79
So, if reading, e.g., a version 4.02 binary AST, writing with
Right now, it produces an AST of whatever compiler version the driver was compiled with.
I believe this is the ultimate place where the decision to write the same version is not made:
I guess we would need to note the source version on loading. On writing, we would need to migrate the AST to the target version (instead of to the current version, wherever this is done), and then write that. If the source version is not available (because we read a source file), we can write according to the version with which the driver was compiled, as now.
If this is approved, I can try to make the change.