// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
// RUN: %clang_cc1 -std=c++1z -fsyntax-only -verify %s
void ; // expected-error {{non-member function cannot have '&' qualifier}}
void ; // expected-error {{non-member function cannot have '&&' qualifier}}
void volatile &&; // expected-error {{non-member function cannot have 'const volatile &&' qualifier}}
;
typedef void &;
typedef void &&;
typedef func_type_lvalue *func_type_lvalue_ptr; // expected-error{{pointer to function type 'func_type_lvalue' (aka 'void () &') cannot have '&' qualifier}}
typedef func_type_rvalue *func_type_rvalue_ptr; // expected-error{{pointer to function type 'func_type_rvalue' (aka 'void () &&') cannot have '&&' qualifier}}
typedef func_type_lvalue &func_type_lvalue_ref; // expected-error{{reference to function type 'func_type_lvalue' (aka 'void () &') cannot have '&' qualifier}}
typedef func_type_rvalue &func_type_rvalue_ref; // expected-error{{reference to function type 'func_type_rvalue' (aka 'void () &&') cannot have '&&' qualifier}}
;
using func_type_lvalue = wrap<>::val; // expected-note{{in instantiation of}}
using func_type_lvalue = wrap<func_type_lvalue>::val;
using func_type_rvalue = wrap<func_type_rvalue>::val; // expected-note{{in instantiation of}}
using func_type_lvalue_ptr = wrap<>::ptr;
using func_type_lvalue_ptr = wrap<func_type_lvalue>::ptr;
using func_type_rvalue_ptr = wrap<func_type_rvalue>::ptr;
using func_type_lvalue_ref = wrap<>::ref;
using func_type_lvalue_ref = wrap<func_type_lvalue>::ref;
using func_type_rvalue_ref = wrap<func_type_rvalue>::ref;
func_type_lvalue f2; // expected-error{{non-member function of type 'func_type_lvalue' (aka 'void () &') cannot have '&' qualifier}}
func_type_rvalue f3; // expected-error{{non-member function of type 'func_type_rvalue' (aka 'void () &&') cannot have '&&' qualifier}}
;
void & = &X::f0;
void && = &X::f1;
void ; // expected-error{{non-member function cannot have '&&' qualifier}}
// FIXME: These are ill-formed.
;
pass<func_type_lvalue> pass0;
pass<func_type_lvalue> pass1;
;
;
constexpr bool cxx1z = __cplusplus > 201402L;
void ;
void ;
using func_type_noexcept_true = wrap<decltype>;
using func_type_noexcept_false = wrap<decltype>;
static_assert;
static_assert;
static_assert;
static_assert;