doc: Remove unused bugprone-lambda-function-name suppression
What changed, and why it matters
This is a documentation and code-cleanup change only. It removes an outdated compiler-lint suppression comment and slightly reformats a macro that throws an error when unreachable code is reached. There is no functional change to Bitcoin Core's behavior, and no security issue is introduced or fixed.
No security action needed. This is a routine cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes NOLINTBEGIN/NOLINTEND(bugprone-lambda-function-name) comments from src/util/check.h because func is no longer used in the macros. It also reformats NONFATAL_UNREACHABLE() from a multi-line macro with parentheses to a single-line macro using braced initialization. The macro semantics and generated code are unchanged.
Changed components
src/util/check.hInspect captured patch +2 / −8
diff --git a/src/util/check.h b/src/util/check.h
index 0d08a473..34801ca0 100644
--- a/src/util/check.h
+++ b/src/util/check.h
@@ -93,9 +93,6 @@ constexpr T&& inline_assertion_check(LIFETIMEBOUND T&& val, [[maybe_unused]] con
return std::forward<T>(val);
}
-// All macros may use __func__ inside a lambda, so put them under nolint.
-// NOLINTBEGIN(bugprone-lambda-function-name)
-
#define STR_INTERNAL_BUG(msg) StrFormatInternalBug((msg), std::source_location::current())
/**
@@ -130,11 +127,8 @@ constexpr T&& inline_assertion_check(LIFETIMEBOUND T&& val, [[maybe_unused]] con
/**
* NONFATAL_UNREACHABLE() is a macro that is used to mark unreachable code. It throws a NonFatalCheckError.
*/
-#define NONFATAL_UNREACHABLE() \
- throw NonFatalCheckError( \
- "Unreachable code reached (non-fatal)", std::source_location::current())
-
-// NOLINTEND(bugprone-lambda-function-name)
+#define NONFATAL_UNREACHABLE() \
+ throw NonFatalCheckError { "Unreachable code reached (non-fatal)", std::source_location::current() }
#if defined(__has_feature)
# if __has_feature(address_sanitizer)
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.