clang-tools 20.0.0git
|
#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>
Go to the source code of this file.
Namespaces | |
namespace | clang |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
namespace | clang::clangd |
FIXME: Skip testing on windows temporarily due to the different escaping code mode. | |
Functions | |
bool | clang::clangd::isImplicitTemplateInstantiation (const NamedDecl *D) |
Indicates if D is a template instantiation implicitly generated by the compiler, e.g. | |
bool | clang::clangd::isExplicitTemplateSpecialization (const NamedDecl *D) |
Indicates if D is an explicit template specialization, e.g. | |
bool | clang::clangd::isImplementationDetail (const Decl *D) |
Returns true if the declaration is considered implementation detail based on heuristics. | |
SourceLocation | clang::clangd::nameLocation (const clang::Decl &D, const SourceManager &SM) |
Find the source location of the identifier for D . | |
std::string | clang::clangd::printQualifiedName (const NamedDecl &ND) |
Returns the qualified name of ND. | |
static bool | clang::clangd::isAnonymous (const DeclarationName &N) |
NestedNameSpecifierLoc | clang::clangd::getQualifierLoc (const NamedDecl &ND) |
Returns a nested name specifier loc of ND if it was present in the source, e.g. | |
std::string | clang::clangd::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 | clang::clangd::printName (const ASTContext &Ctx, const NamedDecl &ND) |
Prints unqualified name of the decl for the purpose of displaying it to the user. | |
std::string | clang::clangd::printTemplateSpecializationArgs (const NamedDecl &ND) |
Prints template arguments of a decl as written in the source code, including enclosing '<' and '>', e.g for a partial specialization like: template <typename U> struct Foo<int, U> will return '<int, U>'. | |
std::string | clang::clangd::printNamespaceScope (const DeclContext &DC) |
Returns the first enclosing namespace scope starting from DC . | |
static llvm::StringRef | clang::clangd::getNameOrErrForObjCInterface (const ObjCInterfaceDecl *ID) |
std::string | clang::clangd::printObjCMethod (const ObjCMethodDecl &Method) |
Print the Objective-C method name, including the full container name, e.g. | |
std::string | clang::clangd::printObjCContainer (const ObjCContainerDecl &C) |
Print the Objective-C container name including categories, e.g. MyClass ,. | |
SymbolID | clang::clangd::getSymbolID (const Decl *D) |
Gets the symbol ID for a declaration. Returned SymbolID might be null. | |
SymbolID | clang::clangd::getSymbolID (const llvm::StringRef MacroName, const MacroInfo *MI, const SourceManager &SM) |
Gets the symbol ID for a macro. | |
const ObjCImplDecl * | clang::clangd::getCorrespondingObjCImpl (const ObjCContainerDecl *D) |
Return the corresponding implementation/definition for the given ObjC container if it has one, otherwise, return nullptr. | |
Symbol::IncludeDirective | clang::clangd::preferredIncludeDirective (llvm::StringRef FileName, const LangOptions &LangOpts, ArrayRef< Inclusion > MainFileIncludes, ArrayRef< const Decl * > TopLevelDecls) |
Infer the include directive to use for the given FileName . | |
std::string | clang::clangd::printType (const QualType QT, const DeclContext &CurContext, llvm::StringRef Placeholder="") |
Returns a QualType as string. | |
bool | clang::clangd::hasReservedName (const Decl &) |
Returns true if this is a NamedDecl with a reserved name. | |
bool | clang::clangd::hasReservedScope (const DeclContext &) |
Returns true if this scope would be written with a reserved name. | |
QualType | clang::clangd::declaredType (const TypeDecl *D) |
std::optional< QualType > | clang::clangd::getDeducedType (ASTContext &, SourceLocation Loc) |
Retrieves the deduced type at a given location (auto, decltype). | |
TemplateTypeParmTypeLoc | clang::clangd::getContainedAutoParamType (TypeLoc TL) |
template<typename TemplateDeclTy > | |
static NamedDecl * | clang::clangd::getOnlyInstantiationImpl (TemplateDeclTy *TD) |
NamedDecl * | clang::clangd::getOnlyInstantiation (NamedDecl *TemplatedDecl) |
std::vector< const Attr * > | clang::clangd::getAttributes (const DynTypedNode &) |
Return attributes attached directly to a node. | |
std::string | clang::clangd::getQualification (ASTContext &Context, const DeclContext *DestContext, SourceLocation InsertionPoint, const NamedDecl *ND) |
Gets the nested name specifier necessary for spelling ND in DestContext , at InsertionPoint . | |
std::string | clang::clangd::getQualification (ASTContext &Context, const DeclContext *DestContext, const NamedDecl *ND, llvm::ArrayRef< std::string > VisibleNamespaces) |
This function uses the VisibleNamespaces to figure out if a shorter qualification is sufficient for ND , and ignores any using namespace directives. | |
bool | clang::clangd::hasUnstableLinkage (const Decl *D) |
Whether we must avoid computing linkage for D during code completion. | |
bool | clang::clangd::isDeeplyNested (const Decl *D, unsigned MaxDepth=10) |
Checks whether D is more than MaxDepth away from translation unit scope. | |
SmallVector< const ParmVarDecl * > | clang::clangd::resolveForwardingParameters (const FunctionDecl *D, unsigned MaxDepth=10) |
Recursively resolves the parameters of a FunctionDecl that forwards its parameters to another function via variadic template parameters. | |
bool | clang::clangd::isExpandedFromParameterPack (const ParmVarDecl *D) |
Checks whether D is instantiated from a function parameter pack whose type is a bare type parameter pack (e.g. | |
QualType DeducedType |
Definition at line 583 of file AST.cpp.
Referenced by clang::tidy::readability::areTypesEqual().
ArrayRef<const ParmVarDecl *> Head |
Definition at line 809 of file AST.cpp.
Referenced by clang::clangd::collectWords(), and clang::clangd::resolveForwardingParameters().
std::optional<ForwardingInfo> Info |
Definition at line 824 of file AST.cpp.
Referenced by clang::clangd::resolveForwardingParameters().
ArrayRef<const ParmVarDecl *> Pack |
Definition at line 813 of file AST.cpp.
Referenced by clang::clangd::resolveForwardingParameters().
ArrayRef<const ParmVarDecl *> Parameters |
Definition at line 801 of file AST.cpp.
Referenced by clang::clangd::fromJSON(), and clang::clangd::resolveForwardingParameters().
ArrayRef<const ParmVarDecl *> Tail |
Definition at line 817 of file AST.cpp.
Referenced by clang::clangd::collectWords(), and clang::clangd::resolveForwardingParameters().