From 02402eeea411587d74a3ec1f8062a1efdf8b6560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 4 Oct 2016 15:33:50 +0200 Subject: [PATCH] Make simplifyBitfields() a bit more strict --- lib/tokenize.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index fcdc88b22..cee13f58f 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8900,7 +8900,6 @@ void Tokenizer::simplifyBitfields() { bool goback = false; for (Token *tok = list.front(); tok; tok = tok->next()) { - if (goback) { goback = false; tok = tok->previous(); @@ -8925,7 +8924,7 @@ void Tokenizer::simplifyBitfields() last = tok1->next(); } - } else if (Token::Match(tok->next(), "const| %type% : %any% ;") && + } else if (Token::Match(tok->next(), "const| %type% : %num%|%bool% ;") && tok->next()->str() != "default") { const int offset = (tok->next()->str() == "const") ? 1 : 0;