Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mizvekov opened this issue Oct 28, 2022 · 1 comment
Closed
Assignees
Labels
clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@mizvekov
Copy link
Contributor

mizvekov commented Oct 28, 2022

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>>{}... };
@mizvekov mizvekov self-assigned this Oct 28, 2022
@mizvekov mizvekov added clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer labels Oct 28, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 28, 2022

@llvm/issue-subscribers-clang-frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants