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

Where clause on invalid declaration causes the parser running forever #1144

Open
arbipher opened this issue Aug 4, 2021 · 1 comment
Open
Labels
bug This labels issues that are bugs.

Comments

@arbipher
Copy link

arbipher commented Aug 4, 2021

The test is running on the latest master 373b5dc.

The file content of wrong_where_place1.c is

int *g_arr5  : bounds(g_arr5, g_arr5 + 5) _Where x == 1;

The command is clang -cc1 wrong_where_place1.c

The behavior is the compiler outputs wrong_where_place1.c:1:43: error: where clause on invalid decl forever.
The expected should be one error message and exit.

I did the basic debug. The error message is defined at line 1575 of DiagnosticParserKinds.td and is thrown at line 1937 ParseWhereClauseOnDecl of ParserDecl.cpp.

@arbipher arbipher changed the title Where clause on invalid declaration cause the parser running forever Where clause on invalid declaration causes the parser running forever Aug 9, 2021
@arbipher
Copy link
Author

arbipher commented Aug 9, 2021

duplicate with #1096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This labels issues that are bugs.
Projects
None yet
Development

No branches or pull requests

1 participant