[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / nothrow-as-noexcept-ctor.cpp
blob7cca414d7a6a9fe650988852ff05e2cf31fd5031
1 // RUN: %clang_cc1 %s -fcxx-exceptions -fsyntax-only -Wexceptions -verify -std=c++14
3 // expected-no-diagnostics
4 struct Base {
5 __attribute__((nothrow)) Base() {}
6 };
8 struct Derived : Base {
9 Derived() noexcept = default;
12 struct Base2 {
13 Base2() noexcept {}
16 struct Derived2 : Base2 {
17 __attribute__((nothrow)) Derived2() = default;
20 struct Base3 {
21 __attribute__((nothrow)) Base3() {}
24 struct Derived3 : Base3 {
25 __attribute__((nothrow)) Derived3() = default;