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

Method runChecks

lib/checkstl.cpp:3456–3491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3454}
3455
3456void CheckStl::runChecks(const Tokenizer &tokenizer, ErrorLogger& errorLogger)
3457{
3458 if (!tokenizer.isCPP()) {
3459 return;
3460 }
3461
3462 CheckStlImpl checkStl(&tokenizer, tokenizer.getSettings(), errorLogger);
3463 checkStl.erase();
3464 checkStl.if_find();
3465 checkStl.checkFindInsert();
3466 checkStl.iterators();
3467 checkStl.missingComparison();
3468 checkStl.outOfBounds();
3469 checkStl.outOfBoundsIndexExpression();
3470 checkStl.redundantCondition();
3471 checkStl.string_c_str();
3472 checkStl.uselessCalls();
3473 checkStl.useStlAlgorithm();
3474
3475 checkStl.stlOutOfBounds();
3476 checkStl.negativeIndex();
3477
3478 checkStl.invalidContainer();
3479 checkStl.mismatchingContainers();
3480 checkStl.mismatchingContainerIterator();
3481 checkStl.knownEmptyContainer();
3482 checkStl.eraseIteratorOutOfBounds();
3483
3484 checkStl.stlBoundaries();
3485 checkStl.checkDereferenceInvalidIterator();
3486 checkStl.checkDereferenceInvalidIterator2();
3487 checkStl.checkMutexes();
3488
3489 // Style check
3490 checkStl.size();
3491}
3492
3493void CheckStl::getErrorMessages(ErrorLogger& errorLogger, const Settings& settings) const
3494{

Callers

nothing calls this directly

Calls 15

isCPPMethod · 0.80
checkFindInsertMethod · 0.80
iteratorsMethod · 0.80
missingComparisonMethod · 0.80
redundantConditionMethod · 0.80
string_c_strMethod · 0.80
useStlAlgorithmMethod · 0.80
stlOutOfBoundsMethod · 0.80
mismatchingContainersMethod · 0.80
knownEmptyContainerMethod · 0.80
stlBoundariesMethod · 0.80

Tested by

no test coverage detected