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
Assertion in clang/lib/Sema/SemaTemplateVariadic.cpp failed: `!Unexpanded.empty() && "Unable to find unexpanded parameter packs"' #22200
Comments
still repros |
Still repros. Here's another test case that fails with the same assertion: template <class... Ts> |
Here is a valid code reproduction
See it live: https://godbolt.org/z/b6YWGnWz7 |
Full backtrace
|
mentioned in issue #23431 |
mentioned in issue llvm/llvm-bugzilla-archive#28471 |
I just ran into the same issue. The godbolt link provided still reproduces the issue. |
@llvm/issue-subscribers-clang-frontend |
Closing as this seems to have already been fixed. (I checked the godbolt link above) |
Extended Description
Fuzzing discovered that the attached test case, when given as input to
clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm
causes this assertion failure:
unexpanded-parm-pack.cpp:1:24: error: expected ']'
template <int... N> a[N
^
unexpanded-parm-pack.cpp:1:22: note: to match this '['
template <int... N> a[N
^
unexpanded-parm-pack.cpp:1:21: error: C++ requires a type specifier for all declarations
template <int... N> a[N
^
clang-3.6: tools/clang/lib/Sema/SemaTemplateVariadic.cpp:281: bool clang::Sema::DiagnoseUnexpandedParameterPack(clang::SourceLocation, clang::TypeSourceInfo *, clang::Sema::UnexpandedParameterPackContext): Assertion `!Unexpanded.empty() && "Unable to find unexpanded parameter packs"' failed.
The text was updated successfully, but these errors were encountered: