[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)
A. Jiang via cfe-commits
cfe-commits at lists.llvm.org
Fri May 9 01:34:14 PDT 2025
================
@@ -47,3 +47,21 @@ namespace InvalidInsertPos {
template<> int v<int, 0>;
int k = v<int, 500>;
}
+
+namespace GH51347 {
+ template <typename T>
+ auto p = p<T>; // expected-error {{the type of variable template specialization 'p<int>'}}
----------------
frederick-vs-ja wrote:
It seems that [[temp.res.general]/6](https://eel.is/c++draft/temp.res.general#6) allows us to eagerly diagnose this...
https://github.com/llvm/llvm-project/pull/134522
More information about the cfe-commits
mailing list