Renamed --debug to --debug-simplified

This commit is contained in:
Daniel Marjamäki 2018-08-05 11:19:20 +02:00
parent bcdd58de0b
commit ddbe4b89b5
6 changed files with 8 additions and 8 deletions

View File

@ -132,8 +132,8 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
}
// Flag used for various purposes during debugging
else if (std::strcmp(argv[i], "--debug") == 0)
_settings->debug = _settings->debugwarnings = true;
else if (std::strcmp(argv[i], "--debug-simplified") == 0)
_settings->debugSimplified = true;
// Show --debug output after the first simplifications
else if (std::strcmp(argv[i], "--debug-normal") == 0)

View File

@ -2066,7 +2066,7 @@ void CheckMemoryLeakInFunction::checkScope(const Token *startTok, const std::str
simplifycode(tok);
if (mSettings->debug && mSettings->verbose) {
if (mSettings->debugwarnings) {
tok->printOut(("Checkmemoryleak: simplifycode result for: " + varname).c_str());
}

View File

@ -393,7 +393,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
if (mSettings.force || mSettings.maxConfigs > 1) {
const unsigned long long checksum = mTokenizer.list.calculateChecksum();
if (checksums.find(checksum) != checksums.end()) {
if (mSettings.isEnabled(Settings::INFORMATION) && (mSettings.debug || mSettings.verbose))
if (mSettings.debugwarnings)
purgedConfigurationMessage(filename, mCurrentConfig);
continue;
}

View File

@ -24,7 +24,7 @@ bool Settings::mTerminated;
Settings::Settings()
: mEnabled(0),
debug(false),
debugSimplified(false),
debugnormal(false),
debugwarnings(false),
dump(false),

View File

@ -73,8 +73,8 @@ public:
/** @brief --cppcheck-build-dir */
std::string buildDir;
/** @brief Is --debug given? */
bool debug;
/** @brief Is --debug-simplified given? */
bool debugSimplified;
/** @brief Is --debug-normal given? */
bool debugnormal;

View File

@ -4038,7 +4038,7 @@ bool Tokenizer::simplifyTokenList2()
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);
if (debug && list.front()) {