-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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-invalid
Description
Hi,
Behold this bogus template specialisation:
template <a> class b {
template <> friend int c< b >() {}
};Clang / GCC / MSVC all reject this with errors and diagnostics. With assertions enabled however, clang fires the following assertion failure rather than completing:
clang: /path/clang/lib/Sema/SemaDecl.cpp:10454: clang::NamedDecl *clang::Sema::ActOnFunctionDeclarator(clang::Scope *,
clang::Declarator &, clang::DeclContext *, clang::TypeSourceInfo *, clang::LookupResult &, clang::MultiTemplateParamsArg,
bool &): Assertion `HasExplicitTemplateArgs && "friend function specialization without template args"' failed.
when building with the very recent 22044f0. Godbolt link of the same: https://godbolt.org/z/7jabnhEY9 . Fiddling with Godbolt, it appears the assertion failure appeared in the 14.0.0 release, and isn't present in the 13.0.0 release.
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-invalid