[clang] Use llvm::is_contained (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 16 Oct 2022 16:19:08 +0000 (09:19 -0700)
committerKazu Hirata <kazu@google.com>
Sun, 16 Oct 2022 16:19:08 +0000 (09:19 -0700)
clang/include/clang/AST/OpenMPClause.h

index 23b4a95..1a4ec43 100644 (file)
@@ -8965,9 +8965,7 @@ public:
   const CapturedStmt *
   getCapturedStmt(OpenMPDirectiveKind RegionKind,
                   ArrayRef<OpenMPDirectiveKind> CaptureRegions) const {
-    assert(llvm::any_of(
-               CaptureRegions,
-               [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) &&
+    assert(llvm::is_contained(CaptureRegions, RegionKind) &&
            "RegionKind not found in OpenMP CaptureRegions.");
     auto *CS = cast<CapturedStmt>(getAssociatedStmt());
     for (auto ThisCaptureRegion : CaptureRegions) {