[clang] [clang][Sema] Visit repeated ADL template arguments once (PR #235714)
Adam Dangoor via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 30 02:18:08 PDT 2026
================
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+namespace assoc {
+struct Leaf {};
+template<class T, class U=T> struct Node {};
+void consume(...);
+}
+void test(assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Node<assoc::Leaf>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> value) { consume(value); }
+
+template<class T> struct Base {};
+namespace other { struct Tag {}; }
+struct Derived : Base<other::Tag> {};
+namespace other {
+constexpr int select(Derived, Base<Tag>) { return 7; }
+}
+static_assert(select(Derived{}, Base<other::Tag>{}) == 7);
----------------
adamtheturtle wrote:
Yes, there is one. GitHub shows a ⛔ when there is no newline.
https://github.com/llvm/llvm-project/pull/235714
More information about the cfe-commits
mailing list