// RUN: %clang_cc1 -DNO_DTORS -DNO_EXCEPTIONS -fno-c++-static-destructors -verify %s
// RUN: %clang_cc1 -DNO_EXCEPTIONS -verify %s
// RUN: %clang_cc1 -DNO_DTORS -fexceptions -fno-c++-static-destructors -verify %s
// RUN: %clang_cc1 -fexceptions -verify %s
;
SecretDestructor sd1;
thread_local SecretDestructor sd2;
void
// SecretDestructor sd1; // expected-error@-8 {{private}}
// thread_local SecretDestructor sd2; // expected-error@-8 {{private}}
// void locals() {
// static SecretDestructor sd3; // expected-error@-8 {{private}}
// thread_local SecretDestructor sd4; // expected-error@-8 {{private}}
// }
SecretDestructor sd6; // expected-error{{private}}
thread_local SecretDestructor sd7; // expected-error{{private}}
SecretDestructor sd8;
int
int p; // expected-error{{'no_destroy' and 'always_destroy' attributes are not compatible}} // expected-note{{here}}
int p2; // expected-error{{'always_destroy' and 'no_destroy' attributes are not compatible}} // expected-note{{here}}
void // expected-warning{{'always_destroy' attribute only applies to variables}}
; // expected-warning{{'no_destroy' attribute only applies to variables}}
int no_args; // expected-error{{'no_destroy' attribute takes no arguments}}
int no_args2; // expected-error{{'always_destroy' attribute takes no arguments}}
// expected-error@+1 {{temporary of type 'SecretDestructor' has private destructor}}
SecretDestructor arr;
void
;
;
;
void
Derived2 d2 = ;