Detect alias cycles

This commit is contained in:
2025-06-21 22:32:34 +02:00
parent 67a8d2c057
commit a187e5e62a
10 changed files with 84 additions and 66 deletions

View File

@ -145,8 +145,12 @@ namespace elna::gcc
{
for (const auto& error : errors)
{
auto gcc_location = elna::gcc::get_location(&error->position);
location_t gcc_location{ UNKNOWN_LOCATION };
if (error->position.line != 0 || error->position.column != 0)
{
gcc_location = elna::gcc::get_location(&error->position);
}
error_at(gcc_location, error->what().c_str());
}
}