diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2025-07-18 13:26:00 -0700 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2025-07-18 13:26:00 -0700 |
| commit | 9bf3524731070cadc6175707314f3b6ca37190d5 (patch) | |
| tree | 86dcab7604336b01ae938fe81062c29ff69efba8 /flang/lib/Semantics/tools.cpp | |
| parent | 3a84c15cc13b6daf8e812592898ab6c7f19091a9 (diff) | |
| parent | 4f43f0606c3d7e1ce6d069583b5e59f036e112ce (diff) | |
Created using spr 1.3.6-beta.1
Diffstat (limited to 'flang/lib/Semantics/tools.cpp')
| -rw-r--r-- | flang/lib/Semantics/tools.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/flang/lib/Semantics/tools.cpp b/flang/lib/Semantics/tools.cpp index d27d250b3f11..5a5b02e1ac3c 100644 --- a/flang/lib/Semantics/tools.cpp +++ b/flang/lib/Semantics/tools.cpp @@ -348,9 +348,9 @@ const Symbol &BypassGeneric(const Symbol &symbol) { const Symbol &GetCrayPointer(const Symbol &crayPointee) { const Symbol *found{nullptr}; - for (const auto &[pointee, pointer] : - crayPointee.GetUltimate().owner().crayPointers()) { - if (pointee == crayPointee.name()) { + const Symbol &ultimate{crayPointee.GetUltimate()}; + for (const auto &[pointee, pointer] : ultimate.owner().crayPointers()) { + if (pointee == ultimate.name()) { found = &pointer.get(); break; } @@ -1740,7 +1740,7 @@ std::forward_list<std::string> GetOperatorNames( std::forward_list<std::string> GetAllNames( const SemanticsContext &context, const SourceName &name) { std::string str{name.ToString()}; - if (!name.empty() && name.end()[-1] == ')' && + if (!name.empty() && name.back() == ')' && name.ToString().rfind("operator(", 0) == 0) { for (int i{0}; i != common::LogicalOperator_enumSize; ++i) { auto names{GetOperatorNames(context, common::LogicalOperator{i})}; |
