23 lines · c
1// RUN: %clang_cc1 %s -verify -fsyntax-only2 3// Basic parsing/Sema tests for _Atomic4// 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;8void testf(void*);9void f(void) {10 _Atomic(_Atomic(int)*) t3;11 _Atomic(_Atomic(int)*) *t4[2] = { &t3, 0 };12 testf(t4);13}14extern _Atomic(int (*)(int(*)[], int(*)[10])) mergetest;15extern _Atomic(int (*)(int(*)[10], int(*)[])) mergetest;16extern _Atomic(int (*)(int(*)[10], int(*)[10])) mergetest;17 18_Atomic(int(void)) 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