Skip to content

Add AST Serialization for Struct Member Bounds Information #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lenary opened this issue Jan 14, 2017 · 0 comments · Fixed by #111
Closed

Add AST Serialization for Struct Member Bounds Information #104

lenary opened this issue Jan 14, 2017 · 0 comments · Fixed by #111
Assignees
Milestone

Comments

@lenary
Copy link
Collaborator

lenary commented Jan 14, 2017

Struct Member bounds information is currently not serialized into the AST, we believe. We need some tests first to find out, and then we will need to add serialization/deserialization for this data.

@lenary lenary changed the title Add tests for struct member bounds checks Add AST Serialization for Struct Member Bounds Information Jan 14, 2017
@dtarditi dtarditi added this to the Sprint 12 milestone Jan 14, 2017
lenary added a commit that referenced this issue Jan 19, 2017
This pull request comprehensively revisits and expands the PCH tests, and adds (de)serialization of the bounds associated with global variables, function returns, and struct member fields. 

The only way at the moment to test that bounds declarations on global fields and functions are preserved is to redeclare the same function, which should error if you drop the bounds, and not error if you preserve the right bounds as in the precompiled header.

Bounds expressions on struct members are very hard to test, until we start inferring and solving bounds information. The test for `itype()` should work today, the others will become useful later.

As for serialization/deserialization. I've added the code to do so to the VisitDeclaratorDecl methods, because the bounds information is stored within that class (as opposed to its subclasses). I have switched off abbreviations in the bitcodewriter when a declarator decl has a bounds expression.

Closes #104
dtarditi pushed a commit that referenced this issue Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants