#include "FindAllSymbols.h"
#include "HeaderMapCollector.h"
#include "PathConfig.h"
#include "SymbolInfo.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Type.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/FileSystem.h"
#include <optional>
usingnamespaceclang::ast_matchers;
namespace clang {
namespace find_all_symbols {
namespace {
AST_MATCHER(EnumConstantDecl, isInScopedEnum) { … }
AST_POLYMORPHIC_MATCHER(isFullySpecialized,
AST_POLYMORPHIC_SUPPORTED_TYPES(FunctionDecl, VarDecl,
CXXRecordDecl)) { … }
std::vector<SymbolInfo::Context> GetContexts(const NamedDecl *ND) { … }
std::optional<SymbolInfo>
CreateSymbolInfo(const NamedDecl *ND, const SourceManager &SM,
const HeaderMapCollector *Collector) { … }
}
void FindAllSymbols::registerMatchers(MatchFinder *MatchFinder) { … }
void FindAllSymbols::run(const MatchFinder::MatchResult &Result) { … }
void FindAllSymbols::onEndOfTranslationUnit() { … }
}
}