-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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] Frontend crashes when using immediately invoked lambda with parameter pack inside decltype #79555
Comments
@llvm/issue-subscribers-clang-frontend Author: Christian Daley (christiandaley)
Repro here: https://godbolt.org/z/r8MzTK4he
gcc and msvc compile this code without issue. Removing the template on either the struct or the using declaration fixes the issue in clang. Another perhaps related issue occurs with similar code. Replacing the Crash backtrace (from godbolt): clang++: /root/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp:776: unsigned int {anonymous}::PackDeductionScope::addPacks(clang::TemplateArgument): Assertion `!Packs.empty() && "Pack expansion without unexpanded packs?"' failed.
|
it looks pretty close to: #28461 Reduced a little bit: https://godbolt.org/z/xEWraaTWh template <typename>
struct S
{
template <typename>
using type = decltype([](auto...) {}());
};
int main(){
using T = S<int>::type<void>;
} |
@llvm/issue-subscribers-c-20 Author: Christian Daley (christiandaley)
Repro here: https://godbolt.org/z/r8MzTK4he
gcc and msvc compile this code without issue. Removing the template on either the struct or the using declaration fixes the issue in clang. Another perhaps related issue occurs with similar code. Replacing the Crash backtrace (from godbolt):
|
Repro here: https://godbolt.org/z/r8MzTK4he
gcc and msvc compile this code without issue. Removing the template on either the struct or the using declaration fixes the issue in clang.
Another perhaps related issue occurs with similar code. Replacing the
auto...
parameter pack with justauto
and attempting to invoke the lambda with a single integer argument fails to compile with errorno matching function for call to object of type 'S<int>::(lambda at <source>:5:24)'
. Again, both gcc and msvc can compile this. Link: https://godbolt.org/z/W1541s8d6Crash backtrace (from godbolt):
The text was updated successfully, but these errors were encountered: