Also backport fix for cyclic aliases

This commit is contained in:
Dmitry Novik 2024-08-01 16:06:13 +02:00 committed by GitHub
parent eb3484dfd1
commit 3afb4ab0e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -650,7 +650,12 @@ struct ScopeAliases
if (jt == transitive_aliases.end()) if (jt == transitive_aliases.end())
return {}; return {};
key = &(getKey(jt->second, find_option)); const auto & new_key = getKey(jt->second, find_option);
/// Ignore potential cyclic aliases.
if (new_key == *key)
return {};
key = &new_key;
it = alias_map.find(*key); it = alias_map.find(*key);
} }