We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55262f0 commit 503662fCopy full SHA for 503662f
1 file changed
lib/checkstl.cpp
@@ -1559,7 +1559,7 @@ void CheckStl::checkFindInsert()
1559
if (!containerTok)
1560
continue;
1561
// In < C++17 we only warn for small simple types
1562
- if (!(keyTok->valueType()->isIntegral() || keyTok->valueType()->pointer > 0) && mSettings->standards.cpp < Standards::CPP17)
+ if (mSettings->standards.cpp < Standards::CPP17 && !(keyTok && keyTok->valueType() && (keyTok->valueType()->isIntegral() || keyTok->valueType()->pointer > 0)))
1563
1564
1565
const Token *thenTok = tok->next()->link()->next();
0 commit comments