[all-commits] [llvm/llvm-project] 277a9f: [libc++] Add [[clang::lifetimebound]] attribute to...

philnik777 via All-commits all-commits at lists.llvm.org
Fri Jan 13 17:54:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 277a9f6e5f85bfa1c58ca21c26a5a74326f002ff
      https://github.com/llvm/llvm-project/commit/277a9f6e5f85bfa1c58ca21c26a5a74326f002ff
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2023-01-14 (Sat, 14 Jan 2023)

  Changed paths:
    M libcxx/include/__config
    M libcxx/include/__utility/forward.h
    M libcxx/include/__utility/forward_like.h
    M libcxx/include/__utility/move.h
    A libcxx/test/libcxx/utilities/utility/forward/lifetimebound.verify.cpp

  Log Message:
  -----------
  [libc++] Add [[clang::lifetimebound]] attribute to std::forward and friends

This allows clang to catch lifetime bugs through these functions.
As a drive-by, replace `_LIBCPP_INLINE_VISIBILITY` with `_LIBCPP_HIDE_FROM_ABI`.
Fixes #59900

Reviewed By: ldionne, #libc

Spies: rsmith, rnk, aaron.ballman, libcxx-commits

Differential Revision: https://reviews.llvm.org/D141321




More information about the All-commits mailing list