-
Notifications
You must be signed in to change notification settings - Fork 748
ir: Fix is_in_non_fully_specialized_template check. #466
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
Conversation
I didn't write the patch because I'm not fully sure how this should be handled. I guess |
Probably we should add a new method called
|
src/clang.rs
Outdated
} | ||
|
||
if !parent.is_template_like() { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we should still check recursively whether parent is_in_non_fully_specialized_template
, otherwise something like
template<typename... T>
struct Outer {
struct Inner {
static constexpr int value[] = { T::value, ... };
};
};
may crash again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, great catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lack of function templates doesn't matter at all because we don't inspect their bodies.
src/clang.rs
Outdated
} | ||
|
||
if !parent.is_template_like() { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, great catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree lack of that doesn't matter here. I just feel is_template_like
sounds vague... anyway, this looks fine.
@bors-servo r+ (if I can) |
@upsuper: 🔑 Insufficient privileges: Not in reviewers |
@bors-servo r=upsuper |
📌 Commit eb0a8af has been approved by |
@bors-servo retry
|
@bors-servo r=upsuper |
📌 Commit 993a959 has been approved by |
☀️ Test successful - status-travis |
Fixes #462
r? @upsuper