#include "MacroUsageCheck.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Regex.h"
#include <cctype>
#include <functional>
namespace clang::tidy::cppcoreguidelines {
static bool isCapsOnly(StringRef Name) { … }
namespace {
class MacroUsageCallbacks : public PPCallbacks { … };
}
void MacroUsageCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void MacroUsageCheck::registerPPCallbacks(const SourceManager &SM,
Preprocessor *PP,
Preprocessor *ModuleExpanderPP) { … }
void MacroUsageCheck::warnMacro(const MacroDirective *MD, StringRef MacroName) { … }
void MacroUsageCheck::warnNaming(const MacroDirective *MD,
StringRef MacroName) { … }
}