Renamed --debug to --debug-simplified
This commit is contained in:
parent
bcdd58de0b
commit
ddbe4b89b5
|
@ -132,8 +132,8 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flag used for various purposes during debugging
|
// Flag used for various purposes during debugging
|
||||||
else if (std::strcmp(argv[i], "--debug") == 0)
|
else if (std::strcmp(argv[i], "--debug-simplified") == 0)
|
||||||
_settings->debug = _settings->debugwarnings = true;
|
_settings->debugSimplified = true;
|
||||||
|
|
||||||
// Show --debug output after the first simplifications
|
// Show --debug output after the first simplifications
|
||||||
else if (std::strcmp(argv[i], "--debug-normal") == 0)
|
else if (std::strcmp(argv[i], "--debug-normal") == 0)
|
||||||
|
|
|
@ -2066,7 +2066,7 @@ void CheckMemoryLeakInFunction::checkScope(const Token *startTok, const std::str
|
||||||
|
|
||||||
simplifycode(tok);
|
simplifycode(tok);
|
||||||
|
|
||||||
if (mSettings->debug && mSettings->verbose) {
|
if (mSettings->debugwarnings) {
|
||||||
tok->printOut(("Checkmemoryleak: simplifycode result for: " + varname).c_str());
|
tok->printOut(("Checkmemoryleak: simplifycode result for: " + varname).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
if (mSettings.force || mSettings.maxConfigs > 1) {
|
if (mSettings.force || mSettings.maxConfigs > 1) {
|
||||||
const unsigned long long checksum = mTokenizer.list.calculateChecksum();
|
const unsigned long long checksum = mTokenizer.list.calculateChecksum();
|
||||||
if (checksums.find(checksum) != checksums.end()) {
|
if (checksums.find(checksum) != checksums.end()) {
|
||||||
if (mSettings.isEnabled(Settings::INFORMATION) && (mSettings.debug || mSettings.verbose))
|
if (mSettings.debugwarnings)
|
||||||
purgedConfigurationMessage(filename, mCurrentConfig);
|
purgedConfigurationMessage(filename, mCurrentConfig);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ bool Settings::mTerminated;
|
||||||
|
|
||||||
Settings::Settings()
|
Settings::Settings()
|
||||||
: mEnabled(0),
|
: mEnabled(0),
|
||||||
debug(false),
|
debugSimplified(false),
|
||||||
debugnormal(false),
|
debugnormal(false),
|
||||||
debugwarnings(false),
|
debugwarnings(false),
|
||||||
dump(false),
|
dump(false),
|
||||||
|
|
|
@ -73,8 +73,8 @@ public:
|
||||||
/** @brief --cppcheck-build-dir */
|
/** @brief --cppcheck-build-dir */
|
||||||
std::string buildDir;
|
std::string buildDir;
|
||||||
|
|
||||||
/** @brief Is --debug given? */
|
/** @brief Is --debug-simplified given? */
|
||||||
bool debug;
|
bool debugSimplified;
|
||||||
|
|
||||||
/** @brief Is --debug-normal given? */
|
/** @brief Is --debug-normal given? */
|
||||||
bool debugnormal;
|
bool debugnormal;
|
||||||
|
|
|
@ -4038,7 +4038,7 @@ bool Tokenizer::simplifyTokenList2()
|
||||||
|
|
||||||
void Tokenizer::printDebugOutput(unsigned int simplification) const
|
void Tokenizer::printDebugOutput(unsigned int simplification) const
|
||||||
{
|
{
|
||||||
const bool debug = (simplification != 1U && mSettings->debug) ||
|
const bool debug = (simplification != 1U && mSettings->debugSimplified) ||
|
||||||
(simplification != 2U && mSettings->debugnormal);
|
(simplification != 2U && mSettings->debugnormal);
|
||||||
|
|
||||||
if (debug && list.front()) {
|
if (debug && list.front()) {
|
||||||
|
|
Loading…
Reference in New Issue