Author: Kazu Hirata Date: 2025-05-24T09:37:26-07:00 New Revision: 24c782e0030c145bc0deebc56b72a1729b9cdd64
URL: https://github.com/llvm/llvm-project/commit/24c782e0030c145bc0deebc56b72a1729b9cdd64 DIFF: https://github.com/llvm/llvm-project/commit/24c782e0030c145bc0deebc56b72a1729b9cdd64.diff LOG: [clang] Use llvm::partition_point (NFC) (#141351) Added: Modified: clang/lib/Sema/SemaType.cpp clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 874e41ac0b90c..49d10f5502084 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -324,8 +324,8 @@ namespace { // FIXME: This is quadratic if we have lots of reuses of the same // attributed type. - for (auto It = std::partition_point( - AttrsForTypes.begin(), AttrsForTypes.end(), + for (auto It = llvm::partition_point( + AttrsForTypes, [=](const TypeAttrPair &A) { return A.first < AT; }); It != AttrsForTypes.end() && It->first == AT; ++It) { if (It->second) { diff --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 2ab248f9aa6d9..6715ab2f30b3a 100644 --- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -574,8 +574,8 @@ void PlistDiagnostics::printBugPath(llvm::raw_ostream &o, const FIDMap &FM, }) && "PathDiagnostic is not partitioned so that notes precede the rest"); - PathPieces::const_iterator FirstNonNote = std::partition_point( - Path.begin(), Path.end(), [](const PathDiagnosticPieceRef &E) { + PathPieces::const_iterator FirstNonNote = + llvm::partition_point(Path, [](const PathDiagnosticPieceRef &E) { return E->getKind() == PathDiagnosticPiece::Note; }); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits