-
Notifications
You must be signed in to change notification settings - Fork 11.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
Assertion `CapturedVar->isInitCapture()' failed #110721
Comments
@llvm/issue-subscribers-clang-frontend Author: None (dcb314)
Recent clang says:
clang++: /home/dcb40b/llvm/trunk/clang/lib/Sema/SemaConcept.cpp:719: clang::Sema::addInstantiatedCapturesToScope(clang::FunctionDecl*, const clang::FunctionDecl*, clang::LocalInstantiationScope&, const clang::MultiLevelTemplateArgumentList&)::<lambda(const clang::ValueDecl*, unsigned int)>: Assertion `CapturedVar->isInitCapture()' failed. connectionencryptiondata_p-e2be0f.sh.gz |
Reduced by me and CReduce: (The crash only triggers w/ assertion build) template <int N> void connect() {
int x = N, y = N;
[x, y = y]()
requires requires { x; }
{}();
}
void foo() {
connect<42>();
} |
Looks like a regression on trunk: https://godbolt.org/z/h9frKK74Y CC @cor3ntin |
Seems to go wrong sometime before or on date 2024-09-03. |
Recent clang says:
clang++: /home/dcb40b/llvm/trunk/clang/lib/Sema/SemaConcept.cpp:719: clang::Sema::addInstantiatedCapturesToScope(clang::FunctionDecl*, const clang::FunctionDecl*, clang::LocalInstantiationScope&, const clang::MultiLevelTemplateArgumentList&)::<lambda(const clang::ValueDecl*, unsigned int)>: Assertion `CapturedVar->isInitCapture()' failed.
connectionencryptiondata_p-e2be0f.sh.gz
connectionencryptiondata_p-e2be0f.cpp.gz
The text was updated successfully, but these errors were encountered: