-
Notifications
You must be signed in to change notification settings - Fork 249
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
[BUG] Return-by broken by "return expression list" support #408
Comments
This comment was marked as outdated.
This comment was marked as outdated.
I think that'd make the parameter-directions in expression-list redundant. //G expression-list:
-//G parameter-direction? expression
-//G expression-list ',' parameter-direction? expression
+//G expression
+//G expression-list ',' expression This change would also make it so that This is probably necessary, anyways. EDIT: Rereading #77 (comment), |
I just noticed this, to replace #408 (comment). //G prefix-operator:
//G one of '!' '-' '+'
-//GT parameter-direction
+//G parameter-direction |
An alternative to the general solution above: //G return-statement:
-//G return expression? ';'
+//G return parameter-direction? expression? ';' But the general solution is more useful. |
Thanks! Got here from #487 -- for now I think the right fix is to not emit |
Title: Return-by broken by ab29f19.
That's my guess.
Minimal reproducer (https://cpp2.godbolt.org/z/Yh95zcrT1):
Commands:
cppfront -clean-cpp1 main.cpp2 clang++17 -std=c++2b -stdlib=libc++ -lc++abi -I . main.cpp
Expected result:
Actual result and error:
Cpp2 lowered to Cpp1.
The text was updated successfully, but these errors were encountered: