AnalysisFramework.formatErrors(): Fix _withErrorIds flag not having any effect

This commit is contained in:
Kamil Śliwak
2023-08-11 14:15:56 +02:00
parent a59fc39f10
commit 339053f185
2 changed files with 9 additions and 8 deletions
+8 -7
View File
@@ -147,15 +147,17 @@ ErrorList AnalysisFramework::expectError(std::string const& _source, bool _warni
}
string AnalysisFramework::formatErrors(
langutil::ErrorList _errors,
langutil::ErrorList const& _errors,
bool _colored,
bool _withErrorIds
) const
{
string message;
for (auto const& error: _errors)
message += formatError(*error, _colored, _withErrorIds);
return message;
return SourceReferenceFormatter::formatErrorInformation(
_errors,
*m_compiler,
_colored,
_withErrorIds
);
}
string AnalysisFramework::formatError(
@@ -164,9 +166,8 @@ string AnalysisFramework::formatError(
bool _withErrorIds
) const
{
return SourceReferenceFormatter::formatExceptionInformation(
return SourceReferenceFormatter::formatErrorInformation(
_error,
_error.type(),
*m_compiler,
_colored,
_withErrorIds
+1 -1
View File
@@ -58,7 +58,7 @@ protected:
langutil::ErrorList expectError(std::string const& _source, bool _warning = false, bool _allowMultiple = false);
std::string formatErrors(
langutil::ErrorList _errors,
langutil::ErrorList const& _errors,
bool _colored = false,
bool _withErrorIds = false
) const;