brintos

brintos / llvm-project-archived public Read only

0
0
Text · 755 B · a1fcc22 Raw
38 lines · cpp
1// RUN: rm -rf %t2// RUN: %clang_cc1 -x c++ -std=c++17 -fmodules -fmodules-local-submodule-visibility -fmodules-cache-path=%t %s -verify3 4// expected-no-diagnostics5 6#pragma clang module build PR386277module PR38627 {}8#pragma clang module contents9#pragma clang module begin PR3862710namespace PR38627 {11struct X {12  virtual ~X() {}13  struct C {14    friend X::~X();15  } c;16};17}18#pragma clang module end19#pragma clang module endbuild20 21#pragma clang module import PR3862722 23namespace PR38627 {24struct Y {25  virtual ~Y() {}26  struct C {27    friend Y::~Y();28  } c;29};30static_assert(noexcept(X().~X()));31static_assert(noexcept(Y().~Y()));32 33struct A { virtual ~A() = default; };34struct B : public A, public X {35  virtual ~B() override = default;36};37} // PR3862738