From 0632f864491bd1c39ae70479d00c095a84e3375d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 16 Jul 2020 16:38:22 +0200 Subject: [PATCH] Bug hunting; avoid bailout false positives when constructor is called --- lib/bughuntingchecks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bughuntingchecks.cpp b/lib/bughuntingchecks.cpp index 46879ec04..454a50bc5 100644 --- a/lib/bughuntingchecks.cpp +++ b/lib/bughuntingchecks.cpp @@ -248,7 +248,7 @@ static void uninit(const Token *tok, const ExprEngine::Value &value, ExprEngine: if (!var->isLocal() || var->isStatic()) return; } - if (var && (Token::Match(var->nameToken(), "%name% [=:]") || Token::Match(var->nameToken(), "%varid% ; %varid% =", var->declarationId()))) + if (var && (Token::Match(var->nameToken(), "%name% [=:({)]") || Token::Match(var->nameToken(), "%varid% ; %varid% =", var->declarationId()))) return; if (var && var->nameToken() == tok) return;