-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[fuzz] Assertion `!R.empty() && "lookup for a constructor or assignment operator was empty"' failed. #22231
Comments
This assertion is triggered by the following well-formed (AFAIK) code (tested on trunk): template<typename Fn>
struct fun : Fn
{
fun() = default;
fun(Fn fn) : Fn(fn) {}
using Fn::operator();
};
template<typename Fn>
fun<Fn> wrap(Fn fn)
{
return fun<Fn>(fn);
}
int main()
{
wrap([](){});
} Bit of a PITA. I haven't found a work-around. |
Fixed in r228785. |
Eric's rejects-valid with lambdas is fixed, the testcase produced by the fuzzer still fails, and looks like an unrelated error-recovery issue. |
No longer reproduces on trunk: https://godbolt.org/z/ojxPe9qsG Looks like it was fixed after clang-3 |
@llvm/issue-subscribers-clang-frontend |
The second example doesn't reproduce even with assertions builds: https://godbolt.org/z/4jdhcrrso |
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:
clang-3.6: tools/clang/lib/Sema/SemaLookup.cpp:2504: Sema::SpecialMemberOverloadResult *clang::Sema::LookupSpecialMember(clang::CXXRecordDecl *, clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool): Assertion `!R.empty() && "lookup for a constructor or assignment operator was empty"' failed.
The text was updated successfully, but these errors were encountered: