mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
fa244f3321
* Move module description from test to LogPrintfCheck * Add test doc * Remove unused comment, see https://github.com/bitcoin/bitcoin/pull/26296/files#r1279351539
29 lines
931 B
C++
29 lines
931 B
C++
// Copyright (c) 2023 Bitcoin Developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef LOGPRINTF_CHECK_H
|
|
#define LOGPRINTF_CHECK_H
|
|
|
|
#include <clang-tidy/ClangTidyCheck.h>
|
|
|
|
namespace bitcoin {
|
|
|
|
// Warn about any use of LogPrintf that does not end with a newline.
|
|
class LogPrintfCheck final : public clang::tidy::ClangTidyCheck
|
|
{
|
|
public:
|
|
LogPrintfCheck(clang::StringRef Name, clang::tidy::ClangTidyContext* Context)
|
|
: clang::tidy::ClangTidyCheck(Name, Context) {}
|
|
|
|
bool isLanguageVersionSupported(const clang::LangOptions& LangOpts) const override
|
|
{
|
|
return LangOpts.CPlusPlus;
|
|
}
|
|
void registerMatchers(clang::ast_matchers::MatchFinder* Finder) override;
|
|
void check(const clang::ast_matchers::MatchFinder::MatchResult& Result) override;
|
|
};
|
|
|
|
} // namespace bitcoin
|
|
|
|
#endif // LOGPRINTF_CHECK_H
|