// RUN: %clang_cc1 -verify -pedantic %s -std=c++98
// RUN: %clang_cc1 -verify -pedantic %s -std=c++11
;
;
user<int> u;
// Test overloading behavior of atomics.
;
int &; // expected-warning {{'_Atomic' is a C11 extension}}
int &; // expected-warning {{'_Atomic' is a C11 extension}} // ok, redeclaration
long &; // expected-warning {{'_Atomic' is a C11 extension}}
float &; // expected-warning {{'_Atomic' is a C11 extension}}
double &; // expected-warning {{'_Atomic' is a C11 extension}}
double &; // expected-warning {{'_Atomic' is a C11 extension}}
short &; // expected-warning {{'_Atomic' is a C11 extension}}
void
typedef int _Atomic; // expected-error {{expected ';' after top level declarator}} expected-warning {{does not declare anything}} \
// expected-warning {{'_Atomic' is a C11 extension}}
typedef atomic_mem_ptr_to_int; // expected-warning {{'_Atomic' is a C11 extension}}
typedef int; // expected-warning {{'_Atomic' is a C11 extension}}
typedef ; // expected-warning {{'_Atomic' is a C11 extension}}
typedef _Atomic int; // expected-warning {{'_Atomic' is a C11 extension}}
typedef &atomic_int_ref; // expected-warning {{'_Atomic' is a C11 extension}}
typedef _Atomic int &atomic_int_ref; // expected-warning {{'_Atomic' is a C11 extension}}
typedef _Atomic atomic_int_ref atomic_int_ref; // expected-warning {{'_Atomic' qualifier on reference type 'atomic_int_ref' (aka '_Atomic(int) &') has no effect}} \
// expected-warning {{'_Atomic' is a C11 extension}}
typedef int &_Atomic atomic_reference_to_int; // expected-error {{'_Atomic' qualifier may not be applied to a reference}} \
// expected-warning {{'_Atomic' is a C11 extension}}
typedef atomic_reference_to_int; // expected-error {{_Atomic cannot be applied to reference type 'int &'}} \
// expected-warning {{'_Atomic' is a C11 extension}}
;
bool