Skip to content

Update GetFunctionNumArgs API for template functions#219

Merged
vgvassilev merged 1 commit intocompiler-research:mainfrom
aaronj0:update-argcount-api
Apr 6, 2024
Merged

Update GetFunctionNumArgs API for template functions#219
vgvassilev merged 1 commit intocompiler-research:mainfrom
aaronj0:update-argcount-api

Conversation

@aaronj0
Copy link
Copy Markdown
Collaborator

@aaronj0 aaronj0 commented Apr 5, 2024

No description provided.

Copy link
Copy Markdown
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


TEST(FunctionReflectionTest, GetFunctionNumArgs) {
std::vector<Decl*> Decls, SubDecls;
std::vector<Decl*> Decls, TemplateSubDecls;
Copy link
Copy Markdown
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;

return FD->getNumParams();
}

if (auto* FD = llvm::dyn_cast_or_null<clang::FunctionTemplateDecl>(D)) {
Copy link
Copy Markdown
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

@codecov
Copy link
Copy Markdown

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
Copy Markdown
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
@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