brintos

brintos / llvm-project-archived public Read only

0
0
Text · 931 B · 7f73a4f Raw
30 lines · cpp
1// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s2 3namespace N0 {4  void f() noexcept;5  void g() noexcept;6 7  struct A {8    friend void f() noexcept;9    friend void g() noexcept(x);10 11    static constexpr bool x = true;12  };13} // namespace N014 15namespace N1 {16  void f() noexcept;17  void g();18 19  template<typename T>20  struct A {21    friend void f() noexcept;22    // FIXME: This error is emitted if no other errors occured (i.e. Sema::hasUncompilableErrorOccurred() is false).23    friend void g() noexcept(x); // expected-error {{no member 'x' in 'N1::A<int>'; it has not yet been instantiated}}24                                 // expected-note@-1 {{in instantiation of exception specification}}25    static constexpr bool x = false; // expected-note {{not-yet-instantiated member is declared here}}26  };27 28  template struct A<int>; // expected-note {{in instantiation of template class}}29} // namespace N130