-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partycrash-on-validregression:16Regression in 16 releaseRegression in 16 release
Description
The following minimized reproducer produces a clang frontend crash:
template <class T>
struct Tester {
struct Inner {
using T2 = int;
};
static void test();
};
template <class T>
/*typename*/ Tester<T>::Inner::T2 getInnerT2() { return {}; }
template <class T>
void Tester<T>::test() {
auto _ = getInnerT2<T>();
}
template struct Tester<int>;https://compiler-explorer.com/z/jnqf8fP68
Assertion:
clang++: /root/llvm-project/llvm/tools/clang/lib/AST/ASTContext.cpp:2428:
clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const:
Assertion `!A->getDeducedType().isNull() && "cannot request the size of an undeduced or dependent auto type"' failed.
Note that this only crashes when omitting the typename from getInnerT2(). With explicit typename, the code compiles.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partycrash-on-validregression:16Regression in 16 releaseRegression in 16 release
Type
Projects
Status
No status