[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:
Zeyi Xu 2026-07-03 13:59:54 +08:00 committed by GitHub
parent ac05f72d8f
commit aa7773bef3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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>);