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 #1143

Open
secure-sw-dev-bot opened this issue Jan 17, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@secure-sw-dev-bot
Copy link

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


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.

@secure-sw-dev-bot secure-sw-dev-bot added the bug Something isn't working label Jan 17, 2022
@secure-sw-dev-bot
Copy link
Author

Comment from @arbipher:

duplicate with #1096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant