namespace {
class MacroRepeatedPPCallbacks : public PPCallbacks {
public:
- MacroRepeatedPPCallbacks(ClangTidyCheck &Check, SourceManager &SM,
- Preprocessor &PP)
- : Check(Check), SM(SM), PP(PP) {}
+ MacroRepeatedPPCallbacks(ClangTidyCheck &Check, Preprocessor &PP)
+ : Check(Check), PP(PP) {}
void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
SourceRange Range, const MacroArgs *Args) override;
private:
ClangTidyCheck &Check;
- SourceManager &SM;
Preprocessor &PP;
unsigned CountArgumentExpansions(const MacroInfo *MI,
CompilerInstance &Compiler) {
Compiler.getPreprocessor().addPPCallbacks(
::llvm::make_unique<MacroRepeatedPPCallbacks>(
- *this, Compiler.getSourceManager(), Compiler.getPreprocessor()));
+ *this, Compiler.getPreprocessor()));
}
} // namespace misc