#include "HeaderGuard.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/Path.h"
namespace clang::tidy::utils {
static std::string cleanPath(StringRef Path) { … }
namespace {
class HeaderGuardPPCallbacks : public PPCallbacks { … };
}
void HeaderGuardCheck::registerPPCallbacks(const SourceManager &SM,
Preprocessor *PP,
Preprocessor *ModuleExpanderPP) { … }
std::string HeaderGuardCheck::sanitizeHeaderGuard(StringRef Guard) { … }
bool HeaderGuardCheck::shouldSuggestEndifComment(StringRef FileName) { … }
bool HeaderGuardCheck::shouldFixHeaderGuard(StringRef FileName) { … }
bool HeaderGuardCheck::shouldSuggestToAddHeaderGuard(StringRef FileName) { … }
std::string HeaderGuardCheck::formatEndIf(StringRef HeaderGuard) { … }
}