-
Notifications
You must be signed in to change notification settings - Fork 38
[test] instantiating template multiple times with same types #756
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
[test] instantiating template multiple times with same types #756
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
| EXPECT_EQ(Decls.size(), 1); | ||
|
|
||
| std::vector<Cpp::TCppFunction_t> candidates; | ||
| for (auto i : Decls) |
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: 'auto i' can be declared as 'auto *i' [llvm-qualified-auto]
| for (auto i : Decls) | |
| for (auto *i : Decls) |
|
|
||
| std::vector<Cpp::TCppFunction_t> candidates; | ||
| for (auto i : Decls) | ||
| candidates.push_back(i); |
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: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation]
unittests/CppInterOp/FunctionReflectionTest.cpp:986:
- for (auto i : Decls)
+ candidates.reserve(Decls.size());
+ for (auto i : Decls)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #756 +/- ##
=======================================
Coverage 79.04% 79.04%
=======================================
Files 9 9
Lines 3879 3879
=======================================
Hits 3066 3066
Misses 813 813 see 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
vgvassilev
left a comment
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.
Modulo clang-tidy, lgtm!
bf67337 to
45027c6
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
vgvassilev
left a comment
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.
Nice! LGTM!
5534f38
into
compiler-research:main
No description provided.