Skip to content

Return value of ParseRelativeBoundsForDecl not being used #282

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 · 0 comments
Closed

Return value of ParseRelativeBoundsForDecl not being used #282

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

Comments

@secure-sw-dev-bot
Copy link

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


I noticed that the return value of ParseRelativeBoundsForDecl seems to never be used. At the call in ParseBoundsExpressionOrInteropType, I think we should check the return value and make sure that the function returns an invalid bounds expression if there was an error. This will prevent spurious downstream errors later on.

I don't think we need to do anything at the call in ParseStructDeclaration. It would be helpful to add a comment there explaining what is going on. We expect this call to always generate an error message. Because of that, we don't need to check the return value.

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