aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2024-04-08 17:35:09 +0200
committerfanquake <fanquake@gmail.com>2024-04-08 17:35:15 +0200
commiteaf186d1ee3a0271ec8cad65fa294b4298d79b0a (patch)
treea362cb2801ffdac4d39d4b719fafb8070899c203 /doc
parent3206e45412ded0e70c1f15ba66c2ba3b4426f27f (diff)
parent78407b99ed6dd17f687fcbfb0486ecc433302287 (diff)
downloadbitcoin-eaf186d1ee3a0271ec8cad65fa294b4298d79b0a.tar.xz
Merge bitcoin/bitcoin#29690: clang-tidy: Enable misc-no-recursion
78407b99ed6dd17f687fcbfb0486ecc433302287 [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 78407b99ed6dd17f687fcbfb0486ecc433302287 TheCharlatan: Re-ACK 78407b99ed6dd17f687fcbfb0486ecc433302287 fanquake: ACK 78407b99ed6dd17f687fcbfb0486ecc433302287 Tree-SHA512: 34126d704c46086fe7371906ca852c25ced1dbd5fcfd85bf623810cd171a797569a92a33c7e26b8dc01c30c7bbf81aa326718926e8354585091411989a4edb14
Diffstat (limited to 'doc')
-rw-r--r--doc/developer-notes.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 89c13600eb..cc3f0518e5 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -115,6 +115,8 @@ code.
Use `reinterpret_cast` and `const_cast` as appropriate.
- Prefer [`list initialization ({})`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list) where possible.
For example `int x{0};` instead of `int x = 0;` or `int x(0);`
+ - Recursion is checked by clang-tidy and thus must be made explicit. Use
+ `NOLINTNEXTLINE(misc-no-recursion)` to suppress the check.
For function calls a namespace should be specified explicitly, unless such functions have been declared within it.
Otherwise, [argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl), also known as ADL, could be