[flang-commits] [flang] c63465b - [flang] Use llvm::is_contained (NFC)
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Sun Nov 6 19:58:56 PST 2022
Author: Kazu Hirata
Date: 2022-11-06T19:58:51-08:00
New Revision: c63465bd0655686c44d59ffa3978cdc74119c4d8
URL: https://github.com/llvm/llvm-project/commit/c63465bd0655686c44d59ffa3978cdc74119c4d8
DIFF: https://github.com/llvm/llvm-project/commit/c63465bd0655686c44d59ffa3978cdc74119c4d8.diff
LOG: [flang] Use llvm::is_contained (NFC)
Added:
Modified:
flang/lib/Semantics/compute-offsets.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/compute-offsets.cpp b/flang/lib/Semantics/compute-offsets.cpp
index 237b6b6545d73..779afa6f0bc3d 100644
--- a/flang/lib/Semantics/compute-offsets.cpp
+++ b/flang/lib/Semantics/compute-offsets.cpp
@@ -174,8 +174,7 @@ void ComputeOffsetsHelper::DoCommonBlock(Symbol &commonBlock) {
if (const auto *baseBlock{FindCommonBlockContaining(base)}) {
if (baseBlock == &commonBlock) {
if (base.offset() != symbol.offset() - dep.offset ||
- std::find(details.objects().begin(), details.objects().end(),
- base) != details.objects().end()) {
+ llvm::is_contained(details.objects(), base)) {
context_.Say(errorSite,
"'%s' is storage associated with '%s' by EQUIVALENCE elsewhere in COMMON block /%s/"_err_en_US,
symbol.name(), base.name(), commonBlock.name());
More information about the flang-commits
mailing list