[libcxx-commits] [libcxx] Add [[clang::lifetimebound]] to numerous functions in libc++ include headers (PR #112751)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 22 23:07:11 PDT 2024


higher-performance wrote:

By the way - I keep getting [this confusing error](https://github.com/llvm/llvm-project/actions/runs/11472747270/job/31925816201?pr=112751#step:3:4068) in CI, and I'm not sure if I'm decorating something incorrectly. If anyone has an idea, please let me know:
```
/home/runner/_work/llvm-project/llvm-project/build/generic-cxx26/libcxx/test-suite-install/include/c++/v1/__ranges/view_interface.h:155:12: error: returning reference to local temporary object
  155 |     return ranges::begin(__derived())[__index];
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/_work/llvm-project/llvm-project/libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp:40:7: note: in instantiation of function template specialization 'std::ranges::view_interface<std::ranges::drop_view<std::vector<int>>>::operator[]<std::ranges::drop_view<std::vector<int>>>' requested here
   40 |   if (v[2] != v[0] + v[1])
      |       ^
/home/runner/_work/llvm-project/llvm-project/libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp:79:10: note: in instantiation of function template specialization 'orderedFibonacci<std::ranges::drop_view<std::vector<int>>>' requested here
   79 |   assert(orderedFibonacci(std::ranges::drop_view(vec, 0)));
      |          ^
```
The commit of interest: e2afb0bd03a49faf4c1df4b94f4cfe322e564c6c

https://github.com/llvm/llvm-project/pull/112751


More information about the libcxx-commits mailing list