-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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] crash when meeting template friend function #62265
Comments
I have done some work for it. The issue is in MultiLevelTemplateArgumentList TemplateArgs = getTemplateInstantiationArgs(
Function, /*Final=*/false, nullptr, false, PatternDecl);
|
@llvm/issue-subscribers-clang-codegen |
Confirmed, feels like something that @erichkeane @alexander-shaposhnikov might know about |
https://reviews.llvm.org/D146178 alters that a bit, but I could definitely believe we have another bug in there. The getTemplateInstantiationArgs function is still a 'work in progress' these days (its being pushed to do things it never had to do before, particularly with concepts), but it looks like this is friend related (which is a little surprising). Perhaps we're just quitting too early on collecting args on inline-defined-friends like this, |
Yeah, for inline friend, it does not consider the template in outsider RecordDecl. @shafik @erichkeane Do you have some suggestion to fix it? |
So you SHOULD have been able to get it from the lexicalDeclContext, but it appears that isn't set correctly. So you'll have to fix that FIRST. I see that the |
https://godbolt.org/z/vEGdvhc3q
The text was updated successfully, but these errors were encountered: