@@ -446,6 +446,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
446446
447447 bool def = false ;
448448 bool maxconfigs = false ;
449+ bool debug = false ;
449450
450451 ImportProject::Type projectType = ImportProject::Type::NONE;
451452 ImportProject project;
@@ -651,6 +652,9 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
651652 mSettings .cppHeaderProbe = true ;
652653 }
653654
655+ else if (std::strcmp (argv[i], " --debug" ) == 0 )
656+ debug = true ;
657+
654658 else if (std::strcmp (argv[i], " --debug-ast" ) == 0 )
655659 mSettings .debugast = true ;
656660
@@ -663,8 +667,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
663667 mSettings .debugignore = true ;
664668
665669 // Show --debug output after the first simplifications
666- else if (std::strcmp (argv[i], " --debug" ) == 0 ||
667- std::strcmp (argv[i], " --debug-normal" ) == 0 )
670+ else if (std::strcmp (argv[i], " --debug-normal" ) == 0 )
668671 mSettings .debugnormal = true ;
669672
670673 // Show debug warnings for lookup for configuration files
@@ -1610,10 +1613,17 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
16101613
16111614 if (mSettings .force )
16121615 mSettings .maxConfigs = INT_MAX;
1613-
16141616 else if ((def || mSettings .preprocessOnly ) && !maxconfigs)
16151617 mSettings .maxConfigs = 1U ;
16161618
1619+ if (debug) {
1620+ mSettings .debugnormal = true ;
1621+ if (mSettings .verbose ) {
1622+ mSettings .debugast = true ;
1623+ mSettings .debugsymdb = true ;
1624+ }
1625+ }
1626+
16171627 if (mSettings .jobs > 1 && mSettings .buildDir .empty ()) {
16181628 // TODO: bail out instead?
16191629 if (mSettings .checks .isEnabled (Checks::unusedFunction))
0 commit comments