We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0baad49 commit 4a8a5d4Copy full SHA for 4a8a5d4
1 file changed
lib/tokenlist.cpp
@@ -1073,7 +1073,7 @@ void TokenList::validateAst()
1073
1074
// check for endless recursion
1075
const Token* parent=tok;
1076
- while ((parent = parent->astParent())) {
+ while ((parent = parent->astParent()) != nullptr) {
1077
if (parent==tok)
1078
throw InternalError(tok, "AST broken: endless recursion from '" + tok->str() + "'", InternalError::SYNTAX);
1079
}
0 commit comments