[clang-tidy] Add regression tests for readability-redundant-typename. NFC. (#207318)
Part of https://github.com/llvm/llvm-project/issues/206995
This commit is contained in:
parent
ac05f72d8f
commit
aa7773bef3
1 changed files with 19 additions and 0 deletions
|
|
@ -378,3 +378,22 @@ template <typename T>
|
|||
struct SubClass : BaseClass<typename T::R> {};
|
||||
|
||||
template struct SubClass<Int>;
|
||||
|
||||
template <typename T>
|
||||
struct Sink {};
|
||||
|
||||
template <typename...>
|
||||
using VoidT = void;
|
||||
|
||||
template <typename C, typename = void>
|
||||
inline constexpr bool HasValueType = false;
|
||||
|
||||
template <typename C>
|
||||
inline constexpr bool HasValueType<C, VoidT<typename C::value_type>> =
|
||||
sizeof(Sink<typename C::value_type>) != 0;
|
||||
|
||||
struct IntVector {
|
||||
using value_type = int;
|
||||
};
|
||||
|
||||
static_assert(HasValueType<IntVector>);
|
||||
|
|
|
|||
Loading…
Reference in a new issue