-
Notifications
You must be signed in to change notification settings - Fork 13.6k
ICE on variadic operator overload #42535
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
Comments
Was able to simplify the example a little more: https://godbolt.org/z/csMc17qja
it firsts errors that Assertion: clang++: /root/llvm-project/clang/include/clang/AST/Decl.h:2629:
clang::ParmVarDecl* clang::FunctionDecl::getParamDecl(unsigned int):
Assertion `i < getNumParams() && "Illegal param #"' failed. And then crashes with the following dump
|
@llvm/issue-subscribers-clang-frontend |
@wheatman please make sure to use assertions build. if there is an assertion we should note it. I will modify your post accordingly. Also adding the godbolt link as well helps folks following up reproduce quickly. Assertions are crucial to finding duplicates an assuring we are directing effort to bugs that have come up frequently before. |
CC @Fznamznon |
@wheatman added |
Extended Description
the following code makes clang trunk crash.
int f() {
return 0;
}
enum E {};
int operator+ (E, ...) {
return 0;
}
void d() {
int i = E() + &f;
}
example: https://godbolt.org/z/j4F4J3
The text was updated successfully, but these errors were encountered: