11#include "clang/Lex/PPCallbacks.h"
12#include "clang/Lex/Preprocessor.h"
13#include "llvm/ADT/STLExtras.h"
16namespace find_all_symbols {
21 : Reporter(Reporter), Collector(RegexHeaderMap), Handler(&Collector),
22 Matcher(Reporter, &Collector) {
26std::unique_ptr<ASTConsumer>
29 Compiler.getPreprocessor().addCommentHandler(&Handler);
30 Compiler.getPreprocessor().addPPCallbacks(std::make_unique<FindAllMacros>(
31 Reporter, &Compiler.getSourceManager(), &Collector));
32 return MatchFinder.newASTConsumer();
std::unique_ptr< clang::ASTConsumer > CreateASTConsumer(clang::CompilerInstance &Compiler, StringRef InFile) override
FindAllSymbolsAction(SymbolReporter *Reporter, const HeaderMapCollector::RegexHeaderMap *RegexHeaderMap=nullptr)
void registerMatchers(ast_matchers::MatchFinder *MatchFinder)
An interface for classes that collect symbols.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//