Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / flexible-array-in-union.c
blob5fabfbe0b1eaabfd6d73b5b8ab242dea45341880
1 // RUN: %clang_cc1 %s -verify=c -fsyntax-only
2 // RUN: %clang_cc1 %s -verify -fsyntax-only -x c++
3 // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility
4 // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++
6 // The test checks that an attempt to initialize union with flexible array
7 // member with an initializer list doesn't crash clang.
10 union { char x[]; } r = {0}; // c-error {{flexible array member 'x' in a union is not allowed}}
12 // expected-no-diagnostics