#include "FindTarget.h"
#include "AST.h"
#include "HeuristicResolver.h"
#include "support/Logger.h"
#include "clang/AST/ASTConcept.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprConcepts.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeLocVisitor.h"
#include "clang/AST/TypeVisitor.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include <iterator>
#include <string>
#include <utility>
#include <vector>
namespace clang {
namespace clangd {
namespace {
LLVM_ATTRIBUTE_UNUSED std::string nodeToString(const DynTypedNode &N) { … }
const NamedDecl *getTemplatePattern(const NamedDecl *D) { … }
bool shouldSkipTypedef(const TypedefNameDecl *TD) { … }
struct TargetFinder { … };
}
llvm::SmallVector<std::pair<const NamedDecl *, DeclRelationSet>, 1>
allTargetDecls(const DynTypedNode &N, const HeuristicResolver *Resolver) { … }
llvm::SmallVector<const NamedDecl *, 1>
targetDecl(const DynTypedNode &N, DeclRelationSet Mask,
const HeuristicResolver *Resolver) { … }
llvm::SmallVector<const NamedDecl *, 1>
explicitReferenceTargets(DynTypedNode N, DeclRelationSet Mask,
const HeuristicResolver *Resolver) { … }
namespace {
llvm::SmallVector<ReferenceLoc> refInDecl(const Decl *D,
const HeuristicResolver *Resolver) { … }
llvm::SmallVector<ReferenceLoc> refInStmt(const Stmt *S,
const HeuristicResolver *Resolver) { … }
llvm::SmallVector<ReferenceLoc>
refInTypeLoc(TypeLoc L, const HeuristicResolver *Resolver) { … }
class ExplicitReferenceCollector
: public RecursiveASTVisitor<ExplicitReferenceCollector> { … };
}
void findExplicitReferences(const Stmt *S,
llvm::function_ref<void(ReferenceLoc)> Out,
const HeuristicResolver *Resolver) { … }
void findExplicitReferences(const Decl *D,
llvm::function_ref<void(ReferenceLoc)> Out,
const HeuristicResolver *Resolver) { … }
void findExplicitReferences(const ASTContext &AST,
llvm::function_ref<void(ReferenceLoc)> Out,
const HeuristicResolver *Resolver) { … }
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, DeclRelation R) { … }
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, DeclRelationSet RS) { … }
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ReferenceLoc R) { … }
}
}