[clang] [Clang] Reland: Diagnose invalid function types in dependent contexts (PR #139246)

2025-05-09 Thread Jay Feldblum via cfe-commits
@@ -60,3 +61,98 @@ void f3() { f2(0); f2(0); // expected-error {{no matching function for call to 'f2'}} } + +#if __cplusplus >= 202002L +namespace GH138657 { +template // #gh138657-template-head +class meta {}; +template +class meta {}; // expected-error {{called object t

[clang] [Clang] Reland: Diagnose invalid function types in dependent contexts (PR #139246)

2025-05-09 Thread Jay Feldblum via cfe-commits
@@ -60,3 +61,98 @@ void f3() { f2(0); f2(0); // expected-error {{no matching function for call to 'f2'}} } + +#if __cplusplus >= 202002L +namespace GH138657 { +template // #gh138657-template-head +class meta {}; +template +class meta {}; // expected-error {{called object t