[clang] fix runtime check for NNS transform (#154418)
This commit is contained in:
parent
af8a149546
commit
ec6389d0c0
@ -5417,6 +5417,7 @@ QualType TreeTransform<Derived>::TransformTypeInObjectScope(
|
||||
case TypeLoc::Typedef:
|
||||
case TypeLoc::TemplateSpecialization:
|
||||
case TypeLoc::SubstTemplateTypeParm:
|
||||
case TypeLoc::SubstTemplateTypeParmPack:
|
||||
case TypeLoc::PackIndexing:
|
||||
case TypeLoc::Enum:
|
||||
case TypeLoc::Record:
|
||||
|
@ -167,3 +167,18 @@ namespace unresolved_using {
|
||||
};
|
||||
template struct C<int>;
|
||||
} // 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user