Skip to content
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

Add booleans about checked properties to compound statements #419

Closed
secure-sw-dev-bot opened this issue Jan 16, 2022 · 0 comments
Closed

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#420


This adds two Booleans about checked properties to compound statements:

  • IsCheckedScope: is this semantically a checked scope?
  • IsCheckedPropertyDeclared: was this information explicitly declared for the block (using _Checked { ... } or _Unchecked { ... }.

I extended AST dumps to include this information for compound statements. I specifically omit dumping information for the existing behavior (where there is no declared property and the scope is unchecked). I do this to avoid breaking any existing tests that depend upon ASTs not having this information. I think there's only one test that breaks, but there could be more.

I didn't update AST reading/writing to record this information. I opened issue #419 to track this remaining work.

This does reduce the number of statements allowed in a compound statement from 2^24 to 2^22. I think we can live with that for now.

Testing:

  • Add new test that checks that AST dumps include this information.
  • Passed automated testing.
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

No branches or pull requests

1 participant