Tokenizer: Only show 'failed to instantiate template' debug messages if the --debug-warnings has been given
This commit is contained in:
parent
27b7638901
commit
21ec772e31
|
@ -2652,20 +2652,21 @@ void Tokenizer::simplifyTemplates()
|
||||||
|
|
||||||
if (type2.empty() || type.size() != types2.size())
|
if (type2.empty() || type.size() != types2.size())
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
if (_settings && _settings->debugwarnings)
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
{
|
||||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
||||||
loc.line = tok2->linenr();
|
ErrorLogger::ErrorMessage::FileLocation loc;
|
||||||
loc.setfile(file(tok2));
|
loc.line = tok2->linenr();
|
||||||
locationList.push_back(loc);
|
loc.setfile(file(tok2));
|
||||||
|
locationList.push_back(loc);
|
||||||
|
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList,
|
const ErrorLogger::ErrorMessage errmsg(locationList,
|
||||||
Severity::debug,
|
Severity::debug,
|
||||||
"Failed to instantiate template. The checking continues anyway.",
|
"Failed to instantiate template. The checking continues anyway.",
|
||||||
"templateInstantiate");
|
"debug");
|
||||||
|
|
||||||
_errorLogger->reportErr(errmsg);
|
_errorLogger->reportErr(errmsg);
|
||||||
#endif
|
}
|
||||||
if (type2.empty())
|
if (type2.empty())
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue