[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / Parser / c1x-generic-selection.c
blobf203a9a5d00abfb23c389648b279c0f71de883cb
1 // RUN: %clang_cc1 -std=c1x -fsyntax-only -verify %s
3 void foo(void) {
4 _Generic; // expected-error {{expected '('}}
5 (void) _Generic(0); // expected-error {{expected ','}}
6 (void) _Generic(0, void); // expected-error {{expected ':'}}
7 (void) _Generic(0,
8 default: 0, // expected-note {{previous default generic association is here}}
9 default: 0); // expected-error {{duplicate default generic association}}
12 enum E { e };
13 int bar(int n) {
14 // PR45726
15 return _Generic(0, enum E: n, default: 0);
18 int baz(int n) {
19 // PR39979
20 return _Generic(0, enum { e }: n, default: 0);