[clang-tools-extra] [clang-tidy][NFC] Add test case confirming #190944 is fixed (PR #192707)

via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 17 11:19:32 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clang-tidy

Author: Victor Chernyakin (localspook)

<details>
<summary>Changes</summary>

Closes #<!-- -->190944.

This issue is already fixed, and this change just adds a test case to confirm that.


---
Full diff: https://github.com/llvm/llvm-project/pull/192707.diff


1 Files Affected:

- (modified) clang-tools-extra/test/clang-tidy/checkers/readability/redundant-typename.cpp (+12) 


``````````diff
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-typename.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-typename.cpp
index 56ff9813cd6ae..6a3745ea36d64 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-typename.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-typename.cpp
@@ -366,3 +366,15 @@ typename T::R Foo::PartiallySpecializedDataMember<T, typename T::V> = false;
 // CHECK-FIXES-20: T::R Foo::PartiallySpecializedDataMember<T, typename T::V> = false;
 
 #endif // __cplusplus >= 201402L
+
+struct Int {
+  using R = int;
+};
+
+template <typename T>
+struct BaseClass {};
+
+template <typename T>
+struct SubClass : BaseClass</* This used to be a false positive. */ typename T::R> {};
+
+template struct SubClass<Int>;

``````````

</details>


https://github.com/llvm/llvm-project/pull/192707


More information about the cfe-commits mailing list