[clang] 4ad4487 - [clang] Use llvm::is_contained (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 16 09:19:21 PDT 2022


Author: Kazu Hirata
Date: 2022-10-16T09:19:08-07:00
New Revision: 4ad44872c4e88f78a6d6906c345ad502dd92a455

URL: https://github.com/llvm/llvm-project/commit/4ad44872c4e88f78a6d6906c345ad502dd92a455
DIFF: https://github.com/llvm/llvm-project/commit/4ad44872c4e88f78a6d6906c345ad502dd92a455.diff

LOG: [clang] Use llvm::is_contained (NFC)

Added: 
    

Modified: 
    clang/include/clang/AST/OpenMPClause.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index 23b4a9517192c..1a4ec43705bc3 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -8965,9 +8965,7 @@ class OMPChildren final
   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) {


        


More information about the cfe-commits mailing list