Skip to content

Conversation

@Vipul-Cariappa
Copy link
Collaborator

Description

Fixes code generation of MakeFunctionCallable for templated operators.
Look at the inline comment.

Fixes # (issue)

Fixes one test case in cppyy.

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Tests included.

Checklist

  • I have read the contribution guide recently

@codecov
Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.33%. Comparing base (9c818c5) to head (66276a0).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
+ Coverage   71.63%   72.33%   +0.69%     
==========================================
  Files           9        9              
  Lines        3568     3575       +7     
==========================================
+ Hits         2556     2586      +30     
+ Misses       1012      989      -23     
Files with missing lines Coverage Δ
lib/Interpreter/CppInterOp.cpp 82.52% <100.00%> (+1.27%) ⬆️
Files with missing lines Coverage Δ
lib/Interpreter/CppInterOp.cpp 82.52% <100.00%> (+1.27%) ⬆️

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

auto* TOperatorCtor = Cpp::GetDefaultConstructor(TOperator);
auto FCI_TOperatorCtor = Cpp::MakeFunctionCallable(TOperatorCtor);
void* toperator = nullptr;
FCI_TOperatorCtor.Invoke((void*)&toperator);
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: multilevel pointer conversion from 'void **' to 'void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion]

  FCI_TOperatorCtor.Invoke((void*)&toperator);
                                  ^

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM!

@Vipul-Cariappa Vipul-Cariappa merged commit 2b184ce into compiler-research:main Feb 22, 2025
73 checks passed
@Vipul-Cariappa Vipul-Cariappa deleted the dev/templated-operator-makecallable-codegen branch February 22, 2025 09:20
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