Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / C / C2x / n2886.c
blobce733abdf0956f4d0556f1c3bcedff849b1a96d9
1 // RUN: %clang_cc1 -verify=okay -std=c11 -ffreestanding %s
2 // RUN: %clang_cc1 -verify -std=c17 -ffreestanding %s
3 // RUN: %clang_cc1 -verify -std=c2x -ffreestanding %s
5 /* WG14 N2886: yes
6 * Remove ATOMIC_VAR_INIT v2
7 */
9 /* okay-no-diagnostics */
10 #include <stdatomic.h>
12 _Atomic int a = ATOMIC_VAR_INIT(0); /* #diag */
13 #if __STDC_VERSION__ <= 201710L
14 /* expected-warning@#diag {{macro 'ATOMIC_VAR_INIT' has been marked as deprecated}}
15 expected-note@stdatomic.h:* {{macro marked 'deprecated' here}}
17 #else
18 /* expected-error@#diag {{use of undeclared identifier 'ATOMIC_VAR_INIT'}} */
19 #endif