Skip to content

Save normalized VarDecl bounds #837

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
secure-sw-dev-bot opened this issue Jan 16, 2022 · 1 comment
Closed

Save normalized VarDecl bounds #837

secure-sw-dev-bot opened this issue Jan 16, 2022 · 1 comment

Comments

@secure-sw-dev-bot
Copy link

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


Fixes #830

This PR attaches a normalized bounds expression to a VarDecl to avoid repeated calls to ExpandBoundsToRange, which can allocate AST structures and increase the memory usage of the compiler. This is relevant for updating and validating the observed context and using widened bounds, which is currently recomputing the normalized bounds of a VarDecl.

Testing:

  • Passed manual testing on Windows
  • Passed automated testing on Linux
@secure-sw-dev-bot
Copy link
Author

Comment from @kkjeer:

Do you plan to cleanup the invocations of ExpandBoundsToRange in other files as a follow up?

Created #848 to track this.

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