1 // RUN: %clang_cc1 %s -verify -fsyntax-only 2 3 // Basic parsing/Sema tests for _Atomic 4 // No operations are actually supported on objects of this type yet. 5 // The qualifier syntax is not supported yet. 6 _Atomic(int) t1; 7 _Atomic(int) *t2 = &t1; 8 void testf(void*); f(void)9void f(void) { 10 _Atomic(_Atomic(int)*) t3; 11 _Atomic(_Atomic(int)*) *t4[2] = { &t3, 0 }; 12 testf(t4); 13 } 14 extern _Atomic(int (*)(int(*)[], int(*)[10])) mergetest; 15 extern _Atomic(int (*)(int(*)[10], int(*)[])) mergetest; 16 extern _Atomic(int (*)(int(*)[10], int(*)[10])) mergetest; 17 18 _Atomic(int()) error1; // expected-error {{_Atomic cannot be applied to function type}} 19 _Atomic(struct ErrorS) error2; // expected-error {{_Atomic cannot be applied to incomplete type}} expected-note {{forward declaration}} 20 _Atomic(int[10]) error3; // expected-error {{_Atomic cannot be applied to array type}} 21 _Atomic(const int) error4; // expected-error {{_Atomic cannot be applied to qualified type}} 22 _Atomic(_Atomic(int)) error5; // expected-error {{_Atomic cannot be applied to atomic type}} 23