Skip to content

Commit c30219e

Browse files
Update checkother.cpp
1 parent 7a8c67a commit c30219e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/checkother.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2927,9 +2927,11 @@ isStaticAssert(const Settings &settings, const Token *tok)
29272927
return true;
29282928
}
29292929

2930-
if (tok->isC() && settings.standards.c >= Standards::C11 &&
2931-
Token::simpleMatch(tok, "_Static_assert")) {
2932-
return true;
2930+
if (tok->isC()) {
2931+
if (settings.standards.c >= Standards::C11 && Token::simpleMatch(tok, "_Static_assert"))
2932+
return true;
2933+
if (settings.standards.c >= Standards::C23 && Token::simpleMatch(tok, "static_assert"))
2934+
return true;
29332935
}
29342936

29352937
return false;

0 commit comments

Comments
 (0)