-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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]
std::vector<Decl*> Decls, TemplateSubDecls; | |
std::vector<Decl*> Decls = 0, TemplateSubDecls; |
lib/Interpreter/CppInterOp.cpp
Outdated
@@ -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)) { |
There was a problem hiding this comment.
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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
|
4ec804c
to
cac4731
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.