Skip to content

Commit 529f1a7

Browse files
committed
fix #14315
1 parent fcaaf1d commit 529f1a7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/checkother.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,9 @@ void CheckOther::checkDuplicateExpression()
29482948
while (parent && parent->astParent()) {
29492949
parent = parent->astParent();
29502950
}
2951-
if (parent && parent->previous() && isStaticAssert(*mSettings, parent->previous())) {
2951+
if (parent && parent->previous() &&
2952+
(isStaticAssert(*mSettings, parent->previous()) ||
2953+
Token::simpleMatch(parent->previous(), "assert"))) {
29522954
continue;
29532955
}
29542956
}

0 commit comments

Comments
 (0)