https://github.com/MitalAshok edited
https://github.com/llvm/llvm-project/pull/100548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14578,21 +14578,51 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation
OpLoc,
BinaryOperatorKind Opc,
Expr *LHSExpr, Expr *RHSExpr) {
if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) {
-// The sy
@@ -14578,21 +14578,51 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation
OpLoc,
BinaryOperatorKind Opc,
Expr *LHSExpr, Expr *RHSExpr) {
if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) {
-// The sy
https://github.com/cor3ntin approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/100548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/100548
>From 2c1d87c025a8caa818dd275560f31d0d4f8d64b8 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Thu, 25 Jul 2024 10:56:16 +0100
Subject: [PATCH 1/2] [Clang] Initializer list on RHS of assignment
---
clang/d
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/100548
>From 2c1d87c025a8caa818dd275560f31d0d4f8d64b8 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Thu, 25 Jul 2024 10:56:16 +0100
Subject: [PATCH 1/2] [Clang] Initializer list on RHS of assignment
---
clang/d
@@ -14578,21 +14578,56 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation
OpLoc,
BinaryOperatorKind Opc,
Expr *LHSExpr, Expr *RHSExpr) {
if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) {
-// The sy
@@ -14578,21 +14578,56 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation
OpLoc,
BinaryOperatorKind Opc,
Expr *LHSExpr, Expr *RHSExpr) {
if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) {
-// The sy
@@ -101,6 +101,20 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion,
StructWithAnonUnion3)
#endif
} // namespace cwg2759
+namespace cwg2768 { // cwg2768: 20
+#if __cplusplus >= 201103L
+enum class E {E1};
+
+void f() {
+ E e;
+ e = E{0}; // #1
+ // cxx11-14-erro
@@ -14578,21 +14578,56 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation
OpLoc,
BinaryOperatorKind Opc,
Expr *LHSExpr, Expr *RHSExpr) {
if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) {
-// The sy
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+
+template
+void f(T dependent) {
+ int i;
+ i = { dependent, dependent };
+}
+
+template
+void f2(T dependent) {
+ int i;
+ i = { dependent, dependent }; // expected-error {{excess elements in scalar
i
https://github.com/cor3ntin commented:
Thanks for this patch.
The direction looks right but i think there is room for minor improvements
https://github.com/llvm/llvm-project/pull/100548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/100548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MitalAshok updated
https://github.com/llvm/llvm-project/pull/100548
>From 2c1d87c025a8caa818dd275560f31d0d4f8d64b8 Mon Sep 17 00:00:00 2001
From: Mital Ashok
Date: Thu, 25 Jul 2024 10:56:16 +0100
Subject: [PATCH] [Clang] Initializer list on RHS of assignment
---
clang/docs/
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Mital Ashok (MitalAshok)
Changes
This implements [CWG2768](https://cplusplus.github.io/CWG/issues/2768.html).
Also fixes a bug where `x op= {v}` was treated as `x op= v` for compound
assignments, which shouldn't have happened.
Fixes #100
https://github.com/MitalAshok created
https://github.com/llvm/llvm-project/pull/100548
This implements [CWG2768](https://cplusplus.github.io/CWG/issues/2768.html).
Also fixes a bug where `x op= {v}` was treated as `x op= v` for compound
assignments, which shouldn't have happened.
Fixes #10052
16 matches
Mail list logo