diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
| commit | 145449b1e420787bb99721a429341fa6be3adfb6 (patch) | |
| tree | 1d56ae694a6de602e348dd80165cf881a36600ed /clang/lib/AST/Interp/Function.cpp | |
| parent | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff) | |
Diffstat (limited to 'clang/lib/AST/Interp/Function.cpp')
| -rw-r--r-- | clang/lib/AST/Interp/Function.cpp | 3 |
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; |
