Fix incomplete-type ownership for C++23 - #175
Draft
dzbarsky wants to merge 1 commit into
Draft
Conversation
Move generated AST constructors and node-owning mutators out of line, and emit factories after all generated node definitions. Define the affected visitor and SQLBuilder operations after their dependent types, and order reference-implementation node definitions before owning arguments. Keep GoogleSQL's C++20 default unchanged. Port the seven-file GoogleSQL patch from GoogleCloudPlatform/cloud-spanner-emulator#375. Validation: regenerated all 12 C++ AST outputs before and after the change; builder and visitor outputs are unchanged. Verified matching declarations and unchanged bodies for every moved generated constructor and mutator. C++ compilation and runtime tests were not run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the GoogleSQL source changes from cloud-spanner-emulator#375. C++23 toolchains can instantiate
std::unique_ptrdestruction and assignment while the owned AST, query, or operator type is incomplete. Move generated AST constructors and node-owning mutators out of line, emit factories after all node definitions, and place the affected visitor, SQL-builder, and operator definitions after the types they require. Keep GoogleSQL's C++20 default unchanged.Validation: regenerated all 12 C++ AST outputs before and after the change, confirmed unchanged builder/visitor outputs, and checked matching declarations and unchanged bodies for every moved generated constructor and mutator. C++ compilation and runtime tests were not run.
Tracking issue: #178.
GoogleSQL's contribution guide asks for issues rather than external code contributions. This draft provides the proposed implementation for maintainers to incorporate internally.
-zbarskybot