[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
@@ -1121,6 +1121,14 @@ def CoroLifetimeBound : InheritableAttr { let SimpleHandler = 1; } +def CoroNotLifetimeBound : InheritableAttr { usx95 wrote: SG. https://github.com/llvm/llvm-project/pull/76818 ___

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/76818 >From cc7ff8b7ecb93165172dbb481c7d5fcb64289a96 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 3 Jan 2024 14:44:58 +0100 Subject: [PATCH 1/4] [coroutines] Introduce [[clang::coro_not_lifetimebound]] ---

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/76818 >From cc7ff8b7ecb93165172dbb481c7d5fcb64289a96 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 3 Jan 2024 14:44:58 +0100 Subject: [PATCH 1/3] [coroutines] Introduce [[clang::coro_not_lifetimebound]] ---

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Ilya Biryukov via cfe-commits
@@ -7671,9 +7671,12 @@ The ``[[clang::coro_lifetimebound]]`` is a class attribute which can be applied to a coroutine return type (`CRT`_) (i.e. it should also be annotated with ``[[clang::coro_return_type]]``). -All parameters of a function are considered to be lifetime

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Ilya Biryukov via cfe-commits
@@ -115,3 +115,18 @@ CoNoCRT bar(int a) { co_return 1; } } // namespace not_a_crt + +// = +// Not lifetime bound coroutine wrappers: [[clang::coro_not_lifetimebound]]. +//

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Ilya Biryukov via cfe-commits
@@ -1121,6 +1121,14 @@ def CoroLifetimeBound : InheritableAttr { let SimpleHandler = 1; } +def CoroNotLifetimeBound : InheritableAttr { ilya-biryukov wrote: Any alternatives to this name? Maybe `coro_disable_lifetime_bound`? The current name confused me a

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/76818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes Lifetime-bound analysis of reference parameters of coroutines and coroutine wrappers is helpful in surfacing memory bugs associated with using temporaries and stack variables in call expressions in plain

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/76818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/76818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/76818 >From cc7ff8b7ecb93165172dbb481c7d5fcb64289a96 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 3 Jan 2024 14:44:58 +0100 Subject: [PATCH 1/2] [coroutines] Introduce [[clang::coro_not_lifetimebound]] ---

[clang] [coroutines] Introduce [[clang::coro_not_lifetimebound]] (PR #76818)

2024-01-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/76818 Lifetime-bound analysis of reference parameters of coroutines and coroutine wrappers is helpful in surfacing memory bugs associated with using temporaries and stack variables in call expressions in plain return