[all-commits] [llvm/llvm-project] 902b2a: [clang] Add lifetimebound attr to std::span/std::s...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Wed Aug 28 01:50:39 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 902b2a26ab9e1e78dfb66b52fba4512c91472e09
https://github.com/llvm/llvm-project/commit/902b2a26ab9e1e78dfb66b52fba4512c91472e09
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2024-08-28 (Wed, 28 Aug 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Sema/Sema.h
M clang/lib/Sema/SemaAttr.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/test/SemaCXX/attr-lifetimebound.cpp
Log Message:
-----------
[clang] Add lifetimebound attr to std::span/std::string_view constructor (#103716)
With this patch, clang now automatically adds
``[[clang::lifetimebound]]`` to the parameters of `std::span,
std::string_view` constructors, this enables Clang to capture more cases
where the returned reference outlives the object.
Fixes #100567
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list