[clang] fix runtime check for NNS transform (#154418)

This commit is contained in:
Matheus Izvekov 2025-08-19 18:32:17 -03:00 committed by GitHub
parent af8a149546
commit ec6389d0c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View File

@ -5417,6 +5417,7 @@ QualType TreeTransform<Derived>::TransformTypeInObjectScope(
case TypeLoc::Typedef: case TypeLoc::Typedef:
case TypeLoc::TemplateSpecialization: case TypeLoc::TemplateSpecialization:
case TypeLoc::SubstTemplateTypeParm: case TypeLoc::SubstTemplateTypeParm:
case TypeLoc::SubstTemplateTypeParmPack:
case TypeLoc::PackIndexing: case TypeLoc::PackIndexing:
case TypeLoc::Enum: case TypeLoc::Enum:
case TypeLoc::Record: case TypeLoc::Record:

View File

@ -167,3 +167,18 @@ namespace unresolved_using {
}; };
template struct C<int>; template struct C<int>;
} // namespace unresolved_using } // namespace unresolved_using
#if __cplusplus >= 201703L
namespace SubstTemplateTypeParmPackType {
template <int...> struct A {};
template <class... Ts> void f() {
[]<int ... Is>(A<Is...>) { (Ts::g(Is) && ...); }(A<0>{});
// expected-warning@-1 {{explicit template parameter list for lambdas is a C++20 extension}}
};
struct B { static void g(int); };
template void f<B>();
} // namespace SubstTemplateTypeParmPackType
#endif