================
@@ -5164,6 +5164,29 @@ namespace A {
 A::X x;
 #endif
 
+namespace TemplateDecltypeOperator {
+
+#if defined(FIRST) || defined(SECOND)
+template <class T6>
+T6 func();
+#endif
+
+#if defined(SECOND)
+template <class UnrelatedT>
+using UnrelatedAlias = decltype(func<UnrelatedT>())();
+#endif
+
+#if defined(FIRST) || defined(SECOND)
+class A {
----------------
ilya-biryukov wrote:

Could you add a comment to this test that points to this PR/GitHub issue and 
mentions that we need to make sure despite the fact that `decltype(e)`  gets 
canonicalized to `decltype(e_0)` where `e_0` can potentially have different 
template parameter names. Therefore, we need to ensure their ODR hashes are the 
same across multiple modules?

It might prove helpful in the future if somebody decides to reassess the 
choices made here and choose different trade-offs.

https://github.com/llvm/llvm-project/pull/144796
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to