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) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits