Merge pull request #587 from simartin/instantiation_point_in_debug_message

Show template instantiation and not definition location in template instantiation debug message
This commit is contained in:
PKEuS 2015-04-05 20:41:01 +02:00
commit 6370c11386
1 changed files with 2 additions and 2 deletions

View File

@ -1271,9 +1271,9 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
if (typeForNewName.empty() || typeParametersInDeclaration.size() != typesUsedInTemplateInstantiation.size()) { if (typeForNewName.empty() || typeParametersInDeclaration.size() != typesUsedInTemplateInstantiation.size()) {
if (_settings->debugwarnings && errorlogger) { if (_settings->debugwarnings && errorlogger) {
std::list<const Token *> callstack(1, tok); std::list<const Token *> callstack(1, tok2);
errorlogger->reportErr(ErrorLogger::ErrorMessage(callstack, &tokenlist, Severity::debug, "debug", errorlogger->reportErr(ErrorLogger::ErrorMessage(callstack, &tokenlist, Severity::debug, "debug",
"Failed to instantiate template. The checking continues anyway.", false)); "Failed to instantiate template \"" + name + "\". The checking continues anyway.", false));
} }
if (typeForNewName.empty()) if (typeForNewName.empty())
continue; continue;