// RUN: %clang_cc1 -fsyntax-only -verify %s
int &;
double &;
void ; // \
// expected-note 2 {{'foo' has been explicitly marked unavailable here}}
void ; // expected-note 4 {{explicitly marked unavailable}}
void
void ;
void
// Show that delayed processing of 'unavailable' is the same
// delayed process for 'deprecated'.
// <rdar://problem/12241361> and <rdar://problem/15584219>
; // expected-note {{'DeprecatedEnum' has been explicitly marked deprecated here}}
typedef enum DeprecatedEnum DeprecatedEnum;
typedef enum DeprecatedEnum AnotherDeprecatedEnum; // expected-warning {{'DeprecatedEnum' is deprecated}}
DeprecatedEnum
; // expected-note {{'UnavailableEnum' has been explicitly marked unavailable here}}
typedef enum UnavailableEnum UnavailableEnum;
typedef enum UnavailableEnum AnotherUnavailableEnum; // expected-error {{'UnavailableEnum' is unavailable}}
UnavailableEnum
// Check that unavailable classes can be used as arguments to unavailable
// function, particularly in template functions.
; // \
expected-note 3{{'UnavailableClass' has been explicitly marked unavailable here}}
void ; // expected-error {{'UnavailableClass' is unavailable}}
void ;
void ; // expected-error {{'UnavailableClass' is unavailable}}
void ;
void ;
void
void
void // \
// expected-error{{'bar' is unavailable}}
void // \
// expected-error{{'bar' is unavailable}}
void
void
void
void
void ;
// expected-note@-1 {{'unavail_templated<int>' has been explicitly marked unavailable here}}
void
void
void ;
// expected-note@-1 4 {{'unavailable' has been explicitly marked unavailable here}}
;
;
;
;
int ; // expected-note 2 {{'unavailable_int' has been explicitly marked unavailable here}}
int
int
T ;
// expected-note@-1 {{'unavailable_template<int>' has been explicitly marked unavailable here}}
int
// expected-error@-1 {{'unavailable_template<int>' is unavailable}}
int instantiate_it = has_default_arg_template<int>;
// expected-note@-1 {{in instantiation of default function argument expression for 'has_default_arg_template<int>' required here}}
int
int instantiate_it2 = has_default_arg_template2<int>;
int
// expected-error@-1 {{'unavailable_int' is unavailable}}
int