MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / isStaticAssert

Function isStaticAssert

lib/checkother.cpp:2857–2871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2855}
2856
2857static bool
2858isStaticAssert(const Settings &settings, const Token *tok)
2859{
2860 if (tok->isCpp() && settings.standards.cpp >= Standards::CPP11 &&
2861 Token::simpleMatch(tok, "static_assert")) {
2862 return true;
2863 }
2864
2865 if (tok->isC() && settings.standards.c >= Standards::C11 &&
2866 Token::simpleMatch(tok, "_Static_assert")) {
2867 return true;
2868 }
2869
2870 return false;
2871}
2872
2873void CheckOtherImpl::checkDuplicateExpression()
2874{

Callers 1

Calls 2

isCMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected