[CODE HEALTH] Fix clang-tidy bugprone-throwing-static-initialization warnings#4206
[CODE HEALTH] Fix clang-tidy bugprone-throwing-static-initialization warnings#4206RaviTriv wants to merge 16 commits into
bugprone-throwing-static-initialization warnings#4206Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4206 +/- ##
==========================================
- Coverage 82.82% 82.80% -0.01%
==========================================
Files 415 415
Lines 17431 17452 +21
==========================================
+ Hits 14435 14449 +14
- Misses 2996 3003 +7
🚀 New features to boost your workflow:
|
60e25bf to
3436db9
Compare
3436db9 to
d873fbf
Compare
dbarker
left a comment
There was a problem hiding this comment.
Thanks! Looks good with a few minor optional changes. Please resolve the conflicts. This PR needs a second review/approval of the API file changes.
| remaining_argc--; | ||
| remaining_argv++; | ||
| opt_endpoint = *remaining_argv; | ||
| GetOptEndpoint() = *remaining_argv; |
There was a problem hiding this comment.
Assigning a value to the return value of the get accessor is a bit unexpected. Consider keeping the endpoint string as static global, creating a constexpr literal for the default value, and initialize the string in the main function.
| struct test_case | ||
| { | ||
| std::string m_name; | ||
| const char *m_name; |
35a92d6 to
64ac1a1
Compare
Thank you! Rebased and pushed a commit for the suggested changes. @marcalff would you mind giving the second review when you have a chance :) |
Fixes #4197
Changes
Addressing clang-tidy
bugprone-throwing-static-initializationwarningsFixes:
constwithconstexprfor compile-time constantsconst std::stringwithconstexpr const char *nostd::string_viewfor a non-owning viewmain()and passed by referenceFor significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes