clang
19.0.0git
|
#include "clang/Sema/SemaCodeCompletion.h"
Classes | |
struct | CodeCompleteExpressionData |
Public Attributes | |
CodeCompleteConsumer * | CodeCompleter |
Code-completion consumer. More... | |
Public Attributes inherited from clang::SemaBase | |
Sema & | SemaRef |
Definition at line 37 of file SemaCodeCompletion.h.
Definition at line 42 of file SemaCodeCompletion.h.
Definition at line 41 of file SemaCodeCompletion.h.
|
strong |
Enumerator | |
---|---|
Attribute | |
Scope | |
None |
Definition at line 117 of file SemaCodeCompletion.h.
Describes the context in which code completion occurs.
Definition at line 48 of file SemaCodeCompletion.h.
SemaCodeCompletion::SemaCodeCompletion | ( | Sema & | S, |
CodeCompleteConsumer * | CompletionConsumer | ||
) |
Definition at line 10350 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteAfterFunctionEquals | ( | Declarator & | D | ) |
Definition at line 7149 of file SemaCodeComplete.cpp.
References clang::CPlusPlus11.
Definition at line 6627 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteAttribute | ( | AttributeCommonInfo::Syntax | Syntax, |
AttributeCompletion | Completion = AttributeCompletion::Attribute , |
||
const IdentifierInfo * | Scope = nullptr |
||
) |
Definition at line 4601 of file SemaCodeComplete.cpp.
References clang::XRayInstrKind::None.
void SemaCodeCompletion::CodeCompleteAvailabilityPlatformName | ( | ) |
Definition at line 10311 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteBracketDeclarator | ( | Scope * | S | ) |
Definition at line 6008 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteCase | ( | Scope * | S | ) |
Definition at line 6012 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteConstructorInitializer | ( | Decl * | Constructor, |
ArrayRef< CXXCtorInitializer * > | Initializers | ||
) |
Definition at line 6942 of file SemaCodeComplete.cpp.
References clang::Sema::AdjustDeclIfTemplate().
void SemaCodeCompletion::CodeCompleteDeclSpec | ( | Scope * | S, |
DeclSpec & | DS, | ||
bool | AllowNonIdentifiers, | ||
bool | AllowNestedNameSpecifiers | ||
) |
Definition at line 4514 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteDesignator | ( | const QualType | BaseType, |
llvm::ArrayRef< Expr * > | InitExprs, | ||
const Designation & | D | ||
) |
Trigger code completion for a record of BaseType
.
InitExprs
are expressions in the initializer list seen so far and D
is the current Designation being parsed.
Definition at line 6577 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_DotMemberAccess, getAsRecordDecl(), getDesignatedType(), and clang::QualType::isNull().
void SemaCodeCompletion::CodeCompleteExpression | ( | Scope * | S, |
const CodeCompleteExpressionData & | Data | ||
) |
Perform code-completion in an expression context when we know what type we're looking for.
Definition at line 4852 of file SemaCodeComplete.cpp.
Referenced by clang::Parser::ParseAssignmentExpression(), and clang::Parser::ParseConditionalExpression().
void SemaCodeCompletion::CodeCompleteExpression | ( | Scope * | S, |
QualType | PreferredType, | ||
bool | IsParenthesized = false |
||
) |
Definition at line 4925 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteFunctionQualifiers | ( | DeclSpec & | DS, |
Declarator & | D, | ||
const VirtSpecifiers * | VS = nullptr |
||
) |
Definition at line 5985 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteIncludedFile | ( | llvm::StringRef | Dir, |
bool | IsAngled | ||
) |
Definition at line 10162 of file SemaCodeComplete.cpp.
Definition at line 6612 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteInPreprocessorConditionalExclusion | ( | Scope * | S | ) |
Definition at line 10090 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteLambdaIntroducer | ( | Scope * | S, |
LambdaIntroducer & | Intro, | ||
bool | AfterAmpersand | ||
) |
Definition at line 7105 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteMemberReferenceExpr | ( | Scope * | S, |
Expr * | Base, | ||
Expr * | OtherOpBase, | ||
SourceLocation | OpLoc, | ||
bool | IsArrow, | ||
bool | IsBaseExprStatement, | ||
QualType | PreferredType | ||
) |
Definition at line 5723 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteModuleImport | ( | SourceLocation | ImportLoc, |
ModuleIdPath | Path | ||
) |
Definition at line 4372 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteNamespaceAliasDecl | ( | Scope * | S | ) |
Definition at line 6890 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteNamespaceDecl | ( | Scope * | S | ) |
Definition at line 6841 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteNaturalLanguage | ( | ) |
Definition at line 10305 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_NaturalLanguage, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCAtDirective | ( | Scope * | S | ) |
Definition at line 7294 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCAtExpression | ( | Scope * | S | ) |
Definition at line 7457 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCAtStatement | ( | Scope * | S | ) |
Definition at line 7444 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCAtVisibility | ( | Scope * | S | ) |
Definition at line 7432 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCClassForwardDecl | ( | Scope * | S | ) |
Definition at line 8646 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCClassMessage | ( | Scope * | S, |
ParsedType | Receiver, | ||
ArrayRef< const IdentifierInfo * > | SelIdents, | ||
bool | AtArgumentExpression, | ||
bool | IsSuper = false |
||
) |
Definition at line 8270 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCClassPropertyRefExpr | ( | Scope * | S, |
const IdentifierInfo & | ClassName, | ||
SourceLocation | ClassNameLoc, | ||
bool | IsBaseExprStatement | ||
) |
Definition at line 5882 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCForCollection | ( | Scope * | S, |
DeclGroupPtrTy | IterationVar | ||
) |
Definition at line 8466 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCImplementationCategory | ( | Scope * | S, |
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassNameLoc | ||
) |
Definition at line 8745 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCImplementationDecl | ( | Scope * | S | ) |
Definition at line 8691 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCInstanceMessage | ( | Scope * | S, |
Expr * | Receiver, | ||
ArrayRef< const IdentifierInfo * > | SelIdents, | ||
bool | AtArgumentExpression, | ||
ObjCInterfaceDecl * | Super = nullptr |
||
) |
Definition at line 8305 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCInterfaceCategory | ( | Scope * | S, |
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassNameLoc | ||
) |
Definition at line 8710 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCInterfaceDecl | ( | Scope * | S | ) |
Definition at line 8627 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCMessageReceiver | ( | Scope * | S | ) |
Definition at line 8058 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCMethodDecl | ( | Scope * | S, |
std::optional< bool > | IsInstanceMethod, | ||
ParsedType | ReturnType | ||
) |
Definition at line 9653 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCMethodDeclSelector | ( | Scope * | S, |
bool | IsInstanceMethod, | ||
bool | AtParameterName, | ||
ParsedType | ReturnType, | ||
ArrayRef< const IdentifierInfo * > | SelIdents | ||
) |
Definition at line 9831 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCPassingType | ( | Scope * | S, |
ObjCDeclSpec & | DS, | ||
bool | IsParameter | ||
) |
Definition at line 7792 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCPropertyDefinition | ( | Scope * | S | ) |
Definition at line 8786 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCPropertyFlags | ( | Scope * | S, |
ObjCDeclSpec & | ODS | ||
) |
Definition at line 7502 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCPropertyGetter | ( | Scope * | S | ) |
Definition at line 7733 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCPropertySetter | ( | Scope * | S | ) |
Definition at line 7762 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCPropertySynthesizeIvar | ( | Scope * | S, |
IdentifierInfo * | PropertyName | ||
) |
Definition at line 8824 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCProtocolDecl | ( | Scope * | S | ) |
Definition at line 8588 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCProtocolReferences | ( | ArrayRef< IdentifierLocPair > | Protocols | ) |
Definition at line 8559 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCSelector | ( | Scope * | S, |
ArrayRef< const IdentifierInfo * > | SelIdents | ||
) |
Definition at line 8482 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCSuperclass | ( | Scope * | S, |
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassNameLoc | ||
) |
Definition at line 8665 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteObjCSuperMessage | ( | Scope * | S, |
SourceLocation | SuperLoc, | ||
ArrayRef< const IdentifierInfo * > | SelIdents, | ||
bool | AtArgumentExpression | ||
) |
Definition at line 8097 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteOperatorName | ( | Scope * | S | ) |
Definition at line 6908 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteOrdinaryName | ( | Scope * | S, |
SemaCodeCompletion::ParserCompletionContext | CompletionContext | ||
) |
Definition at line 4418 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompletePostfixExpression | ( | Scope * | S, |
ExprResult | LHS, | ||
QualType | PreferredType | ||
) |
Definition at line 4932 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompletePreprocessorDirective | ( | bool | InConditional | ) |
Definition at line 9919 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompletePreprocessorExpression | ( | ) |
Definition at line 10125 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompletePreprocessorMacroArgument | ( | Scope * | S, |
IdentifierInfo * | Macro, | ||
MacroInfo * | MacroInfo, | ||
unsigned | Argument | ||
) |
Definition at line 10150 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompletePreprocessorMacroName | ( | bool | IsDefinition | ) |
Definition at line 10097 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteQualifiedId | ( | Scope * | S, |
CXXScopeSpec & | SS, | ||
bool | EnteringContext, | ||
bool | IsUsingDeclaration, | ||
QualType | BaseType, | ||
QualType | PreferredType | ||
) |
Definition at line 6692 of file SemaCodeComplete.cpp.
Definition at line 5907 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteTypeQualifiers | ( | DeclSpec & | DS | ) |
Definition at line 5973 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteUsing | ( | Scope * | S | ) |
Definition at line 6789 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteUsingDirective | ( | Scope * | S | ) |
Definition at line 6820 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::GatherGlobalCodeCompletions | ( | CodeCompletionAllocator & | Allocator, |
CodeCompletionTUInfo & | CCTUInfo, | ||
SmallVectorImpl< CodeCompletionResult > & | Results | ||
) |
Definition at line 10328 of file SemaCodeComplete.cpp.
QualType SemaCodeCompletion::ProduceCallSignatureHelp | ( | Expr * | Fn, |
ArrayRef< Expr * > | Args, | ||
SourceLocation | OpenParLoc | ||
) |
Determines the preferred type of the current function argument, by examining the signatures of all possible overloads.
Returns null if unknown or ambiguous, or if code completion is off.
If the code completion point has been reached, also reports the function signatures that were considered.
FIXME: rename to GuessCallArgumentType to reduce confusion.
Definition at line 6221 of file SemaCodeComplete.cpp.
References anyNullArguments(), and clang::Expr::isTypeDependent().
QualType SemaCodeCompletion::ProduceConstructorSignatureHelp | ( | QualType | Type, |
SourceLocation | Loc, | ||
ArrayRef< Expr * > | Args, | ||
SourceLocation | OpenParLoc, | ||
bool | Braced | ||
) |
Definition at line 6401 of file SemaCodeComplete.cpp.
QualType SemaCodeCompletion::ProduceCtorInitMemberSignatureHelp | ( | Decl * | ConstructorDecl, |
CXXScopeSpec | SS, | ||
ParsedType | TemplateTypeTy, | ||
ArrayRef< Expr * > | ArgExprs, | ||
IdentifierInfo * | II, | ||
SourceLocation | OpenParLoc, | ||
bool | Braced | ||
) |
Definition at line 6478 of file SemaCodeComplete.cpp.
References clang::Sema::tryLookupCtorInitMemberDecl().
QualType SemaCodeCompletion::ProduceTemplateArgumentSignatureHelp | ( | TemplateTy | ParsedTemplate, |
ArrayRef< ParsedTemplateArgument > | Args, | ||
SourceLocation | LAngleLoc | ||
) |
Definition at line 6520 of file SemaCodeComplete.cpp.
CodeCompleteConsumer* clang::SemaCodeCompletion::CodeCompleter |
Code-completion consumer.
Definition at line 45 of file SemaCodeCompletion.h.
Referenced by ProduceSignatureHelp().