mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
doc: Fix bitcoin-unterminated-logprintf tidy comments
* Move module description from test to LogPrintfCheck * Add test doc * Remove unused comment, see https://github.com/bitcoin/bitcoin/pull/26296/files#r1279351539
This commit is contained in:
parent
b565485c24
commit
fa244f3321
2 changed files with 3 additions and 3 deletions
|
@ -2,9 +2,10 @@
|
|||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
// Warn about any use of LogPrintf that does not end with a newline.
|
||||
#include <string>
|
||||
|
||||
// Test for bitcoin-unterminated-logprintf
|
||||
|
||||
enum LogFlags {
|
||||
NONE
|
||||
};
|
||||
|
@ -21,8 +22,6 @@ static inline void LogPrintf_(const std::string& logging_function, const std::st
|
|||
#define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
|
||||
#define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__)
|
||||
|
||||
// Use a macro instead of a function for conditional logging to prevent
|
||||
// evaluating arguments when logging for the category is not enabled.
|
||||
#define LogPrint(category, ...) \
|
||||
do { \
|
||||
LogPrintf(__VA_ARGS__); \
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
namespace bitcoin {
|
||||
|
||||
// Warn about any use of LogPrintf that does not end with a newline.
|
||||
class LogPrintfCheck final : public clang::tidy::ClangTidyCheck
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue