https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13570,6 +13570,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args);
if (RecoveryExpr.get())
VDecl->setInit(RecoveryExpr.get());
+ // In general,
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM with a tiny nit.
https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
Friendly ping.
https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/72428
>From 662be3d00eed883db6b1babe489b981847e9b907 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 15 Nov 2023 20:31:12 +0100
Subject: [PATCH 1/3] [clang][AST] Invalidate DecompositionDecl if it has
invalid
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/72428
>From f114c48948d8b56a5e04e50b7f27ce499e60bc77 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 15 Nov 2023 20:31:12 +0100
Subject: [PATCH 1/3] [clang][AST] Invalidate DecompositionDecl if it has
invalid
hokein wrote:
> We need a release note and please add a more detailed summary. A description
> of the problem being solved and the solution to the fix provides.
Done.
https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/72428
>From e182e764778eb137f465812270fcdf03d0fe2da1 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 15 Nov 2023 20:31:12 +0100
Subject: [PATCH 1/3] [clang][AST] Invalidate DecompositionDecl if it has
invalid
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
We need a release note and please add a more detailed summary. A description of
the problem being solved and the solution to the fix provides.
https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits
hokein wrote:
Friendly ping.
https://github.com/llvm/llvm-project/pull/72428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hnrklssn wrote:
> > What differentiates the DecompositionDecl such that we need to mark the
> > decl invalid when there's an error in the RHS, while for other decls we
> > don't? It seems inconsistent.
>
>
>
> DecompositionDecl (aka structure binding) is special here, a legal
>
hokein wrote:
> What differentiates the DecompositionDecl such that we need to mark the decl
> invalid when there's an error in the RHS, while for other decls we don't? It
> seems inconsistent.
DecompositionDecl (aka structure binding) is special here, a legal
DecompositionDecl must be
@@ -13540,6 +13540,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args);
if (RecoveryExpr.get())
VDecl->setInit(RecoveryExpr.get());
+ // In general,
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/72428
>From ac06843b97cb93d476f0bf8e0474fa270d80631f Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 15 Nov 2023 20:31:12 +0100
Subject: [PATCH 1/2] [clang][AST] Invalidate DecompositionDecl if it has
invalid
@@ -13540,6 +13540,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args);
if (RecoveryExpr.get())
VDecl->setInit(RecoveryExpr.get());
+ // In general,
@@ -24,4 +24,17 @@ void test() {
auto b4 = A(1);
// CHECK: `-VarDecl {{.*}} invalid b5 'auto'
auto b5 = A{1};
-}
\ No newline at end of file
+}
+
+void pr72198() {
+ // CHECK: DecompositionDecl {{.*}} invalid 'int'
+ int [_, b] = {0, 0};
+ [b]{};
+}
+
+int
@@ -24,4 +24,17 @@ void test() {
auto b4 = A(1);
// CHECK: `-VarDecl {{.*}} invalid b5 'auto'
auto b5 = A{1};
-}
\ No newline at end of file
+}
+
+void pr72198() {
cor3ntin wrote:
```suggestion
void GH72198() {
```
@@ -13540,6 +13540,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args);
if (RecoveryExpr.get())
VDecl->setInit(RecoveryExpr.get());
+ // In general,
hnrklssn wrote:
What differentiates the DecompositionDecl such that we need to mark the decl
invalid when there's an error in the RHS, while for other decls we don't? It
seems inconsistent.
https://github.com/llvm/llvm-project/pull/72428
___
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Haojian Wu (hokein)
Changes
Fix #67495, #72198
CC @ADKaster, @ecnelises
---
Full diff: https://github.com/llvm/llvm-project/pull/72428.diff
2 Files Affected:
- (modified) clang/lib/Sema/SemaDecl.cpp (+9)
- (modified)
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/72428
Fix #67495, #72198
CC @ADKaster, @ecnelises
>From 13b97a2239c93fe528174ec9ecc20f3d3ca49e23 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 15 Nov 2023 20:31:12 +0100
Subject: [PATCH] [clang][AST]
23 matches
Mail list logo