Repository navigation
Preserve trailing struct comments in generated C (closes #336) - #399
Closed
khushi-infinity wants to merge 3 commits into
Closed
khushi-infinity wants to merge 3 commits into
khushi-infinity wants to merge 3 commits into
Conversation
Contributor
|
Insufficient AI capability. |
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.
Summary
Trailing
///comments after the last field of a schema struct were emitted before a later generated type instead of inside the generated C struct. This change keeps those comments with their schemastruct and places them before the generated closing brace.
Changes
}.Testing
cmake -S . -B /private/tmp/flatcc-issue336-build -G "Unix Makefiles" -DFLATCC_CXX_TEST=OFF -DCMAKE_BUILD_TYPE=Debug— passed.cmake --build /private/tmp/flatcc-issue336-build --target cgen_test test_generated— passed; generated C compiled.ctest --test-dir /private/tmp/flatcc-issue336-build -R cgen_test --output-on-failure— passed, 2/2 tests.git diff --check— passed.sprintfdeprecation insrc/compiler/semantics.c:1536as an error, so the sanitizer test did not run.cppcheckandclang-formatwere unavailable.Issue
Fixes #336.
AI assistance
ByteAsk assisted with investigation, implementation, regression-test development, verification, and drafting this description. This text is AI-generated and has not been represented as human-written.