From 1b3248b0fc4257df7431895e6ceca3353c231998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 25 Jan 2018 17:47:27 +0100 Subject: [PATCH] Dont write syntax error for lambda functions --- lib/tokenize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 2fa24b503..27f56adfd 100755 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8362,7 +8362,7 @@ const Token * Tokenizer::findGarbageCode() const return tok; if (Token::Match(tok, ";|(|[ %comp%")) return tok; - if (Token::Match(tok, "%cop%|= ]") && tok->str() != "&") + if (Token::Match(tok, "%cop%|= ]") && !(isCPP() && Token::Match(tok->previous(), "[|, &|= ]"))) return tok; }