
This change makes the `assertion` less strict in `debug` builds by stripping qualifiers from the base class and ignoring them. I hope `weakened` assertions don't affect other cases where such `errors` are intended to be `caught` by the compiler. Fixes #35603 Fixes #85256
29 lines
459 B
C++
29 lines
459 B
C++
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
|
|
// RUN: %clang_cc1 -fsyntax-only -std=c++23 %s -verify
|
|
|
|
// expected-no-diagnostics
|
|
|
|
struct A {};
|
|
using CA = const A;
|
|
|
|
struct S1 : CA {
|
|
constexpr S1() : CA() {}
|
|
};
|
|
|
|
struct S2 : A {
|
|
constexpr S2() : CA() {}
|
|
};
|
|
|
|
struct S3 : CA {
|
|
constexpr S3() : A() {}
|
|
};
|
|
|
|
struct Int {};
|
|
|
|
template <class _Hp>
|
|
struct __tuple_leaf : _Hp {
|
|
constexpr __tuple_leaf() : _Hp() {}
|
|
};
|
|
|
|
constexpr __tuple_leaf<const Int> t;
|