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

Update GetFunctionNumArgs API for template functions #219

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

aaronj0
Copy link
Collaborator

@aaronj0 aaronj0 commented Apr 5, 2024

No description provided.

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

@@ -267,21 +267,42 @@ TEST(FunctionReflectionTest, GetFunctionReturnType) {
}

TEST(FunctionReflectionTest, GetFunctionNumArgs) {
std::vector<Decl*> Decls, SubDecls;
std::vector<Decl*> Decls, TemplateSubDecls;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'Decls' is not initialized [cppcoreguidelines-init-variables]

Suggested change
std::vector<Decl*> Decls, TemplateSubDecls;
std::vector<Decl*> Decls = 0, TemplateSubDecls;

@@ -831,6 +831,11 @@ namespace Cpp {
if (auto *FD = llvm::dyn_cast_or_null<FunctionDecl>(D)) {
return FD->getNumParams();
}

if (auto* FD = llvm::dyn_cast_or_null<clang::FunctionTemplateDecl>(D)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No braces on single line statements

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.82%. Comparing base (32efeba) to head (cac4731).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   78.80%   78.82%   +0.01%     
==========================================
  Files           8        8              
  Lines        3100     3102       +2     
==========================================
+ Hits         2443     2445       +2     
  Misses        657      657              
Files Coverage Δ
lib/Interpreter/CppInterOp.cpp 86.44% <100.00%> (+0.01%) ⬆️
Files Coverage Δ
lib/Interpreter/CppInterOp.cpp 86.44% <100.00%> (+0.01%) ⬆️

@aaronj0 aaronj0 force-pushed the update-argcount-api branch from 4ec804c to cac4731 Compare April 6, 2024 13:36
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!

@vgvassilev vgvassilev merged commit 1272d1b into compiler-research:main Apr 6, 2024
42 of 44 checks passed
@aaronj0 aaronj0 deleted the update-argcount-api branch April 22, 2024 12:44
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