You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
78407b9 [clang-tidy] Enable the misc-no-recursion check (dergoegge)
Pull request description:
Recursion is a frequent source of stack overflow bugs. Secondly, introduction of recursion can be non-obvious.
This PR proposes to use the clang-tidy `misc-no-recursion` check to make introduction of new recursion obvious. We don't make use of recursion a lot in our code base but there are a few places that need suppressions anyway (mostly the descriptor and univalue/rpc code).
ACKs for top commit:
stickies-v:
ACK 78407b9
TheCharlatan:
Re-ACK 78407b9
fanquake:
ACK 78407b9
Tree-SHA512: 34126d704c46086fe7371906ca852c25ced1dbd5fcfd85bf623810cd171a797569a92a33c7e26b8dc01c30c7bbf81aa326718926e8354585091411989a4edb14
Copy file name to clipboardExpand all lines: doc/developer-notes.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,8 @@ code.
115
115
Use `reinterpret_cast` and `const_cast` as appropriate.
116
116
- Prefer [`list initialization ({})`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list) where possible.
117
117
For example `int x{0};` instead of `int x = 0;` or `int x(0);`
118
+
- Recursion is checked by clang-tidy and thus must be made explicit. Use
119
+
`NOLINTNEXTLINE(misc-no-recursion)` to suppress the check.
118
120
119
121
For function calls a namespace should be specified explicitly, unless such functions have been declared within it.
120
122
Otherwise, [argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl), also known as ADL, could be
0 commit comments