https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/80698
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH 1/9] [misc-coroutine-hostile-raii] Use getOperand instead of
getCom
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/80698
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH 01/10] [misc-coroutine-hostile-raii] Use getOperand instead of
getC
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698
___
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/80698
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH 01/11] [misc-coroutine-hostile-raii] Use getOperand instead of
getC
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698
___
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/80698
___
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/80698
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH 01/12] [misc-coroutine-hostile-raii] Use getOperand instead of
getC
usx95 wrote:
I updated the patch to work for all the initializations that were missing
cleanups due to branch in an expression.
https://github.com/llvm/llvm-project/pull/80698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/80698
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH 01/13] [misc-coroutine-hostile-raii] Use getOperand instead of
getC
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698
___
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/80698
___
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/80698
___
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/80698
___
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/80698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -592,10 +590,14 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr,
llvm::ArrayType *AType,
// observed to be unnecessary.
if (endOfInit.isValid()) Builder.CreateStore(element, endOfInit);
}
-
-LValue elementLV = CGF.MakeAddrLValue(
-Address(e
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698
___
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/80698
___
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/80698
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH 01/14] [misc-coroutine-hostile-raii] Use getOperand instead of
getC
@@ -627,9 +627,11 @@ CodeGenFunction::getJumpDestForLabel(const LabelDecl *D) {
if (Dest.isValid()) return Dest;
// Create, but don't insert, the new block.
+ // FIXME: We do not know `BranchInExprDepth` for the destination and
currently
+ // emit *all* the BranchInExpr
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
usx95 wrote:
I tried using the EHCleanups as the only source of cleanups for these
branch-in-expr. https://github.com/llvm/llvm-project/pull/83224 is an attempt.
I do not like it very much.
The first challenge is to add these cleanups to the stack even when exceptions
are disabled. Some of th
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -453,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock
*Block) {
return isDeadRoot;
}
-static bool isValidDeadStmt(const Stmt *S) {
+// Check if the given `DeadStmt` is a coroutine statement and is a substmt of
+// the coroutine statement.
+static boo
@@ -0,0 +1,65 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -std=c++20 -fsyntax-only
-verify -Wunreachable-code
+
+#include "Inputs/std-coroutine.h"
+
+extern void abort (void) __attribute__ ((__noreturn__));
+
+struct task {
+ struct promise_type {
+std::suspend_
@@ -493,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock
*Block) {
return isDeadRoot;
}
-static bool isValidDeadStmt(const Stmt *S) {
+// Check if the given `DeadStmt` is a coroutine statement and is a substmt of
+// the coroutine statement.
---
https://github.com/usx95 commented:
Skipping coroutine statements SG.
Change mostly LG. Left few comments.
https://github.com/llvm/llvm-project/pull/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
@@ -493,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock
*Block) {
return isDeadRoot;
}
-static bool isValidDeadStmt(const Stmt *S) {
+// Check if the given `DeadStmt` is a coroutine statement and is a substmt of
+// the coroutine statement.
+static boo
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454
___
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/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -453,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock
*Block) {
return isDeadRoot;
}
-static bool isValidDeadStmt(const Stmt *S) {
+// Check if the given `DeadStmt` is a coroutine statement and is a substmt of
+// the coroutine statement.
+static boo
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 approved this pull request.
LGTM. Thanks.
https://github.com/llvm/llvm-project/pull/77454
___
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/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,33 +40,37 @@ task test3() {
task test4() {
abort();
- 1; // expected-warning {{code will never be executed}}
+ 1; // expected-warning {{code will never be executed}}
co_return;
}
-
task test5() {
abort();
- co_await std::suspend_never{};
+ co_await 1;
@@ -12,6 +12,13 @@ struct task {
std::suspend_always yield_value(int) { return {}; }
task get_return_object();
void unhandled_exception();
+
+struct Awaiter {
+ bool await_ready();
+ void await_suspend(auto);
+ int await_resume();
+};
+aut
@@ -453,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock
*Block) {
return isDeadRoot;
}
-static bool isValidDeadStmt(const Stmt *S) {
+// Check if the given `DeadStmt` is a coroutine statement and is a substmt of
+// the coroutine statement.
+static boo
@@ -12,6 +12,13 @@ struct task {
std::suspend_always yield_value(int) { return {}; }
task get_return_object();
void unhandled_exception();
+
+struct Awaiter {
+ bool await_ready();
+ void await_suspend(auto);
+ int await_resume();
+};
+aut
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/80698
Partially solves https://github.com/llvm/llvm-project/issues/63818 for control
flow in braced aggregate initialisation.
The reason why we miss cleanups for temporaries in braced aggregate init is
that the lifetime
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698
___
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/80698
___
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/80698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/79206
We were previously allowlisting awaitable types returned by `await_transform`
instead of the type of the operand of the `co_await` expression.
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/79206
>From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Tue, 23 Jan 2024 20:18:25 +
Subject: [PATCH] [misc-coroutine-hostile-raii] Use getOperand instead of
getCommonE
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/79206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 ready_for_review
https://github.com/llvm/llvm-project/pull/79206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
usx95 wrote:
Thanks. This is trivial and might not require another pair of eyes.
https://github.com/llvm/llvm-project/pull/79206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/79206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
usx95 wrote:
All the blockers to land this have been addressed. Since this is not approved,
does it look fine to land @ilya-biryukov ?
https://github.com/llvm/llvm-project/pull/72213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72213
>From b0183f23ffad814080e82c725ee4cb7902aea23f Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 12 Jan 2024 13:38:15 +
Subject: [PATCH] rebase
---
clang/docs/ReleaseNotes.rst | 21 +++
https://github.com/usx95 reopened
https://github.com/llvm/llvm-project/pull/72213
___
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/72213
>From b0183f23ffad814080e82c725ee4cb7902aea23f Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 12 Jan 2024 13:38:15 +
Subject: [PATCH 1/2] rebase
---
clang/docs/ReleaseNotes.rst | 21
@@ -10088,9 +10088,13 @@ static bool allowAmbiguity(ASTContext &Context, const
FunctionDecl *F1,
const FunctionDecl *F2) {
if (declaresSameEntity(F1, F2))
return true;
- if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation() &&
-
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72213
>From b0183f23ffad814080e82c725ee4cb7902aea23f Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 12 Jan 2024 13:38:15 +
Subject: [PATCH 1/4] rebase
---
clang/docs/ReleaseNotes.rst | 21
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/72213
___
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/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 1/6] [coroutines] Detect lifetime issues with coroutine lambda
captu
@@ -297,6 +297,26 @@ struct ReadySuspendResumeResult {
bool IsInvalid;
};
+// Adds [[clang::coro_wrapper]] and [[clang::coro_disable_lifetimebound]]
+// attributes to `get_return_object`.
+static void handleGetReturnObject(Sema &S, MemberExpr *ME) {
+ if (!ME || !ME->getMem
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 1/7] [coroutines] Detect lifetime issues with coroutine lambda
captu
usx95 wrote:
Will wait for the EWG to give final guidance.
https://github.com/llvm/llvm-project/pull/70217
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/70217
___
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/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 1/8] [coroutines] Detect lifetime issues with coroutine lambda
captu
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 1/9] [coroutines] Detect lifetime issues with coroutine lambda
captu
@@ -33,6 +34,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Casting.h"
usx95 wrote:
Removed.
https://github.com/llvm/llvm-project/pull/77066
_
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
RecordDecl *RD = FD->getReturnType()->getAsRecordDecl();
if (!RD || !RD->getUnderlyingDecl()->hasAttr())
return;
- // Allow `get_return_object()`.
- if (FD->getDeclName().isIdentifier() &&
+
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/10] [coroutines] Detect lifetime issues with coroutine
lambda cap
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/11] [coroutines] Detect lifetime issues with coroutine
lambda cap
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
RecordDecl *RD = FD->getReturnType()->getAsRecordDecl();
if (!RD || !RD->getUnderlyingDecl()->hasAttr())
return;
- // Allow `get_return_object()`.
- if (FD->getDeclName().isIdentifier() &&
+
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
RecordDecl *RD = FD->getReturnType()->getAsRecordDecl();
if (!RD || !RD->getUnderlyingDecl()->hasAttr())
return;
- // Allow `get_return_object()`.
- if (FD->getDeclName().isIdentifier() &&
+
@@ -7575,15 +7577,27 @@ static void
visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
Path.pop_back();
};
- if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee))
-VisitLifetimeBoundArg(Callee, ObjectArg);
-
bool CheckCoroCall = false;
if
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
RecordDecl *RD = FD->getReturnType()->getAsRecordDecl();
if (!RD || !RD->getUnderlyingDecl()->hasAttr())
return;
- // Allow `get_return_object()`.
- if (FD->getDeclName().isIdentifier() &&
+
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066
___
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/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/12] [coroutines] Detect lifetime issues with coroutine
lambda cap
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/13] [coroutines] Detect lifetime issues with coroutine
lambda cap
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/14] [coroutines] Detect lifetime issues with coroutine
lambda cap
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
RecordDecl *RD = FD->getReturnType()->getAsRecordDecl();
if (!RD || !RD->getUnderlyingDecl()->hasAttr())
return;
- // Allow `get_return_object()`.
- if (FD->getDeclName().isIdentifier() &&
+
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/15] [coroutines] Detect lifetime issues with coroutine
lambda cap
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066
___
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/77066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11220,6 +11220,11 @@ class Sema final {
VarDecl *buildCoroutinePromise(SourceLocation Loc);
void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body);
+ // Heuristically tells if the function is get_return_object by matching
usx95 wrote:
Both d
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/16] [coroutines] Detect lifetime issues with coroutine
lambda cap
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066
>From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Fri, 5 Jan 2024 10:11:20 +0100
Subject: [PATCH 01/17] [coroutines] Detect lifetime issues with coroutine
lambda cap
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/77066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/78589
Fixes: https://github.com/llvm/llvm-project/issues/78290
See the bug for more context.
```
Gen ACoroutine() {
if constexpr (0) // remove it make clang compile.
co_return;
co_await Gen{};
}
```
We miss symbol
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/78589
>From 07c6ad92fda63e69489933b5cededf8f03a68ef3 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Thu, 18 Jan 2024 14:38:22 +
Subject: [PATCH 1/2] [coroutine] Create coroutine body in the correct eval
context
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/78589
___
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/78589
>From 07c6ad92fda63e69489933b5cededf8f03a68ef3 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Thu, 18 Jan 2024 14:38:22 +
Subject: [PATCH 1/3] [coroutine] Create coroutine body in the correct eval
context
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/78589
>From 07c6ad92fda63e69489933b5cededf8f03a68ef3 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Thu, 18 Jan 2024 14:38:22 +
Subject: [PATCH 1/4] [coroutine] Create coroutine body in the correct eval
context
usx95 wrote:
Added release notes and fix new line.
https://github.com/llvm/llvm-project/pull/78589
___
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/78589
>From 07c6ad92fda63e69489933b5cededf8f03a68ef3 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Thu, 18 Jan 2024 14:38:22 +
Subject: [PATCH 1/5] [coroutine] Create coroutine body in the correct eval
context
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/78589
>From 07c6ad92fda63e69489933b5cededf8f03a68ef3 Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Thu, 18 Jan 2024 14:38:22 +
Subject: [PATCH 1/6] [coroutine] Create coroutine body in the correct eval
context
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/78589
___
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/77454
>From 3d7d3e5e5bc613637cb019e5e370654e0c58b5cd Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 9 Jan 2024 12:29:45 +0100
Subject: [PATCH 1/2] [coroutine] Suppress unreachable-code warning on
coroutine statemen
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/usx95 requested changes to this pull request.
This also disables the warning when it was actually correct. See comments.
https://github.com/llvm/llvm-project/pull/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
@@ -0,0 +1,50 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -std=c++20 -fsyntax-only
-verify -Wunreachable-code
+
+#include "Inputs/std-coroutine.h"
+
+extern void abort (void) __attribute__ ((__noreturn__));
+
+struct task {
+ struct promise_type {
+std::suspend_
@@ -60,6 +61,45 @@ static bool isTrivialDoWhile(const CFGBlock *B, const Stmt
*S) {
return false;
}
+// Check if the block starts with a coroutine statement and see if the given
+// unreachable 'S' is the substmt of the coroutine statement.
+//
+// We suppress the unreachab
@@ -60,6 +61,45 @@ static bool isTrivialDoWhile(const CFGBlock *B, const Stmt
*S) {
return false;
}
+// Check if the block starts with a coroutine statement and see if the given
+// unreachable 'S' is the substmt of the coroutine statement.
+//
+// We suppress the unreachab
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
usx95 wrote:
This breaks new code (expected) but does not respect
`-Wno-ambiguous-reversed-operator`. https://godbolt.org/z/oMsGeK1nc
@zygoloid IIUC this should be silenced by this warning but somehow does not.
Will investigate further.
Reverting to put out large unsuppresable breakages
https
usx95 wrote:
Ah. I see, this is because this is not a warning but hard errors in C++20.
https://github.com/llvm/llvm-project/pull/68999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
201 - 300 of 1079 matches
Mail list logo