Move CheckStl::missingComparison to normal checks

This commit is contained in:
Daniel Marjamäki 2019-03-08 20:19:40 +01:00
parent 75ce67f4b8
commit 725abbfac3
2 changed files with 7 additions and 2 deletions

View File

@ -60,6 +60,7 @@ public:
}
CheckStl checkStl(tokenizer, settings, errorLogger);
checkStl.missingComparison();
checkStl.outOfBounds();
checkStl.outOfBoundsIndexExpression();
}
@ -88,7 +89,6 @@ public:
// Style check
checkStl.size();
checkStl.redundantCondition();
checkStl.missingComparison();
checkStl.useStlAlgorithm();
}

View File

@ -167,14 +167,19 @@ private:
settings.inconclusive = inconclusive;
settings.standards.cpp = cppstandard;
// Tokenize..
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
CheckStl checkStl(&tokenizer, &settings, this);
tokenizer.tokenize(istr, "test.cpp");
checkStl.runChecks(&tokenizer, &settings, this);
tokenizer.simplifyTokenList2();
// Check..
CheckStl checkStl(&tokenizer, &settings, this);
checkStl.runSimplifiedChecks(&tokenizer, &settings, this);
}
void check(const std::string &code, const bool inconclusive=false) {