[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-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 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 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-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 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