diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/Interp/Function.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/AST/Interp/Function.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp b/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp index 0ed13a92aa38..6ba97df1cd30 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp +++ b/contrib/llvm-project/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; |