[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-16 Thread Ding Fei via cfe-commits
https://github.com/danix800 closed https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Ding Fei via cfe-commits
@@ -13805,29 +13804,24 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { // OpenCL v1.2 s6.5.3: __constant locals must be constant-initialized. // This is true even in C++ for OpenCL. } else if (VDecl->getType().getAddressSpace() ==

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -13805,29 +13804,24 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { // OpenCL v1.2 s6.5.3: __constant locals must be constant-initialized. // This is true even in C++ for OpenCL. } else if (VDecl->getType().getAddressSpace() ==

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Aaron Ballman via cfe-commits
@@ -423,6 +423,8 @@ Bug Fixes in This Version - Fixed a regression in CTAD that a friend declaration that befriends itself may cause incorrect constraint substitution. (#GH86769). +- Fixed an assertion failure on invalid InitListExpr in C90 mode (#GH88008).

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Ding Fei via cfe-commits
@@ -3391,7 +3391,7 @@ class Sema final : public SemaBase { bool ConstexprSupported, bool CLinkageMayDiffer); /// type checking declaration initializers (C99 6.7.8) - bool CheckForConstantInitializer(Expr *e, QualType t); + bool CheckForConstantInitializer(Expr

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/88014 >From 9b293d37ec5c0193e3ad4e1bab2d382ebe54d7b6 Mon Sep 17 00:00:00 2001 From: dingfei Date: Tue, 9 Apr 2024 00:26:03 +0800 Subject: [PATCH 1/3] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Thanks, this looks like the right fix, and cleaning up DclT while here makes sense. https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Sam McCall via cfe-commits
@@ -3391,7 +3391,7 @@ class Sema final : public SemaBase { bool ConstexprSupported, bool CLinkageMayDiffer); /// type checking declaration initializers (C99 6.7.8) - bool CheckForConstantInitializer(Expr *e, QualType t); + bool CheckForConstantInitializer(Expr

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-15 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-12 Thread Ding Fei via cfe-commits
danix800 wrote: ping @Endilll https://github.com/llvm/llvm-project/pull/88014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-08 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/88014 >From fbd0780923d40b0d8290280731239a722a7af7a9 Mon Sep 17 00:00:00 2001 From: dingfei Date: Tue, 9 Apr 2024 00:26:03 +0800 Subject: [PATCH 1/2] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ding Fei (danix800) Changes Use refactored `CheckForConstantInitializer()` to skip checking expr with error. --- Full diff: https://github.com/llvm/llvm-project/pull/88014.diff 4 Files Affected: - (modified)

[clang] [AST][RecoveryExpr] Fix a crash on c89/c90 invalid InitListExpr (#88008) (PR #88014)

2024-04-08 Thread Ding Fei via cfe-commits
https://github.com/danix800 created https://github.com/llvm/llvm-project/pull/88014 Use refactored `CheckForConstantInitializer()` to skip checking expr with error. >From fbd0780923d40b0d8290280731239a722a7af7a9 Mon Sep 17 00:00:00 2001 From: dingfei Date: Tue, 9 Apr 2024 00:26:03 +0800