-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Expansion of global lambda expressions is broken #46
Labels
bug
Something isn't working
Comments
andreasfertig
pushed a commit
that referenced
this issue
Jul 15, 2018
Once again the matchers caused trouble. The global autoDecl matcher did also catch the lambda which resulted in a mess. This fix forwards autoDecls into CodeGenerator as well and locks it against double match.
Hi Tony, thanks for reporting that with Tony-Tables :-) Surprisingly I have no test for a global Lambda. The AST matchers are still a source of trouble. Next step is matching the whole TU. But that will take some time. However, patch is on its way. |
andreasfertig
pushed a commit
that referenced
this issue
Jul 15, 2018
Fixed issue #46: Lambda's in global scope.
Happy to help, thanks for the quick fix :) |
andreasfertig
pushed a commit
that referenced
this issue
Jul 16, 2018
The change #46 makes it possible to remove the dedicated structured bindings handler. The AutoStmtHandler can handle it as well, because all structured bindings have an auto variable declaration. This removes more or less duplicate code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lambda expressions at global scope generate unintelligible output. C++ Insights is supposed to replace them with equivalent, explicit class definitions, but this only seems to work properly for lambda expressions defined inside a function.
The following table illustrates the output for a locally defined lambda (fine) vs. two instances of global lambdas (broken).
The text was updated successfully, but these errors were encountered: