mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
The IR construction code wasn't handling lambda expressions, so I added `TranslatedLambdaExpression`. It's pretty straightforward: it creates a temporary variable, initializes it with an `Uninitialized` instruction, then initializes the individual captured fields with the initializer list supplied in the AST. When testing the case of a lambda with no captures, I noticed that we weren't handling initialization of empty structs with an initializer list correctly, so I fixed that along the way. I was getting confused by the bad indentation for wrapped lines in TranslatedInitialization.qll, so I fixed that up in a separate commit.