Skip to content

[clang] Poor error recovery when performing pack expansion on expressions #58673

Closed
@mizvekov

Description

@mizvekov

Repro: https://godbolt.org/z/K6s7W6d8z

template <class> struct A;
template <class> using B = char;
template <class Cs> int C{ A<B<Cs>>{}... };

We incorrectly diagnose a pack expansion without unexpanded parameter packs:

<source>:3:28: error: implicit instantiation of undefined template 'A<char>'
template <class Cs> int C{ A<B<Cs>>{}... };
                           ^
<source>:1:25: note: template is declared here
template <class> struct A;
                        ^
<source>:3:38: error: pack expansion does not contain any unexpanded parameter packs
template <class Cs> int C{ A<B<Cs>>{}... };

Metadata

Metadata

Assignees

Labels

clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions