13 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_ 14 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_ 17 #include "clang/AST/Decl.h" 18 #include "clang/AST/NestedNameSpecifier.h" 19 #include "clang/Basic/SourceLocation.h" 20 #include "clang/Lex/MacroInfo.h" 21 #include "llvm/ADT/DenseSet.h" 22 #include "llvm/ADT/StringRef.h" 54 const UsingDirectiveDecl &D);
59 std::string
printName(
const ASTContext &
Ctx,
const NamedDecl &ND);
77 llvm::Optional<SymbolID>
getSymbolID(
const llvm::StringRef MacroName,
79 const SourceManager &SM);
83 std::string
printType(
const QualType QT,
const DeclContext &CurContext);
131 const DeclContext *DestContext,
133 const NamedDecl *ND);
147 const DeclContext *DestContext,
149 llvm::ArrayRef<std::string> VisibleNamespaces);
154 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_ SourceLocation Loc
'#' location in the include directive
std::string printName(const ASTContext &Ctx, const NamedDecl &ND)
Prints unqualified name of the decl for the purpose of displaying it to the user. ...
const FunctionDecl * Decl
std::string printQualifiedName(const NamedDecl &ND)
Returns the qualified name of ND.
SourceLocation nameLocation(const clang::Decl &D, const SourceManager &SM)
Find the source location of the identifier for D.
llvm::Optional< QualType > getDeducedType(ASTContext &ASTCtx, SourceLocation Loc)
Retrieves the deduced type at a given location (auto, decltype).
llvm::Optional< SymbolID > getSymbolID(const Decl *D)
Gets the symbol ID for a declaration, if possible.
std::string printUsingNamespaceName(const ASTContext &Ctx, const UsingDirectiveDecl &D)
Returns the name of the namespace inside the 'using namespace' directive, as written in the code...
std::string printNamespaceScope(const DeclContext &DC)
Returns the first enclosing namespace scope starting from DC.
NestedNameSpecifierLoc getQualifierLoc(const NamedDecl &ND)
Returns a nested name specifier loc of ND if it was present in the source, e.g.
std::string printTemplateSpecializationArgs(const NamedDecl &ND)
Prints template arguments of a decl as written in the source code, including enclosing '<' and '>'...
std::string printType(const QualType QT, const DeclContext &CurContext)
Returns a QualType as string.
std::string getQualification(ASTContext &Context, const DeclContext *DestContext, SourceLocation InsertionPoint, const NamedDecl *ND)
Gets the nested name specifier necessary for spelling ND in DestContext, at InsertionPoint.
QualType declaredType(const TypeDecl *D)
bool isImplicitTemplateInstantiation(const NamedDecl *D)
Indicates if D is a template instantiation implicitly generated by the compiler, e.g.
bool isExplicitTemplateSpecialization(const NamedDecl *D)
Indicates if D is an explicit template specialization, e.g.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
bool isImplementationDetail(const Decl *D)
Returns true if the declaration is considered implementation detail based on heuristics.