CheckBoost: Use 'normal' checking

This commit is contained in:
Daniel Marjamäki 2019-03-09 20:00:31 +01:00
parent 5a42c54d0f
commit 69c05acd3b
2 changed files with 10 additions and 5 deletions

View File

@ -48,16 +48,22 @@ public:
: Check(myName(), tokenizer, settings, errorLogger) {
}
/** Simplified checks. The token list is simplified. */
void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
/** @brief Run checks against the normal token list */
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
if (!tokenizer->isCPP())
return;
CheckBoost checkBoost(tokenizer, settings, errorLogger);
checkBoost.checkBoostForeachModification();
}
/** Simplified checks. The token list is simplified. */
void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
(void)tokenizer;
(void)settings;
(void)errorLogger;
}
/** @brief %Check for container modification while using the BOOST_FOREACH macro */
void checkBoostForeachModification();

View File

@ -46,11 +46,10 @@ private:
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList2();
// Check..
CheckBoost checkBoost;
checkBoost.runSimplifiedChecks(&tokenizer, &settings, this);
checkBoost.runChecks(&tokenizer, &settings, this);
}
void BoostForeachContainerModification() {