| // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s |
| // RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s |
| // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s |
| Y::~Y() { } // expected-error{{non-friend class member '~Y' cannot have a qualified name}} |
| ~Z(); // expected-error{{expected the class name after '~' to name the enclosing class}} |
| #if __cplusplus >= 202002L |
| // FIXME: This isn't valid in C++20 and later. |
| ~B(); // expected-error {{expected the class name after '~' to name the enclosing class}} |
| static constexpr int secret = 42; |
| struct BadInstantiation { |
| struct GoodInstantiation { |
| // FIXME: We should diagnose this while instantiating. |
| friend X::~Y(); // expected-error {{expected the class name after '~' to name the enclosing class}} |
| friend X::~Y(); // expected-error {{expected the class name after '~' to name the enclosing class}} |