clang-tools 22.0.0git
|
Finds and fixes header guards that do not adhere to LLVM style. More...
#include <HeaderGuardCheck.h>
Public Member Functions | |
LLVMHeaderGuardCheck (StringRef Name, ClangTidyContext *Context) | |
bool | shouldSuggestEndifComment (StringRef Filename) override |
std::string | getHeaderGuard (StringRef Filename, StringRef OldGuard) override |
Gets the canonical header guard for a file. | |
Public Member Functions inherited from clang::tidy::utils::HeaderGuardCheck | |
HeaderGuardCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override |
std::string | sanitizeHeaderGuard (StringRef Guard) |
Ensure that the provided header guard is a non-reserved identifier. | |
virtual std::string | formatEndIf (StringRef HeaderGuard) |
Returns true if the check should suggest inserting a trailing comment / on the #endif of the header guard. |
Finds and fixes header guards that do not adhere to LLVM style.
For the user-facing documentation see: http://clang.llvm.org/extra/clang-tidy/checks/llvm/header-guard.html
Definition at line 19 of file HeaderGuardCheck.h.
clang::tidy::llvm_check::LLVMHeaderGuardCheck::LLVMHeaderGuardCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 15 of file HeaderGuardCheck.cpp.
References clang::tidy::utils::HeaderGuardCheck::HeaderGuardCheck().
|
overridevirtual |
Gets the canonical header guard for a file.
Implements clang::tidy::utils::HeaderGuardCheck.
Definition at line 19 of file HeaderGuardCheck.cpp.
|
inlineoverride |
Definition at line 23 of file HeaderGuardCheck.h.