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 variadic support for templates #324

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

Conversation

aaronj0
Copy link
Collaborator

@aaronj0 aaronj0 commented Sep 19, 2024

No description provided.

@aaronj0 aaronj0 requested a review from vgvassilev September 19, 2024 11:19
@aaronj0 aaronj0 marked this pull request as draft September 19, 2024 11:19
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.85%. Comparing base (b810c6e) to head (ad55091).
Report is 2 commits behind head on main.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
- Coverage   70.87%   70.85%   -0.03%     
==========================================
  Files           9        9              
  Lines        3533     3537       +4     
==========================================
+ Hits         2504     2506       +2     
- Misses       1029     1031       +2     
Files with missing lines Coverage Δ
lib/Interpreter/CppInterOp.cpp 80.13% <66.66%> (-0.07%) ⬇️
Files with missing lines Coverage Δ
lib/Interpreter/CppInterOp.cpp 80.13% <66.66%> (-0.07%) ⬇️

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

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.

We don't seem to have tests for the new code.

@aaronj0
Copy link
Collaborator Author

aaronj0 commented Sep 20, 2024

We don't seem to have tests for the new code.

There is an added unittest... It is still a draft though, will update with a case for TemplateArgument::ArgKind::Pack which are the 2 lines missing coverage

@aaronj0 aaronj0 marked this pull request as ready for review December 4, 2024 08:52
Copy link
Contributor

github-actions bot commented Dec 4, 2024

clang-tidy review says "All clean, LGTM! 👍"

TEST(FunctionReflectionTest, InstantiateVariadicFunctionTemplate) {
std::vector<Decl*> Decls;
std::string code = R"(
template<typename... Args> void VariadicFnTemplate(Args... args) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we include the example of #305?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current test mimics the same variadic template, I am extending it to initialize using a template pack which should cover the other branch for codecov

Copy link
Contributor

Choose a reason for hiding this comment

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

Still worth adding the test from the issue and adding code to support it.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

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