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

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 06:07:51 PDT 2023


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: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++
+
+// The test checks that an attempt to initialize union with flexible array
+// member with an initializer list doesn't crash clang.
----------------
aaron.ballman wrote:
> Slight tweak to get rid of the preprocessor stuff and simplify the test a bit; NFC.
Neat! Thank you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150435/new/

https://reviews.llvm.org/D150435



More information about the cfe-commits mailing list