aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/Interp/Function.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-03 14:10:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-03 14:10:23 +0000
commit145449b1e420787bb99721a429341fa6be3adfb6 (patch)
tree1d56ae694a6de602e348dd80165cf881a36600ed /clang/lib/AST/Interp/Function.cpp
parentecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff)
Diffstat (limited to 'clang/lib/AST/Interp/Function.cpp')
-rw-r--r--clang/lib/AST/Interp/Function.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/Interp/Function.cpp b/clang/lib/AST/Interp/Function.cpp
index 0ed13a92aa38..6ba97df1cd30 100644
--- a/clang/lib/AST/Interp/Function.cpp
+++ b/clang/lib/AST/Interp/Function.cpp
@@ -34,8 +34,7 @@ Function::ParamDescriptor Function::getParamDescriptor(unsigned Offset) const {
SourceInfo Function::getSource(CodePtr PC) const {
unsigned Offset = PC - getCodeBegin();
using Elem = std::pair<unsigned, SourceInfo>;
- auto It = std::lower_bound(SrcMap.begin(), SrcMap.end(), Elem{Offset, {}},
- [](Elem A, Elem B) { return A.first < B.first; });
+ auto It = llvm::lower_bound(SrcMap, Elem{Offset, {}}, llvm::less_first());
if (It == SrcMap.end() || It->first != Offset)
llvm::report_fatal_error("missing source location");
return It->second;