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/Basic/SourceLocation.h" 19 #include "clang/Lex/MacroInfo.h" 48 std::string
printName(
const ASTContext &
Ctx,
const NamedDecl &ND);
66 llvm::Optional<SymbolID>
getSymbolID(
const IdentifierInfo &II,
68 const SourceManager &SM);
71 std::string
printType(
const QualType QT,
const DeclContext & Context);
83 const llvm::StringRef CurrentNamespace);
89 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_ std::string printName(const ASTContext &Ctx, const NamedDecl &ND)
Prints unqualified name of the decl for the purpose of displaying it to the user. ...
std::string printType(const QualType QT, const DeclContext &Context)
Returns a QualType as string.
std::string printQualifiedName(const NamedDecl &ND)
Returns the qualified name of ND.
llvm::Optional< SymbolID > getSymbolID(const Decl *D)
Gets the symbol ID for a declaration, if possible.
std::string printNamespaceScope(const DeclContext &DC)
Returns the first enclosing namespace scope starting from DC.
SourceLocation findNameLoc(const clang::Decl *D)
Find the identifier source location of the given D.
std::string printTemplateSpecializationArgs(const NamedDecl &ND)
Prints template arguments of a decl as written in the source code, including enclosing '<' and '>'...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
bool isImplementationDetail(const Decl *D)
Returns true if the declaration is considered implementation detail based on heuristics.
std::string shortenNamespace(const llvm::StringRef OriginalName, const llvm::StringRef CurrentNamespace)
Try to shorten the OriginalName by removing namespaces from the left of the string that are redundant...