[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. I posted a pure crash fix here - https://reviews.llvm.org/D150435 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 ___ cfe-commits m

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. > Well that's... a bit shorter... than I would have expected that union to be. > (I'm not apologizing for the pun.) In clang `union x { short x[]; }; static_assert(sizeof(x)==2);` evaluates to '0 == 2'. That is even shorter, I guess? This is also the reason why uni

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-04 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. > Any indication we're going to hit something similar with GCC compatibility in > a glibc (or other system) header? I haven't seen non-Windows problems. Though I agree that if we somehow are going to support this for MSVC compatibility, there is no harm in allowing th

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147626#4316535 , @efriedma wrote: > In D147626#4316212 , @aaron.ballman > wrote: > >> In D147626#4316190 , @efriedma >> wrote: >>

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D147626#4316212 , @aaron.ballman wrote: > In D147626#4316190 , @efriedma > wrote: > >>> If there's not indications of this being disruptive on non-MSVC-compatible >>> targets, then

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147626#4316190 , @efriedma wrote: >> If there's not indications of this being disruptive on non-MSVC-compatible >> targets, then we may still be able to get away with rejecting the extension >> there. > > If we need to

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > If there's not indications of this being disruptive on non-MSVC-compatible > targets, then we may still be able to get away with rejecting the extension > there. If we need to have the codepath anyway, there isn't much harm in allowing it on all targets, I think. T

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147626#4315283 , @Fznamznon wrote: > I've got an error from buildbot on Windows: > > C:\Program Files (x86)\Windows > Kits\10\include\10.0.19041.0\um\winioctl.h:13404:51: error: flexible array > member 'Lev1Depends'

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. I've got an error from buildbot on Windows: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h:13404:51: error: flexible array member 'Lev1Depends' in a union is not allowed STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY Lev1Depends[];

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG22e2db6010b0: [clang] Reject flexible array member in a union in C++ (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ http

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I have no specific objections. I do worry about removing support for something that's apparently been accepted for a long time, just on general source-compatibility grounds, but I don't think there's an ObjC-specific problem with it. Repository: rG LLVM Github Mon

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaObjCXX/flexible-array.mm:7 int s; - char c[]; + char c[]; //expected-error {{flexible array member 'c' in a union is not allowed}} }; CC @rjmccall -- this is changing Objective-C++ behavior, w

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6241-6244 def ext_flexible_array_empty_aggregate_ms : Extension< "flexible array member %0 in otherwise empty " "%select{struct|interface|union|class|enum}1 is a Microsoft extensi

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 518695. Fznamznon added a comment. Rebase, add a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 Files: clang/docs/ReleaseNotes.rst clang/include/clang/

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6241-6244 def ext_flexible_array_empty_aggregate_ms : Extension< "flexible array member %0 in otherwise empty " "%select{struct|interface|union|class|enum}1 is a Microsoft ext

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 517985. Fznamznon edited the summary of this revision. Fznamznon added a comment. Apply some of the comments, rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6241-6244 def ext_flexible_array_empty_aggregate_ms : Extension< "flexible array member %0 in otherwise empty " "%select{struct|interface|union|class|enum}1 is a Microsoft extensi

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:58 Clang will only search for std::coroutine_traits for coroutines then. +- Clang doesn't accept flexible array members in unions in C++ anymore. Comment at: cla

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-