fuzz: Drop unused workaround after Apple-Clang bump
What changed, and why it matters
This is a tiny cleanup change in Bitcoin Core's internal fuzz-testing code. It removes a workaround comment and simplifies how fuzz test targets are registered. There is no security issue here.
No action needed. This is a benign refactoring of test-only code.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes a temporary workaround in src/test/fuzz/fuzz.cpp that explicitly constructed a FuzzTarget struct when calling try_emplace. After bumping the minimum Apple Clang version, structured binding with try_emplace now works directly with moved arguments, so the explicit temporary is no longer needed. This is a code-quality/refactoring change only.
Changed components
src/test/fuzz/fuzz.cppInspect captured patch +1 / −1
diff --git a/src/test/fuzz/fuzz.cpp b/src/test/fuzz/fuzz.cpp
index d4d82a62..ec5b6384 100644
--- a/src/test/fuzz/fuzz.cpp
+++ b/src/test/fuzz/fuzz.cpp
@@ -75,7 +75,7 @@ auto& FuzzTargets()
void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts)
{
- const auto [it, ins]{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped after Apple-Clang-16 ? */ {std::move(target), std::move(opts)})};
+ const auto [it, ins]{FuzzTargets().try_emplace(name, std::move(target), std::move(opts))};
Assert(ins);
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.