diff --git a/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp b/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp index cc292348915a..cf29744f3075 100644 --- a/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp +++ b/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp @@ -373,8 +373,8 @@ private: ArrayRef indexLookup(StringRef Key, const std::vector &Idx) const { // Use pointers as iteratiors to ease conversion of result to ArrayRef. - auto Range = - std::equal_range(&Idx[0], &Idx[Idx.size()], Key, Less()); + auto Range = std::equal_range(Idx.data(), Idx.data() + Idx.size(), Key, + Less()); return {Range.first, Range.second}; }