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

Fixed #205: Make lambdas as in class initializer work. #210

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

andreasfertig
Copy link
Owner

Lambdas as an in class initializer cause a LambdaExpr to occur in a
CXXConstructorDecls initializer list. This causes the lambda to be
placed at a wrong location.

It also triggers a behaviour where the LambdaExpr occurs twice. Once
in the in class initializer as written and later in the CXXConstructorDecl.
The first one cause a crash due to a nullptr access. This patch
filters these lambdas out.

Lambdas as an in class initializer cause a `LambdaExpr` to occur in a
`CXXConstructorDecl`s initializer list. This causes the lambda to be
placed at a wrong location.

It also triggers a behaviour where the `LambdaExpr` occurs twice. Once
in the in class initializer as written and later in the `CXXConstructorDecl`.
The first one cause a crash due to a `nullptr` access. This patch
filters these lambdas out.
@codecov
Copy link

codecov bot commented Jul 16, 2019

Codecov Report

Merging #210 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   95.94%   95.95%   +<.01%     
==========================================
  Files          29       29              
  Lines        2419     2424       +5     
==========================================
+ Hits         2321     2326       +5     
  Misses         98       98
Impacted Files Coverage Δ
CodeGenerator.h 100% <ø> (ø) ⬆️
CodeGenerator.cpp 96.25% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a47db1...b852329. Read the comment docs.

@andreasfertig andreasfertig merged commit e7675ae into master Jul 16, 2019
@andreasfertig andreasfertig deleted the fixIssue205 branch July 16, 2019 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant