[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f8e450b6682: [clang] Fix crash on attempt to initialize union with flexible array member (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D150435?vs=523723=524278#toc

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/Sema/flexible-array-in-union.c:1-16 +// RUN: %clang_cc1 %s -verify -fsyntax-only -DERROR +// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ +// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility +// RUN:

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM with a minor tweak to the test, thanks! Comment at: clang/test/Sema/flexible-array-in-union.c:1-16 +// RUN: %clang_cc1 %s -verify -fsyntax-only -DERROR +// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. @aaron.ballman , WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150435/new/ https://reviews.llvm.org/D150435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-19 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM after addressing Aaron's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150435/new/ https://reviews.llvm.org/D150435

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 523723. Fznamznon added a comment. Move the test to a separate file, test C++ and MSVC compatibility mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150435/new/ https://reviews.llvm.org/D150435 Files:

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The precommit CI failures seem unrelated to these changes. Comment at: clang/test/Sema/init.c:168-169 + +// GH61746 +union { char x[]; } r = {0}; // expected-error {{flexible array member 'x' in a union is not allowed}} I think

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Due to missing check on union, there was a null expression added to init list that caused crash later. Fixes