-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve template instantiate #511
base: main
Are you sure you want to change the base?
Improve template instantiate #511
Conversation
Match parameter types to argument types in cases of when the parameter type itself is templated
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.
clang-tidy made some suggestions
// matching parameter and argument types | ||
// resolving parameter | ||
const auto* fn_TST = | ||
fn_arg_type->getAs<clang::TemplateSpecializationType>(); |
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.
warning: no header providing "clang::TemplateSpecializationType" is directly included [misc-include-cleaner]
fn_arg_type->getAs<clang::TemplateSpecializationType>();
^
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #511 +/- ##
==========================================
+ Coverage 72.45% 72.58% +0.12%
==========================================
Files 9 9
Lines 3591 3647 +56
==========================================
+ Hits 2602 2647 +45
- Misses 989 1000 +11
|
@@ -676,6 +676,15 @@ namespace Cpp { | |||
const char* m_IntegralValue; | |||
TemplateArgInfo(TCppScope_t type, const char* integral_value = nullptr) | |||
: m_Type(type), m_IntegralValue(integral_value) {} | |||
friend bool operator==(const TemplateArgInfo& lhs, |
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.
Why having a friend operator here?
Description
Match parameter types to argument types in cases of when the parameter type itself is templated.
Fixes # (issue)
Helps fix up to 4 tests in cppyy.
Also fixes the compiler-research/cppyy-backend#129 's cling failure.
Please tick all options which are relevant.
Testing
Included tests. I feel codecov will still not be happy. Will add more according to its suggestions.
Checklist