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

Handle invalid empty c++17 fold expression early #316

Conversation

i-garrison
Copy link
Contributor

One of Qt sample snippets contain (...) as placeholder for actual user code. Parsing that leads to invalid class cast because buildExpression would return fold expression token marker and not a proper ICPPASTexpression.

Fix that by handling this error early as invalid fold expression.

@github-actions
Copy link

github-actions bot commented Mar 12, 2023

Test Results

     592 files       592 suites   17m 28s ⏱️
10 057 tests 10 035 ✔️ 22 💤 0
10 179 runs  10 157 ✔️ 22 💤 0

Results for commit 203559a.

♻️ This comment has been updated with latest results.

@jonahgraham jonahgraham added this to the 11.2.0 milestone Mar 14, 2023
One of Qt sample snippets contain (...) as placeholder for actual user code.
Parsing that leads to invalid class cast because buildExpression would return
fold expression token marker and not a proper ICPPASTexpression.

Fix that by handling this error early as invalid fold expression.
@jonahgraham
Copy link
Member

I have rebased the change to make sure that it builds cleanly on main now that we released 11.1.0. Normally this is just a check that code cleanliness still passes, especially bundle version numbers are where they are supposed to be.

@jonahgraham jonahgraham force-pushed the pr/c++17-fold-expression-handle-invalid-empty-fold-early branch from acb5508 to 203559a Compare March 16, 2023 14:35
@jonahgraham jonahgraham added the language C/C++ Language Support label Mar 16, 2023
@jonahgraham jonahgraham merged commit 0923e66 into eclipse-cdt:main Mar 16, 2023
@i-garrison i-garrison deleted the pr/c++17-fold-expression-handle-invalid-empty-fold-early branch March 16, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language C/C++ Language Support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants