clang  13.0.0git
Public Types | Public Member Functions | List of all members
clang::CodeCompleteConsumer::OverloadCandidate Class Reference

#include "clang/Sema/CodeCompleteConsumer.h"

Collaboration diagram for clang::CodeCompleteConsumer::OverloadCandidate:
Collaboration graph
[legend]

Public Types

enum  CandidateKind { CK_Function, CK_FunctionTemplate, CK_FunctionType }
 Describes the type of overload candidate. More...
 

Public Member Functions

 OverloadCandidate (FunctionDecl *Function)
 
 OverloadCandidate (FunctionTemplateDecl *FunctionTemplateDecl)
 
 OverloadCandidate (const FunctionType *Type)
 
CandidateKind getKind () const
 Determine the kind of overload candidate. More...
 
FunctionDeclgetFunction () const
 Retrieve the function overload candidate or the templated function declaration for a function template. More...
 
FunctionTemplateDeclgetFunctionTemplate () const
 Retrieve the function template overload candidate. More...
 
const FunctionTypegetFunctionType () const
 Retrieve the function type of the entity, regardless of how the function is stored. More...
 
CodeCompletionStringCreateSignatureString (unsigned CurrentArg, Sema &S, CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, bool IncludeBriefComments) const
 Create a new code-completion string that describes the function signature of this overload candidate. More...
 

Detailed Description

Definition at line 1002 of file CodeCompleteConsumer.h.

Member Enumeration Documentation

◆ CandidateKind

Describes the type of overload candidate.

Enumerator
CK_Function 

The candidate is a function declaration.

CK_FunctionTemplate 

The candidate is a function template.

CK_FunctionType 

The "candidate" is actually a variable, expression, or block for which we only have a function prototype.

Definition at line 1005 of file CodeCompleteConsumer.h.

Constructor & Destructor Documentation

◆ OverloadCandidate() [1/3]

clang::CodeCompleteConsumer::OverloadCandidate::OverloadCandidate ( FunctionDecl Function)
inline

Definition at line 1036 of file CodeCompleteConsumer.h.

◆ OverloadCandidate() [2/3]

clang::CodeCompleteConsumer::OverloadCandidate::OverloadCandidate ( FunctionTemplateDecl FunctionTemplateDecl)
inline

Definition at line 1039 of file CodeCompleteConsumer.h.

◆ OverloadCandidate() [3/3]

clang::CodeCompleteConsumer::OverloadCandidate::OverloadCandidate ( const FunctionType Type)
inline

Definition at line 1042 of file CodeCompleteConsumer.h.

Member Function Documentation

◆ CreateSignatureString()

CodeCompletionString * CodeCompleteConsumer::OverloadCandidate::CreateSignatureString ( unsigned  CurrentArg,
Sema S,
CodeCompletionAllocator Allocator,
CodeCompletionTUInfo CCTUInfo,
bool  IncludeBriefComments 
) const

Create a new code-completion string that describes the function signature of this overload candidate.

Definition at line 3762 of file SemaCodeComplete.cpp.

◆ getFunction()

FunctionDecl * CodeCompleteConsumer::OverloadCandidate::getFunction ( ) const

Retrieve the function overload candidate or the templated function declaration for a function template.

Definition at line 485 of file CodeCompleteConsumer.cpp.

References getKind().

◆ getFunctionTemplate()

FunctionTemplateDecl* clang::CodeCompleteConsumer::OverloadCandidate::getFunctionTemplate ( ) const
inline

Retrieve the function template overload candidate.

Definition at line 1053 of file CodeCompleteConsumer.h.

References CK_FunctionTemplate, FunctionTemplate, and getKind().

◆ getFunctionType()

const FunctionType * CodeCompleteConsumer::OverloadCandidate::getFunctionType ( ) const

Retrieve the function type of the entity, regardless of how the function is stored.

Definition at line 495 of file CodeCompleteConsumer.cpp.

References clang::Type::getAs().

◆ getKind()

CandidateKind clang::CodeCompleteConsumer::OverloadCandidate::getKind ( ) const
inline

Determine the kind of overload candidate.

Definition at line 1046 of file CodeCompleteConsumer.h.

Referenced by getFunctionTemplate().

Member Data Documentation

◆ Function

FunctionDecl* clang::CodeCompleteConsumer::OverloadCandidate::Function

The function overload candidate, available when Kind == CK_Function.

Definition at line 1024 of file CodeCompleteConsumer.h.

◆ FunctionTemplate

FunctionTemplateDecl* clang::CodeCompleteConsumer::OverloadCandidate::FunctionTemplate

The function template overload candidate, available when Kind == CK_FunctionTemplate.

Definition at line 1028 of file CodeCompleteConsumer.h.

Referenced by getFunctionTemplate().

◆ Type

const FunctionType* clang::CodeCompleteConsumer::OverloadCandidate::Type

The function type that describes the entity being called, when Kind == CK_FunctionType.

Definition at line 1032 of file CodeCompleteConsumer.h.


The documentation for this class was generated from the following files: