[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread Jim M . R . Teichgräber via cfe-commits
@@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, // init a VLA in C++ in all cases (such as with non-trivial constructors). // FIXME: should we allow this construct in C++ when it makes sense to do //

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: @@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, //

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: @@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, //

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread Tomasz Stanisławski via cfe-commits
@@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, // init a VLA in C++ in all cases (such as with non-trivial constructors). // FIXME: should we allow this construct in C++ when it makes sense to do //

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-15 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: github-actions[bot] wrote: @J-MR-T Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-15 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/91891 ___

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-15 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?=,Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?=, Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?=,Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?= Message-ID: In-Reply-To: Sirraide wrote: Merging this for you since you don’t appear to have commit perms.

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-15 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?=,Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?=, Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?=,Jim M. R. =?utf-8?q?Teichgr=C3=A4ber?= Message-ID: In-Reply-To: https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91891

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Jim M. R. Teichgräber (J-MR-T) Changes C99-C23 6.5.2.5 says: The type name

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T ready_for_review https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T updated https://github.com/llvm/llvm-project/pull/91891 From 9aab9284fc094d22e12a2ee1217a3bc99e5837b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20M=2E=20R=2E=20Teichgr=C3=A4ber?= Date: Sun, 12 May 2024 13:33:37 +0200 Subject: [PATCH 1/5] [clang] Disallow VLA type

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: AaronBallman wrote: > > > Btw, you can probably move this PR out of Draft status, it seems awfully > > > close to finished > > > > > > I'll finish implementing your suggestions, run the tests again

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: AaronBallman wrote: > > Please be sure to add a release note to clang/docs/ReleaseNotes.rst so > > users know about the fix. > > Oh, sorry, I didn't find anything know how release notes were handled -

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: Sirraide wrote: > > Btw, you can probably move this PR out of Draft status, it seems awfully > > close to finished > > I'll finish implementing your suggestions, run the tests again locally and > then

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: Sirraide wrote: > A question on that, would you classify this as a breaking change? This is just a bug fix, so no. Rejecting code that we would erroneously accept (and miscompile in the process) is not

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
J-MR-T wrote: > Btw, you can probably move this PR out of Draft status, it seems awfully > close to finished I'll finish implementing your suggestions, run the tests again locally and then move it out of draft, if that's alright with you :). https://github.com/llvm/llvm-project/pull/91891

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s J-MR-T wrote: Ah, that's good to know! Seeing as I had to modify the test again anyway, it seems nicer

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T updated https://github.com/llvm/llvm-project/pull/91891 From 9aab9284fc094d22e12a2ee1217a3bc99e5837b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20M=2E=20R=2E=20Teichgr=C3=A4ber?= Date: Sun, 12 May 2024 13:33:37 +0200 Subject: [PATCH 1/3] [clang] Disallow VLA type

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Btw, you can probably move this PR out of Draft status, it seems awfully close to finished https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s AaronBallman wrote: Ah! That's a perfectly fine reason to use `-Wno-comment` and you can leave the test

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
J-MR-T wrote: > Please be sure to add a release note to clang/docs/ReleaseNotes.rst so users > know about the fix. Oh, sorry, I didn't find anything know how release notes were handled - will do! A question on that, would you classify this as a breaking change? Technically, it could break

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s J-MR-T wrote: [This

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T updated https://github.com/llvm/llvm-project/pull/91891 From 9aab9284fc094d22e12a2ee1217a3bc99e5837b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20M=2E=20R=2E=20Teichgr=C3=A4ber?= Date: Sun, 12 May 2024 13:33:37 +0200 Subject: [PATCH 1/2] [clang] Disallow VLA type

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
@@ -3371,6 +3371,8 @@ def err_field_with_address_space : Error< "field may not be qualified with an address space">; def err_compound_literal_with_address_space : Error< "compound literal in function scope may not be qualified with an address space">; +def

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
@@ -3371,6 +3371,8 @@ def err_field_with_address_space : Error< "field may not be qualified with an address space">; def err_compound_literal_with_address_space : Error< "compound literal in function scope may not be qualified with an address space">; +def

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s AaronBallman wrote: Why did this test need to add `-Wno-comment`?

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Oops, we used to diagnose this until Clang 17 (I think I accidentally regressed this behavior when implementing empty inits for C23). Thank you for the fix! Please be sure to add a release note to clang/docs/ReleaseNotes.rst so users know about the

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T edited https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T edited https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T created https://github.com/llvm/llvm-project/pull/91891 C99-C23 6.5.2.5 says: The type name shall specify an object type or an array of unknown size, but not a variable length array type. Closes issue #89835 . I ran `git clang-format`'ed my changes and ran the clang