Skip to content

Fix Return value of ParseRelativeBoundsForDecl not being used (#282) #285

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

Merged
merged 2 commits into from
Apr 26, 2017

Conversation

jijoongmoon
Copy link
Collaborator

.According to the return value of ParseRelativeBoundsForDecl, it generates "invalid rel_align or rel_align_value" error message.

…dc#282)

.According to the return value of ParseRelativeBoundsForDecl, it generates "invalid rel_align or rel_align_value" error message.
@jijoongmoon
Copy link
Collaborator Author

I think it is ready for review. Thanks.

@@ -2841,7 +2841,10 @@ ExprResult Parser::ParseBoundsExpressionOrInteropType(const Declarator &D,

TempTok = Tok;
if (StartsRelativeBoundsClause(Tok))
ParseRelativeBoundsClauseForDecl(Result);
if (ParseRelativeBoundsClauseForDecl(Result)) {
Diag(Tok, diag::err_invalid_relative_bounds_clause);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to issue an error message here. I believe ParseRelativeBoundsClauseForDecl should have issued an error message if necessary. This will just confuse the programmer who sees the message. It is sufficient to just return an ExprError().

@jijoongmoon
Copy link
Collaborator Author

I think it is ready for further review. Thanks always!

Copy link
Member

@dtarditi dtarditi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@dtarditi dtarditi merged commit a20a4da into checkedc:master Apr 26, 2017
dopelsunce pushed a commit to dopelsunce/checkedc-clang that referenced this pull request Sep 28, 2020
Finalize version 0.7.1. of the specification.
mgrang pushed a commit that referenced this pull request Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants