Skip to content

Commit 06f2dcc

Browse files
committed
refs #14616 - use std::unordered_set in TokenList::validateAst()
1 parent aec1a7f commit 06f2dcc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tokenlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ void TokenList::validateAst(bool print) const
19191919
mTokensFrontBack->front->printOut(std::cout);
19201920
}};
19211921
// Check for some known issues in AST to avoid crash/hang later on
1922-
std::set<const Token*> safeAstTokens; // list of "safe" AST tokens without endless recursion
1922+
std::unordered_set<const Token*> safeAstTokens; // list of "safe" AST tokens without endless recursion
19231923
for (const Token *tok = mTokensFrontBack->front; tok; tok = tok->next()) {
19241924
// Syntax error if binary operator only has 1 operand
19251925
if ((tok->isAssignmentOp() || tok->isComparisonOp() || Token::Match(tok,"[|^/%]")) && tok->astOperand1() && !tok->astOperand2())

0 commit comments

Comments
 (0)