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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 05:48:21 PDT 2023


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++
+// 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.
----------------
Slight tweak to get rid of the preprocessor stuff and simplify the test a bit; NFC.


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