Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Add feature tests for parsing bounds expressions in function parameter lists #31

Closed
secure-sw-dev-bot opened this issue Jan 14, 2022 · 2 comments

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc#31


This change adds feature tests for parsing bounds expressions in function parameter lists. These tests are for the checkedc-clang pull request Extend clang IR with bounds expressions and parse bounds expressions for parameters.

@secure-sw-dev-bot
Copy link
Author

Comment from @reubeno:

At some point I assume we'll want additional test cases, e.g.:

  • Bounds exprs on parameters in function declarations (vs. func definitions)
  • Bounds exprs on non-checked pointer types? On non-pointer types?
  • Negative test cases for the classes of expressions not allowable in bounds exprs?
  • Other possible parsing ambiguities (e.g. use of ternary conditional operator in bounds expr body)?

Should we add some of these? I know you've only gotten as far as parsing but not to type-checking bounds exprs, so I'd understand if you think it makes sense to delay some of these additional cases until then...

Apart from adding more cases, I don't have any feedback here--looks good to merge.

@secure-sw-dev-bot
Copy link
Author

Comment from @dtarditi:

I'll commit this change and then add test cases for function declarations and other possible parsing ambiguities. We can add those tests now. The code should work.

The clang implementation doesn't have the checks for expressions not allowable ain bounds exprs, so those tests need to wait. Bounds declarations for unchecked pointer types and non-pointer types are more advanced features that I'm putting off for now in the clang implementation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant