diff options
Diffstat (limited to 'flang/lib/Semantics/check-declarations.cpp')
-rw-r--r-- | flang/lib/Semantics/check-declarations.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/flang/lib/Semantics/check-declarations.cpp b/flang/lib/Semantics/check-declarations.cpp index ddf0a011b2f7..5d063f14499a 100644 --- a/flang/lib/Semantics/check-declarations.cpp +++ b/flang/lib/Semantics/check-declarations.cpp @@ -2209,15 +2209,14 @@ void DistinguishabilityHelper::Check(const Scope &scope) { for (const auto &[name, info] : nameToInfo_) { auto count{info.size()}; for (std::size_t i1{0}; i1 < count - 1; ++i1) { - const auto &[kind1, symbol1, proc1] = info[i1]; + const auto &[kind, symbol, proc]{info[i1]}; for (std::size_t i2{i1 + 1}; i2 < count; ++i2) { - const auto &[kind2, symbol2, proc2] = info[i2]; - auto distinguishable{kind1.IsName() + auto distinguishable{kind.IsName() ? evaluate::characteristics::Distinguishable : evaluate::characteristics::DistinguishableOpOrAssign}; - if (!distinguishable(proc1, proc2)) { - SayNotDistinguishable( - GetTopLevelUnitContaining(scope), name, kind1, symbol1, symbol2); + if (!distinguishable(proc, info[i2].procedure)) { + SayNotDistinguishable(GetTopLevelUnitContaining(scope), name, kind, + symbol, info[i2].symbol); } } } |