Use 'normal' checking instead of 'simplified'
This commit is contained in:
parent
a2a216bbe3
commit
f40a80c349
|
@ -61,8 +61,7 @@ public:
|
||||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks that uses the simplified token list */
|
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||||
void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
|
||||||
if (tokenizer->isC())
|
if (tokenizer->isC())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -75,6 +74,12 @@ public:
|
||||||
checkExceptionSafety.unhandledExceptionSpecification();
|
checkExceptionSafety.unhandledExceptionSpecification();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||||
|
(void)tokenizer;
|
||||||
|
(void)settings;
|
||||||
|
(void)errorLogger;
|
||||||
|
}
|
||||||
|
|
||||||
/** Don't throw exceptions in destructors */
|
/** Don't throw exceptions in destructors */
|
||||||
void destructors();
|
void destructors();
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,6 @@ private:
|
||||||
// Check...
|
// Check...
|
||||||
CheckBool checkBool(&tokenizer, &settings, this);
|
CheckBool checkBool(&tokenizer, &settings, this);
|
||||||
checkBool.runChecks(&tokenizer, &settings, this);
|
checkBool.runChecks(&tokenizer, &settings, this);
|
||||||
tokenizer.simplifyTokenList2();
|
|
||||||
checkBool.runSimplifiedChecks(&tokenizer, &settings, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,6 @@ private:
|
||||||
// Check for buffer overruns..
|
// Check for buffer overruns..
|
||||||
CheckBufferOverrun checkBufferOverrun;
|
CheckBufferOverrun checkBufferOverrun;
|
||||||
checkBufferOverrun.runChecks(&tokenizer, &settings0, this);
|
checkBufferOverrun.runChecks(&tokenizer, &settings0, this);
|
||||||
tokenizer.simplifyTokenList2();
|
|
||||||
checkBufferOverrun.runSimplifiedChecks(&tokenizer, &settings0, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void check(const char code[], const Settings &settings, const char filename[] = "test.cpp") {
|
void check(const char code[], const Settings &settings, const char filename[] = "test.cpp") {
|
||||||
|
@ -69,8 +67,6 @@ private:
|
||||||
// Check for buffer overruns..
|
// Check for buffer overruns..
|
||||||
CheckBufferOverrun checkBufferOverrun(&tokenizer, &settings, this);
|
CheckBufferOverrun checkBufferOverrun(&tokenizer, &settings, this);
|
||||||
checkBufferOverrun.runChecks(&tokenizer, &settings, this);
|
checkBufferOverrun.runChecks(&tokenizer, &settings, this);
|
||||||
tokenizer.simplifyTokenList2();
|
|
||||||
checkBufferOverrun.runSimplifiedChecks(&tokenizer, &settings, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void run() OVERRIDE {
|
void run() OVERRIDE {
|
||||||
|
|
|
@ -140,8 +140,6 @@ private:
|
||||||
// Run checks..
|
// Run checks..
|
||||||
CheckCondition checkCondition;
|
CheckCondition checkCondition;
|
||||||
checkCondition.runChecks(&tokenizer, &settings0, this);
|
checkCondition.runChecks(&tokenizer, &settings0, this);
|
||||||
tokenizer.simplifyTokenList2();
|
|
||||||
checkCondition.runSimplifiedChecks(&tokenizer, &settings0, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void assignAndCompare() {
|
void assignAndCompare() {
|
||||||
|
|
|
@ -66,7 +66,7 @@ private:
|
||||||
|
|
||||||
// Check char variable usage..
|
// Check char variable usage..
|
||||||
CheckExceptionSafety checkExceptionSafety(&tokenizer, &settings, this);
|
CheckExceptionSafety checkExceptionSafety(&tokenizer, &settings, this);
|
||||||
checkExceptionSafety.runSimplifiedChecks(&tokenizer, &settings, this);
|
checkExceptionSafety.runChecks(&tokenizer, &settings, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void destructors() {
|
void destructors() {
|
||||||
|
|
Loading…
Reference in New Issue