#include "AST.h"
#include "SourceCode.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Index/USRGeneration.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
#include <iterator>
#include <optional>
#include <string>
#include <vector>
namespace clang {
namespace clangd {
namespace {
std::optional<llvm::ArrayRef<TemplateArgumentLoc>>
getTemplateSpecializationArgLocs(const NamedDecl &ND) { … }
template <class T>
bool isTemplateSpecializationKind(const NamedDecl *D,
TemplateSpecializationKind Kind) { … }
bool isTemplateSpecializationKind(const NamedDecl *D,
TemplateSpecializationKind Kind) { … }
llvm::DenseSet<const NamespaceDecl *>
getUsingNamespaceDirectives(const DeclContext *DestContext,
SourceLocation Until) { … }
std::string
getQualification(ASTContext &Context, const DeclContext *DestContext,
const DeclContext *SourceContext,
llvm::function_ref<bool(NestedNameSpecifier *)> IsVisible) { … }
}
bool isImplicitTemplateInstantiation(const NamedDecl *D) { … }
bool isExplicitTemplateSpecialization(const NamedDecl *D) { … }
bool isImplementationDetail(const Decl *D) { … }
SourceLocation nameLocation(const clang::Decl &D, const SourceManager &SM) { … }
std::string printQualifiedName(const NamedDecl &ND) { … }
static bool isAnonymous(const DeclarationName &N) { … }
NestedNameSpecifierLoc getQualifierLoc(const NamedDecl &ND) { … }
std::string printUsingNamespaceName(const ASTContext &Ctx,
const UsingDirectiveDecl &D) { … }
std::string printName(const ASTContext &Ctx, const NamedDecl &ND) { … }
std::string printTemplateSpecializationArgs(const NamedDecl &ND) { … }
std::string printNamespaceScope(const DeclContext &DC) { … }
static llvm::StringRef
getNameOrErrForObjCInterface(const ObjCInterfaceDecl *ID) { … }
std::string printObjCMethod(const ObjCMethodDecl &Method) { … }
std::string printObjCContainer(const ObjCContainerDecl &C) { … }
SymbolID getSymbolID(const Decl *D) { … }
SymbolID getSymbolID(const llvm::StringRef MacroName, const MacroInfo *MI,
const SourceManager &SM) { … }
const ObjCImplDecl *getCorrespondingObjCImpl(const ObjCContainerDecl *D) { … }
Symbol::IncludeDirective
preferredIncludeDirective(llvm::StringRef FileName, const LangOptions &LangOpts,
ArrayRef<Inclusion> MainFileIncludes,
ArrayRef<const Decl *> TopLevelDecls) { … }
std::string printType(const QualType QT, const DeclContext &CurContext,
const llvm::StringRef Placeholder) { … }
bool hasReservedName(const Decl &D) { … }
bool hasReservedScope(const DeclContext &DC) { … }
QualType declaredType(const TypeDecl *D) { … }
namespace {
class DeducedTypeVisitor : public RecursiveASTVisitor<DeducedTypeVisitor> { … };
}
std::optional<QualType> getDeducedType(ASTContext &ASTCtx, SourceLocation Loc) { … }
TemplateTypeParmTypeLoc getContainedAutoParamType(TypeLoc TL) { … }
template <typename TemplateDeclTy>
static NamedDecl *getOnlyInstantiationImpl(TemplateDeclTy *TD) { … }
NamedDecl *getOnlyInstantiation(NamedDecl *TemplatedDecl) { … }
std::vector<const Attr *> getAttributes(const DynTypedNode &N) { … }
std::string getQualification(ASTContext &Context,
const DeclContext *DestContext,
SourceLocation InsertionPoint,
const NamedDecl *ND) { … }
std::string getQualification(ASTContext &Context,
const DeclContext *DestContext,
const NamedDecl *ND,
llvm::ArrayRef<std::string> VisibleNamespaces) { … }
bool hasUnstableLinkage(const Decl *D) { … }
bool isDeeplyNested(const Decl *D, unsigned MaxDepth) { … }
namespace {
bool isTemplateTypeParameterPack(NamedDecl *D) { … }
const TemplateTypeParmType *getFunctionPackType(const FunctionDecl *Callee) { … }
const TemplateTypeParmType *getUnderlyingPackType(const ParmVarDecl *Param) { … }
class ForwardingCallVisitor
: public RecursiveASTVisitor<ForwardingCallVisitor> { … };
}
SmallVector<const ParmVarDecl *>
resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) { … }
bool isExpandedFromParameterPack(const ParmVarDecl *D) { … }
}
}