clang 20.0.0git
|
#include "clang/Sema/CodeCompleteConsumer.h"
Public Types | |
enum | CandidateKind { CK_Function , CK_FunctionTemplate , CK_FunctionType , CK_FunctionProtoTypeLoc , CK_Template , CK_Aggregate } |
Describes the type of overload candidate. More... | |
Public Member Functions | |
OverloadCandidate (FunctionDecl *Function) | |
OverloadCandidate (FunctionTemplateDecl *FunctionTemplateDecl) | |
OverloadCandidate (const FunctionType *Type) | |
OverloadCandidate (FunctionProtoTypeLoc Prototype) | |
OverloadCandidate (const RecordDecl *Aggregate) | |
OverloadCandidate (const TemplateDecl *Template) | |
CandidateKind | getKind () const |
Determine the kind of overload candidate. | |
FunctionDecl * | getFunction () const |
Retrieve the function overload candidate or the templated function declaration for a function template. | |
FunctionTemplateDecl * | getFunctionTemplate () const |
Retrieve the function template overload candidate. | |
const FunctionType * | getFunctionType () const |
Retrieve the function type of the entity, regardless of how the function is stored. | |
const FunctionProtoTypeLoc | getFunctionProtoTypeLoc () const |
Retrieve the function ProtoTypeLoc candidate. | |
const TemplateDecl * | getTemplate () const |
const RecordDecl * | getAggregate () const |
Retrieve the aggregate type being initialized. | |
unsigned | getNumParams () const |
Get the number of parameters in this signature. | |
QualType | getParamType (unsigned N) const |
Get the type of the Nth parameter. | |
const NamedDecl * | getParamDecl (unsigned N) const |
Get the declaration of the Nth parameter. | |
CodeCompletionString * | CreateSignatureString (unsigned CurrentArg, Sema &S, CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, bool IncludeBriefComments, bool Braced) const |
Create a new code-completion string that describes the function signature of this overload candidate. | |
Definition at line 1023 of file CodeCompleteConsumer.h.
Describes the type of overload candidate.
Definition at line 1026 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 1079 of file CodeCompleteConsumer.h.
References Function.
|
inline |
Definition at line 1084 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 1089 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 1094 of file CodeCompleteConsumer.h.
References clang::Prototype.
|
inline |
Definition at line 1099 of file CodeCompleteConsumer.h.
References clang::Aggregate.
|
inline |
Definition at line 1104 of file CodeCompleteConsumer.h.
CodeCompletionString * CodeCompleteConsumer::OverloadCandidate::CreateSignatureString | ( | unsigned | CurrentArg, |
Sema & | S, | ||
CodeCompletionAllocator & | Allocator, | ||
CodeCompletionTUInfo & | CCTUInfo, | ||
bool | IncludeBriefComments, | ||
bool | Braced | ||
) | const |
Create a new code-completion string that describes the function signature of this overload candidate.
Definition at line 4117 of file SemaCodeComplete.cpp.
References AddOverloadAggregateChunks(), AddOverloadParameterChunks(), AddResultTypeChunk(), CK_Aggregate, clang::CodeCompletionString::CK_LeftBrace, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightBrace, clang::CodeCompletionString::CK_RightParen, CK_Template, clang::Sema::Context, createTemplateSignatureString(), CXAvailability_Available, getAggregate(), clang::getAsString(), clang::Sema::getASTContext(), getCompletionPrintingPolicy(), clang::NamedDecl::getDeclName(), getFunction(), getFunctionProtoTypeLoc(), getFunctionType(), getKind(), getName(), clang::getParameterComment(), getTemplate(), clang::DeclarationName::print(), clang::Result, and clang::PrintingPolicy::SuppressTemplateArgsInCXXConstructors.
|
inline |
Retrieve the aggregate type being initialized.
Definition at line 1135 of file CodeCompleteConsumer.h.
References AggregateType, CK_Aggregate, and getKind().
Referenced by CreateSignatureString().
FunctionDecl * CodeCompleteConsumer::OverloadCandidate::getFunction | ( | ) | const |
Retrieve the function overload candidate or the templated function declaration for a function template.
Definition at line 498 of file CodeCompleteConsumer.cpp.
References clang::Function, and getKind().
Referenced by CreateSignatureString().
const FunctionProtoTypeLoc CodeCompleteConsumer::OverloadCandidate::getFunctionProtoTypeLoc | ( | ) | const |
Retrieve the function ProtoTypeLoc candidate.
This can be called for any Kind, but returns null for kinds other than CK_FunctionProtoTypeLoc.
Definition at line 531 of file CodeCompleteConsumer.cpp.
Referenced by CreateSignatureString().
|
inline |
Retrieve the function template overload candidate.
Definition at line 1115 of file CodeCompleteConsumer.h.
References CK_FunctionTemplate, FunctionTemplate, and getKind().
const FunctionType * CodeCompleteConsumer::OverloadCandidate::getFunctionType | ( | ) | const |
Retrieve the function type of the entity, regardless of how the function is stored.
Definition at line 508 of file CodeCompleteConsumer.cpp.
References clang::Function, and clang::Type::getAs().
Referenced by CreateSignatureString().
|
inline |
Determine the kind of overload candidate.
Definition at line 1108 of file CodeCompleteConsumer.h.
Referenced by CreateSignatureString(), getAggregate(), getFunctionTemplate(), and getTemplate().
unsigned CodeCompleteConsumer::OverloadCandidate::getNumParams | ( | ) | const |
Get the number of parameters in this signature.
Definition at line 537 of file CodeCompleteConsumer.cpp.
Referenced by clang::SemaCodeCompletion::ProduceConstructorSignatureHelp().
Get the declaration of the Nth parameter.
Returns null if the decl is unknown or N is out of range.
Definition at line 586 of file CodeCompleteConsumer.cpp.
References clang::TemplateParameterList::getParam(), and clang::CodeCompletionString::size().
Get the type of the Nth parameter.
Returns null if the type is unknown or N is out of range.
Definition at line 557 of file CodeCompleteConsumer.cpp.
References D, clang::TemplateParameterList::getParam(), and clang::CodeCompletionString::size().
|
inline |
Definition at line 1129 of file CodeCompleteConsumer.h.
References CK_Template, getKind(), and Template.
Referenced by CreateSignatureString().
const RecordDecl* clang::CodeCompleteConsumer::OverloadCandidate::AggregateType |
The class being aggregate-initialized, when Kind == CK_Aggregate.
Definition at line 1075 of file CodeCompleteConsumer.h.
Referenced by getAggregate().
FunctionDecl* clang::CodeCompleteConsumer::OverloadCandidate::Function |
The function overload candidate, available when Kind == CK_Function.
Definition at line 1055 of file CodeCompleteConsumer.h.
Referenced by OverloadCandidate().
FunctionTemplateDecl* clang::CodeCompleteConsumer::OverloadCandidate::FunctionTemplate |
The function template overload candidate, available when Kind == CK_FunctionTemplate.
Definition at line 1059 of file CodeCompleteConsumer.h.
Referenced by getFunctionTemplate().
FunctionProtoTypeLoc clang::CodeCompleteConsumer::OverloadCandidate::ProtoTypeLoc |
The location of the function prototype that describes the entity being called, when Kind == CK_FunctionProtoTypeLoc.
Definition at line 1067 of file CodeCompleteConsumer.h.
const TemplateDecl* clang::CodeCompleteConsumer::OverloadCandidate::Template |
The template overload candidate, available when Kind == CK_Template.
Definition at line 1071 of file CodeCompleteConsumer.h.
Referenced by getTemplate().
const FunctionType* clang::CodeCompleteConsumer::OverloadCandidate::Type |
The function type that describes the entity being called, when Kind == CK_FunctionType.
Definition at line 1063 of file CodeCompleteConsumer.h.