diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 5921621fed2..9c872432cb8 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -2002,7 +2002,7 @@ void TokenList::validateAst(bool print) const if (Token::simpleMatch(tok->previous(), "operator")) continue; // Skip incomplete code - if (!tok->astOperand1() && !tok->astOperand2() && !tok->astParent()) + if (!tok->astOperand1() && !tok->astOperand2() && !tok->astParent() && !(tok->str().size() == 2 && tok->str()[1] == '=')) continue; // Skip lambda assignment and/or initializer if (Token::Match(tok, "= {|^|[")) diff --git a/test/cli/fuzz-crash/crash-793c09dbb007b0e1a295f592813f40f8d6d449d1 b/test/cli/fuzz-crash/crash-793c09dbb007b0e1a295f592813f40f8d6d449d1 new file mode 100644 index 00000000000..706fe52b407 --- /dev/null +++ b/test/cli/fuzz-crash/crash-793c09dbb007b0e1a295f592813f40f8d6d449d1 @@ -0,0 +1 @@ +enum{A=s(u)0&=s};