https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
+bool DeclReferenced = PD->isReferenced();
https://github.com/ChuanqiXu9 approved this pull request.
LGTM.
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
+bool DeclReferenced = PD->isReferenced();
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
+bool DeclReferenced = PD->isReferenced();
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
ChuanqiXu9 wrote:
Readers can understand
https://github.com/ChuanqiXu9 commented:
It looks much better now. Let's try to optimize it a bit futher.
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
+bool DeclReferenced = PD->isReferenced();
+
https://github.com/bcardosolopes approved this pull request.
LGTM. @ChuanqiXu9 should give the final blessing though.
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
+bool DeclReferenced = PD->isReferenced();
+
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation
Loc) {
if (PD->getType()->isDependentType())
continue;
+// Preserve the referenced state for unused parameter diagnostics.
+bool DeclReferenced = PD->isReferenced();
+
https://github.com/bcardosolopes commented:
Thanks for improving this! I haven't looked at your previous review of this PR,
but I like the simplicity of this one.
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
yuxuanchen1997 wrote:
@ChuanqiXu9 it was my mistake. This patch does work.
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-coroutines
Author: Yuxuan Chen (yuxuanchen1997)
Changes
This PR is proposing a fix for
https://github.com/llvm/llvm-project/issues/65971.
Previously, given a coroutine like this
```
task foo(int a) {
co_return;
}
```
Parameter `a` is never used.
https://github.com/yuxuanchen1997 ready_for_review
https://github.com/llvm/llvm-project/pull/70973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/70973
>From 3be73f10d376739460f0c22d3292bc0de8f64b82 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Wed, 1 Nov 2023 11:59:57 -0700
Subject: [PATCH] [Clang] Preserve coroutine parameter referenced state
---
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/70973
>From 453dd8c6892923118c8952e92fdb7375f7ed4877 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Wed, 1 Nov 2023 11:59:57 -0700
Subject: [PATCH] [Clang] Preserve coroutine parameter referenced state
---
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/70973
This PR is proposing a fix for
https://github.com/llvm/llvm-project/issues/65971.
Previously, given a coroutine like this
```
task foo(int a) {
co_return;
}
```
Parameter `a` is never used. However,
25 matches
Mail list logo