https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 164bf1e94ec05e50be05d085ce2a4381711df11b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 01/10] Introduce [[clang::coro_lifetimebound]]
(cherry picked from
usx95 wrote:
I would add the mentioned warning in a follow-up change.
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -334,6 +334,10 @@ Attribute Changes in Clang
[[clang::code_align(A)]] for(;;) { }
}
+- Clang now introduced ``[[clang::coro_lifetimebound]]`` attribute.
+ All arguments to a function are considered to be lifetime bound if the
function
ilya-b
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov approved this pull request.
LGTM with a few suggestiosn.
One is in the comment.
I also suggest to add a warning when users mark the type as
`coro_lifetimebound` without `coro_return_type`.
The analysis will be disabled in this case and it may be hard to understa
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 164bf1e94ec05e50be05d085ce2a4381711df11b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/9] Introduce [[clang::coro_lifetimebound]]
(cherry picked from co
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 164bf1e94ec05e50be05d085ce2a4381711df11b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/8] Introduce [[clang::coro_lifetimebound]]
(cherry picked from co
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 164bf1e94ec05e50be05d085ce2a4381711df11b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/7] Introduce [[clang::coro_lifetimebound]]
(cherry picked from co
@@ -0,0 +1,120 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only
-verify -Wall -Wextra -Wno-error=unreachable-code -Wno-unused
+
+#include "Inputs/std-coroutine.h"
+
+using std::suspend_always;
+using std::suspend_never;
+
+template struct [[clang::
@@ -7581,3 +7580,59 @@ alignment boundary. Its value must be a power of 2,
between 1 and 4096
}];
}
+
+def CoroLifetimeBoundDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_lifetimebound]]`` is a class attribute which can be appli
@@ -0,0 +1,120 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only
-verify -Wall -Wextra -Wno-error=unreachable-code -Wno-unused
+
+#include "Inputs/std-coroutine.h"
+
+using std::suspend_always;
+using std::suspend_never;
+
+template struct [[clang::
@@ -7581,3 +7580,59 @@ alignment boundary. Its value must be a power of 2,
between 1 and 4096
}];
}
+
+def CoroLifetimeBoundDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_lifetimebound]]`` is a class attribute which can be appli
@@ -0,0 +1,120 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only
-verify -Wall -Wextra -Wno-error=unreachable-code -Wno-unused
+
+#include "Inputs/std-coroutine.h"
+
+using std::suspend_always;
+using std::suspend_never;
+
+template struct [[clang::
https://github.com/hokein approved this pull request.
Thanks, looks good from my side. Some nits.
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -7580,10 +7580,15 @@ static void
visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee))
VisitLifetimeBoundArg(Callee, ObjectArg);
+ bool checkCoroCall = false;
hokein wrote:
nit
@@ -7581,3 +7580,59 @@ alignment boundary. Its value must be a power of 2,
between 1 and 4096
}];
}
+
+def CoroLifetimeBoundDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_lifetimebound]]`` is a class attribute which can be appli
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 164bf1e94ec05e50be05d085ce2a4381711df11b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/6] Introduce [[clang::coro_lifetimebound]]
(cherry picked from co
https://github.com/usx95 reopened
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 164bf1e94ec05e50be05d085ce2a4381711df11b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/5] Introduce [[clang::coro_lifetimebound]]
(cherry picked from co
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 28e9fda4b78e1e60287048891cc92bafdef3ac4c Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/5] Introduce [[clang::coro_lifetimebound]]
---
clang/include/cla
@@ -7483,7 +7483,6 @@ generation of the other destruction cases, optimizing the
above `foo.destroy` to
}];
}
-
usx95 wrote:
Acknowledged. Keeping it to match the 1 line space style of the file.
https://github.com/llvm/llvm-project/pull/72851
_
@@ -7483,7 +7483,6 @@ generation of the other destruction cases, optimizing the
above `foo.destroy` to
}];
}
-
ChuanqiXu9 wrote:
nit: unnecessary changes.
https://github.com/llvm/llvm-project/pull/72851
___
cfe-
@@ -7580,10 +7580,15 @@ static void
visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee))
VisitLifetimeBoundArg(Callee, ObjectArg);
+ bool checkCoroCall = false;
+ if (const auto *RD = Callee->get
https://github.com/ChuanqiXu9 approved this pull request.
LGTM. Please wait for few days in case there are other comments.
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 28e9fda4b78e1e60287048891cc92bafdef3ac4c Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/4] Introduce [[clang::coro_lifetimebound]]
---
clang/include/cla
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Utkarsh Saxena (usx95)
Changes
Adds attribute `[[clang::coro_lifetimebound]]`.
All arguments to a function are considered to be **lifetime bound** if the
function
returns a type annotated with ``[[clang::coro_lifetimebound]]`` and
``[[c
https://github.com/usx95 ready_for_review
https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/72851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 28e9fda4b78e1e60287048891cc92bafdef3ac4c Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/3] Introduce [[clang::coro_lifetimebound]]
---
clang/include/cla
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72851
>From 28e9fda4b78e1e60287048891cc92bafdef3ac4c Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH 1/2] Introduce [[clang::coro_lifetimebound]]
---
clang/include/cla
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/72851
None
>From 28e9fda4b78e1e60287048891cc92bafdef3ac4c Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 20 Nov 2023 12:17:30 +0100
Subject: [PATCH] Introduce [[clang::coro_lifetimebound]]
---
clang/include/c
34 matches
Mail list logo