fix a large number of valgrind warnings in testrunner (#2920)

Co-authored-by: Robert Reif <reif@FX6840>
This commit is contained in:
IOBYTE 2020-11-24 12:21:07 -05:00 committed by GitHub
parent f145ae967d
commit 43ce1607c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -3547,11 +3547,12 @@ static void valueFlowLifetimeConstructor(Token* tok, TokenList* tokenlist, Error
struct Lambda {
enum class Capture {
Undefined,
ByValue,
ByReference
};
explicit Lambda(const Token * tok)
: capture(nullptr), arguments(nullptr), returnTok(nullptr), bodyTok(nullptr), explicitCaptures() {
: capture(nullptr), arguments(nullptr), returnTok(nullptr), bodyTok(nullptr), explicitCaptures(), implicitCapture(Capture::Undefined) {
if (!Token::simpleMatch(tok, "[") || !tok->link())
return;
capture = tok;