Skip to content
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

Add type info interfaces motivated by numba #534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aaronj0
Copy link
Collaborator

@aaronj0 aaronj0 commented Mar 20, 2025

  • Add IsSameType used for matching arg types between numba inferred signatures and CppOverloads in cppyy.
  • Add type info reflection interfaces for integer, void pointer, signed and unsigned types.
  • Also added interfaces IsIntegral and IsFloating that check if types have the respective representations. Used in the case of Numba where scoring based on reflection is required.

will add tests

- Add `IsSameType` used for matching arg types between numba inferred signatures and CppOverloads in cppyy.
- Add type info reflection interfaces for integer, void pointer, signed and unsigned types.
- Also added interfaces `IsIntegral` and `IsFloating` that check if types have the respective representations. Used in the case of Numba where scoring based on reflection is required.
@aaronj0 aaronj0 requested a review from vgvassilev March 20, 2025 23:26
Copy link
Contributor

@github-actions github-actions bot left a 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

@@ -1573,8 +1609,17 @@ namespace Cpp {
return QT.getNonReferenceType().getAsOpaquePtr();
}

TCppType_t GetUnqualifiedType(TCppType_t type) {
if (!type)
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: use nullptr [modernize-use-nullptr]

Suggested change
return 0;
return nullptr;

TCppType_t GetUnderlyingType(TCppType_t type)
{
if (!type)
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: use nullptr [modernize-use-nullptr]

Suggested change
return 0;
return nullptr;

Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 3.44828% with 28 lines in your changes missing coverage. Please review.

Project coverage is 72.16%. Comparing base (f0f59f2) to head (21266fe).

Files with missing lines Patch % Lines
lib/Interpreter/CppInterOp.cpp 3.44% 28 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #534      +/-   ##
==========================================
- Coverage   72.71%   72.16%   -0.56%     
==========================================
  Files           9        9              
  Lines        3618     3647      +29     
==========================================
+ Hits         2631     2632       +1     
- Misses        987     1015      +28     
Files with missing lines Coverage Δ
include/clang/Interpreter/CppInterOp.h 96.29% <ø> (ø)
lib/Interpreter/CppInterOp.cpp 81.84% <3.44%> (-1.17%) ⬇️
Files with missing lines Coverage Δ
include/clang/Interpreter/CppInterOp.h 96.29% <ø> (ø)
lib/Interpreter/CppInterOp.cpp 81.84% <3.44%> (-1.17%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vgvassilev
Copy link
Contributor

We should add tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants