clang 20.0.0git
|
#include "clang/Sema/SemaCodeCompletion.h"
Classes | |
struct | CodeCompleteExpressionData |
Public Types | |
enum | ParserCompletionContext { PCC_Namespace , PCC_Class , PCC_ObjCInterface , PCC_ObjCImplementation , PCC_ObjCInstanceVariableList , PCC_Template , PCC_MemberTemplate , PCC_Expression , PCC_Statement , PCC_ForInit , PCC_Condition , PCC_RecoveryInFunction , PCC_Type , PCC_ParenthesizedExpression , PCC_LocalDeclarationSpecifiers , PCC_TopLevelOrExpression } |
Describes the context in which code completion occurs. More... | |
enum class | AttributeCompletion { Attribute , Scope , None } |
using | TemplateTy = OpaquePtr< TemplateName > |
using | DeclGroupPtrTy = OpaquePtr< DeclGroupRef > |
Public Attributes | |
CodeCompleteConsumer * | CodeCompleter |
Code-completion consumer. | |
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 10348 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteAfterFunctionEquals | ( | Declarator & | D | ) |
Definition at line 7147 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Other, clang::CPlusPlus11, D, HandleCodeCompleteResults(), Id, clang::IK_ConstructorName, clang::IK_DestructorName, and clang::IK_OperatorFunctionId.
Definition at line 6625 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), AddPrettyFunctionResults(), clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftBrace, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightBrace, clang::CodeCompletionString::CK_RightParen, clang::CodeCompletionString::CK_SemiColon, clang::CodeCompletionString::CK_VerticalSpace, clang::CPlusPlus, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), mapCodeCompletionContext(), and clang::Sema::PP.
void SemaCodeCompletion::CodeCompleteAttribute | ( | AttributeCommonInfo::Syntax | Syntax, |
AttributeCompletion | Completion = AttributeCompletion::Attribute , |
||
const IdentifierInfo * | Scope = nullptr |
||
) |
Definition at line 4599 of file SemaCodeComplete.cpp.
References clang::AttributeCommonInfo::AS_C23, clang::AttributeCommonInfo::AS_CXX11, clang::AttributeCommonInfo::AS_GNU, clang::CodeCompletionContext::CCC_Attribute, clang::CodeCompletionString::CK_Comma, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, clang::First, clang::ParsedAttrInfo::getAllBuiltin(), clang::IdentifierInfo::getName(), HandleCodeCompleteResults(), noUnderscoreAttrScope(), Text, and underscoreAttrScope().
void SemaCodeCompletion::CodeCompleteAvailabilityPlatformName | ( | ) |
Definition at line 10309 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteBracketDeclarator | ( | Scope * | S | ) |
Definition at line 6006 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteCase | ( | Scope * | S | ) |
Definition at line 6010 of file SemaCodeComplete.cpp.
References AddEnumerators(), AddMacroResults(), clang::CodeCompletionContext::CCC_Expression, clang::Sema::CurContext, clang::Data, clang::Enum, clang::Sema::getCurFunction(), clang::CaseStmt::getLHS(), HandleCodeCompleteResults(), clang::Expr::IgnoreParenCasts(), clang::Sema::PP, clang::Switch, clang::sema::FunctionScopeInfo::SwitchStack, and clang::ast_matchers::type.
void SemaCodeCompletion::CodeCompleteConstructorInitializer | ( | Decl * | Constructor, |
ArrayRef< CXXCtorInitializer * > | Initializers | ||
) |
Definition at line 6940 of file SemaCodeComplete.cpp.
References AddFunctionParameterChunks(), clang::Sema::AdjustDeclIfTemplate(), clang::CXXRecordDecl::bases(), clang::CodeCompletionContext::CCC_Symbol, clang::CCP_MemberDeclaration, clang::CCP_NextInitializer, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, CXCursor_MemberRef, E, clang::RecordDecl::fields(), clang::Function, getCompletionPrintingPolicy(), getConstructors(), clang::getCursorKindForDecl(), HandleCodeCompleteResults(), clang::Sema::PP, Priority, and clang::CXXRecordDecl::vbases().
void SemaCodeCompletion::CodeCompleteDeclSpec | ( | Scope * | S, |
DeclSpec & | DS, | ||
bool | AllowNonIdentifiers, | ||
bool | AllowNestedNameSpecifiers | ||
) |
Definition at line 4512 of file SemaCodeComplete.cpp.
References AddClassMessageCompletions(), clang::Scope::AtCatchScope, clang::C99, clang::CodeCompletionContext::CCC_NewName, clang::CodeCompletionContext::CCC_SymbolOrNewName, clang::Scope::ClassScope, clang::CPlusPlus, clang::CPlusPlus11, clang::Sema::CurContext, clang::Scope::DeclScope, clang::Scope::FunctionPrototypeScope, clang::DeclSpec::getParsedSpecifiers(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getTypeSpecComplex(), clang::DeclSpec::getTypeSpecSign(), clang::DeclSpec::getTypeSpecType(), HandleCodeCompleteResults(), clang::Type::isObjCObjectOrInterfaceType(), clang::DeclSpec::isTypeAltiVecVector(), clang::Sema::LookupNestedNameSpecifierName, clang::Sema::LookupVisibleDecls(), clang::DeclSpec::PQ_TypeSpecifier, clang::Result, clang::T, clang::Scope::TemplateParamScope, clang::DeclSpec::TSC_unspecified, clang::DeclSpec::TST_class, clang::DeclSpec::TST_struct, clang::DeclSpec::TST_typename, and clang::Unspecified.
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 6575 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_DotMemberAccess, clang::Sema::CurContext, D, getAsRecordDecl(), getDesignatedType(), HandleCodeCompleteResults(), clang::QualType::isNull(), and clang::Result.
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 4850 of file SemaCodeComplete.cpp.
References AddEnumerators(), AddLambdaCompletion(), AddMacroResults(), AddOrdinaryNameResults(), AddPrettyFunctionResults(), clang::CodeCompletionContext::CCC_Expression, clang::CodeCompletionContext::CCC_ParenthesizedExpression, clang::CPlusPlus11, clang::Sema::CurContext, clang::Data, clang::Enum, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), clang::Sema::PP, TryDeconstructFunctionLike(), and WantTypesInContext().
Referenced by clang::Parser::ParseAssignmentExpression(), and clang::Parser::ParseConditionalExpression().
void SemaCodeCompletion::CodeCompleteExpression | ( | Scope * | S, |
QualType | PreferredType, | ||
bool | IsParenthesized = false |
||
) |
Definition at line 4923 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompleteFunctionQualifiers | ( | DeclSpec & | DS, |
Declarator & | D, | ||
const VirtSpecifiers * | VS = nullptr |
||
) |
Definition at line 5983 of file SemaCodeComplete.cpp.
References AddTypeQualifierResults(), clang::CodeCompletionContext::CCC_TypeQualifiers, clang::CPlusPlus11, D, HandleCodeCompleteResults(), clang::VirtSpecifiers::isFinalSpecified(), clang::VirtSpecifiers::isOverrideSpecified(), and clang::Member.
void SemaCodeCompletion::CodeCompleteIncludedFile | ( | llvm::StringRef | Dir, |
bool | IsAngled | ||
) |
Definition at line 10160 of file SemaCodeComplete.cpp.
References Begin, clang::CodeCompletionContext::CCC_IncludedFile, D, Filename, clang::Preprocessor::getCurrentFileLexer(), clang::PreprocessorLexer::getFileEntry(), clang::SourceManager::getFileManager(), clang::Preprocessor::getHeaderSearchInfo(), clang::Sema::getSourceManager(), clang::FileManager::getVirtualFileSystem(), HandleCodeCompleteResults(), clang::DirectoryLookup::LT_Framework, clang::DirectoryLookup::LT_HeaderMap, clang::DirectoryLookup::LT_NormalDir, and clang::Sema::PP.
Definition at line 6610 of file SemaCodeComplete.cpp.
References D, clang::Data, and clang::ValueDecl::getType().
void SemaCodeCompletion::CodeCompleteInPreprocessorConditionalExclusion | ( | Scope * | S | ) |
Definition at line 10088 of file SemaCodeComplete.cpp.
References PCC_Namespace, and PCC_RecoveryInFunction.
void SemaCodeCompletion::CodeCompleteLambdaIntroducer | ( | Scope * | S, |
LambdaIntroducer & | Intro, | ||
bool | AfterAmpersand | ||
) |
Definition at line 7103 of file SemaCodeComplete.cpp.
References addThisCompletion(), clang::C, clang::LambdaIntroducer::Captures, clang::CodeCompletionContext::CCC_Other, clang::CCP_LocalDeclaration, clang::Sema::CurContext, D, clang::LambdaIntroducer::Default, HandleCodeCompleteResults(), isNamespaceScope(), clang::LCD_ByCopy, and clang::LCK_This.
void SemaCodeCompletion::CodeCompleteMemberReferenceExpr | ( | Scope * | S, |
Expr * | Base, | ||
Expr * | OtherOpBase, | ||
SourceLocation | OpLoc, | ||
bool | IsArrow, | ||
bool | IsBaseExprStatement, | ||
QualType | PreferredType | ||
) |
Definition at line 5721 of file SemaCodeComplete.cpp.
References AddObjCProperties(), AddRecordMembersCompletionResults(), clang::Type::castAs(), clang::CodeCompletionContext::CCC_ArrowMemberAccess, clang::CodeCompletionContext::CCC_DotMemberAccess, clang::CodeCompletionContext::CCC_ObjCPropertyAccess, clang::Class, clang::FixItHint::CreateReplacement(), clang::Sema::CurContext, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Type::getAsObjCInterfacePointerType(), getAsRecordDecl(), clang::Type::getPointeeType(), clang::CharSourceRange::getTokenRange(), clang::QualType::getTypePtr(), HandleCodeCompleteResults(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isObjCObjectOrInterfaceType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Type::isTemplateTypeParmType(), clang::Sema::LookupMemberName, clang::Sema::LookupVisibleDecls(), clang::Sema::PerformMemberExprBaseConversion(), clang::ObjCObjectPointerType::quals(), clang::Result, clang::CodeCompletionContext::setPreferredType(), and clang::VK_LValue.
void SemaCodeCompletion::CodeCompleteModuleImport | ( | SourceLocation | ImportLoc, |
ModuleIdPath | Path | ||
) |
Definition at line 4370 of file SemaCodeComplete.cpp.
References clang::Module::AllVisible, clang::CodeCompletionContext::CCC_Other, clang::CCP_Declaration, clang::HeaderSearch::collectAllModules(), CXAvailability_Available, CXAvailability_NotAvailable, CXCursor_ModuleImportDecl, clang::Preprocessor::getHeaderSearchInfo(), clang::Preprocessor::getModuleLoader(), HandleCodeCompleteResults(), clang::ModuleLoader::loadModule(), Path, clang::Sema::PP, clang::Result, and clang::Module::submodules().
void SemaCodeCompletion::CodeCompleteNamespaceAliasDecl | ( | Scope * | S | ) |
Definition at line 6888 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Namespace, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, and clang::Sema::LookupVisibleDecls().
void SemaCodeCompletion::CodeCompleteNamespaceDecl | ( | Scope * | S | ) |
Definition at line 6839 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Namespace, clang::CodeCompletionContext::CCC_Other, clang::Sema::CurContext, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), HandleCodeCompleteResults(), and clang::DeclContext::isFileContext().
void SemaCodeCompletion::CodeCompleteNaturalLanguage | ( | ) |
Definition at line 10303 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_NaturalLanguage, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCAtDirective | ( | Scope * | S | ) |
Definition at line 7292 of file SemaCodeComplete.cpp.
References AddObjCImplementationResults(), AddObjCInterfaceResults(), AddObjCTopLevelResults(), clang::CodeCompletionContext::CCC_Other, clang::Sema::CurContext, HandleCodeCompleteResults(), and clang::DeclContext::isObjCContainer().
void SemaCodeCompletion::CodeCompleteObjCAtExpression | ( | Scope * | S | ) |
Definition at line 7455 of file SemaCodeComplete.cpp.
References AddObjCExpressionResults(), clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCAtStatement | ( | Scope * | S | ) |
Definition at line 7442 of file SemaCodeComplete.cpp.
References AddObjCExpressionResults(), AddObjCStatementResults(), clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCAtVisibility | ( | Scope * | S | ) |
Definition at line 7430 of file SemaCodeComplete.cpp.
References AddObjCVisibilityResults(), clang::CodeCompletionContext::CCC_Other, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCClassForwardDecl | ( | Scope * | S | ) |
Definition at line 8644 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCClassForwardDecl, clang::Sema::CurContext, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCClassMessage | ( | Scope * | S, |
ParsedType | Receiver, | ||
ArrayRef< const IdentifierInfo * > | SelIdents, | ||
bool | AtArgumentExpression, | ||
bool | IsSuper = false |
||
) |
void SemaCodeCompletion::CodeCompleteObjCClassPropertyRefExpr | ( | Scope * | S, |
const IdentifierInfo & | ClassName, | ||
SourceLocation | ClassNameLoc, | ||
bool | IsBaseExprStatement | ||
) |
Definition at line 5880 of file SemaCodeComplete.cpp.
References AddObjCProperties(), clang::CodeCompletionContext::CCC_ObjCPropertyAccess, clang::Sema::CurContext, clang::SemaObjC::getObjCInterfaceDecl(), HandleCodeCompleteResults(), and clang::Sema::ObjC().
void SemaCodeCompletion::CodeCompleteObjCForCollection | ( | Scope * | S, |
DeclGroupPtrTy | IterationVar | ||
) |
Definition at line 8464 of file SemaCodeComplete.cpp.
References clang::DeclGroupRef::begin(), clang::Data, clang::DeclGroupRef::end(), clang::OpaquePtr< PtrTy >::get(), and clang::OpaquePtr< PtrTy >::getAsOpaquePtr().
void SemaCodeCompletion::CodeCompleteObjCImplementationCategory | ( | Scope * | S, |
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassNameLoc | ||
) |
Definition at line 8743 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_ObjCCategoryName, clang::Class, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::Result, and clang::Sema::TUScope.
void SemaCodeCompletion::CodeCompleteObjCImplementationDecl | ( | Scope * | S | ) |
Definition at line 8689 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCImplementation, clang::Sema::CurContext, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCInstanceMessage | ( | Scope * | S, |
Expr * | Receiver, | ||
ArrayRef< const IdentifierInfo * > | SelIdents, | ||
bool | AtArgumentExpression, | ||
ObjCInterfaceDecl * | Super = nullptr |
||
) |
Definition at line 8303 of file SemaCodeComplete.cpp.
References AddObjCMethods(), AddSuperSendCompletion(), clang::SemaObjC::GlobalMethodPool::begin(), clang::CodeCompletionContext::CCC_ObjCInstanceMessage, clang::SemaObjC::GlobalMethodPool::count(), clang::Sema::CurContext, clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::SemaObjC::GlobalMethodPool::end(), clang::Sema::ExternalSource, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedIdType(), GetAssumedMessageSendExprType(), clang::Sema::getCurMethodDecl(), clang::ObjCMethodList::getMethod(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), getPreferredArgumentTypeForMessageSend(), clang::Expr::getType(), HandleCodeCompleteResults(), isAcceptableObjCMethod(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Selector::isNull(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCQualifiedClassType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::OpaquePtr< QualType >::make(), clang::SemaObjC::MethodPool, MK_Any, clang::Sema::ObjC(), clang::Sema::PerformContextuallyConvertToObjCPointer(), clang::SemaObjC::ReadMethodPool(), and clang::Result.
void SemaCodeCompletion::CodeCompleteObjCInterfaceCategory | ( | Scope * | S, |
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassNameLoc | ||
) |
Definition at line 8708 of file SemaCodeComplete.cpp.
References Category, clang::CodeCompletionContext::CCC_ObjCCategoryName, clang::Class, clang::Sema::CurContext, D, clang::DeclContext::decls(), clang::Decl::getTranslationUnitDecl(), HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::Result, and clang::Sema::TUScope.
void SemaCodeCompletion::CodeCompleteObjCInterfaceDecl | ( | Scope * | S | ) |
Definition at line 8625 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCInterfaceName, clang::Sema::CurContext, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCMessageReceiver | ( | Scope * | S | ) |
Definition at line 8056 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddSuperSendCompletion(), addThisCompletion(), clang::CodeCompletionContext::CCC_ObjCMessageReceiver, clang::CPlusPlus11, clang::Sema::CurContext, clang::Sema::getCurMethodDecl(), HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), clang::Sema::PP, and clang::Result.
void SemaCodeCompletion::CodeCompleteObjCMethodDecl | ( | Scope * | S, |
std::optional< bool > | IsInstanceMethod, | ||
ParsedType | ReturnType | ||
) |
Definition at line 9651 of file SemaCodeComplete.cpp.
References AddObjCKeyValueCompletions(), AddObjCPassingTypeChunk(), Category, clang::CodeCompletionContext::CCC_Other, clang::CCP_CodePattern, clang::CodeCompletionString::CK_Comma, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftBrace, clang::CodeCompletionString::CK_RightBrace, clang::CodeCompletionString::CK_SemiColon, clang::CodeCompletionString::CK_VerticalSpace, clang::Sema::CurContext, D, FindImplementableMethods(), getCompletionPrintingPolicy(), clang::ASTContext::getLangOpts(), clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), clang::ObjCMethodDecl::getObjCDeclQualifier(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSendResultType(), clang::Sema::GetTypeFromParser(), HandleCodeCompleteResults(), Id, clang::ObjCMethodDecl::isInstanceMethod(), clang::QualType::isNull(), clang::DeclContext::isObjCContainer(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::isVariadic(), clang::Type::isVoidType(), clang::Decl::OBJC_TQ_CSNullability, P, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::ObjCMethodDecl::param_size(), clang::Parameter, Priority, clang::Result, setInBaseClass(), clang::QualType::stripObjCKindOfType(), clang::AttributedType::stripOuterNullability(), clang::QualType::substObjCTypeArgs(), and clang::ObjCInterfaceDecl::visible_categories().
void SemaCodeCompletion::CodeCompleteObjCMethodDeclSelector | ( | Scope * | S, |
bool | IsInstanceMethod, | ||
bool | AtParameterName, | ||
ParsedType | ReturnType, | ||
ArrayRef< const IdentifierInfo * > | SelIdents | ||
) |
Definition at line 9829 of file SemaCodeComplete.cpp.
References clang::SemaObjC::GlobalMethodPool::begin(), clang::CodeCompletionContext::CCC_Other, clang::CCP_Macro, clang::SemaObjC::GlobalMethodPool::count(), clang::Sema::CurContext, CXCursor_MacroDefinition, clang::SemaObjC::GlobalMethodPool::end(), clang::Sema::ExternalSource, clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::QualType::getNonReferenceType(), clang::Sema::GetTypeFromParser(), HandleCodeCompleteResults(), isAcceptableObjCMethod(), clang::Selector::isNull(), clang::Preprocessor::macros(), clang::SemaObjC::MethodPool, MK_Any, clang::Sema::ObjC(), clang::Sema::PP, clang::SemaObjC::ReadMethodPool(), and clang::Result.
void SemaCodeCompletion::CodeCompleteObjCPassingType | ( | Scope * | S, |
ObjCDeclSpec & | DS, | ||
bool | IsParameter | ||
) |
Definition at line 7790 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), clang::CodeCompletionContext::CCC_Type, clang::CCP_CodePattern, clang::CodeCompletionString::CK_Colon, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, clang::Sema::CurContext, CXAvailability_Available, clang::ObjCDeclSpec::DQ_Bycopy, clang::ObjCDeclSpec::DQ_Byref, clang::ObjCDeclSpec::DQ_CSNullability, clang::ObjCDeclSpec::DQ_In, clang::ObjCDeclSpec::DQ_Inout, clang::ObjCDeclSpec::DQ_Oneway, clang::ObjCDeclSpec::DQ_Out, clang::ObjCDeclSpec::getObjCDeclQualifier(), HandleCodeCompleteResults(), clang::Preprocessor::isMacroDefined(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), and clang::Sema::PP.
void SemaCodeCompletion::CodeCompleteObjCPropertyDefinition | ( | Scope * | S | ) |
Definition at line 8784 of file SemaCodeComplete.cpp.
References AddObjCProperties(), clang::CodeCompletionContext::CCC_Other, clang::Sema::CurContext, D, getContainerDef(), and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCPropertyFlags | ( | Scope * | S, |
ObjCDeclSpec & | ODS | ||
) |
Definition at line 7500 of file SemaCodeComplete.cpp.
References clang::CodeCompletionBuilder::AddPlaceholderChunk(), clang::CodeCompletionBuilder::AddTextChunk(), clang::CodeCompletionBuilder::AddTypedTextChunk(), clang::CodeCompletionContext::CCC_Other, clang::ObjCDeclSpec::getPropertyAttributes(), HandleCodeCompleteResults(), clang::ObjCPropertyAttribute::kind_assign, clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_getter, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_nullability, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_setter, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_unsafe_unretained, clang::ObjCPropertyAttribute::kind_weak, clang::LangOptionsBase::NonGC, ObjCPropertyFlagConflicts(), and clang::CodeCompletionBuilder::TakeString().
void SemaCodeCompletion::CodeCompleteObjCPropertyGetter | ( | Scope * | S | ) |
Definition at line 7731 of file SemaCodeComplete.cpp.
References AddObjCMethods(), Category, clang::CodeCompletionContext::CCC_Other, clang::Class, clang::Sema::CurContext, HandleCodeCompleteResults(), and MK_ZeroArgSelector.
void SemaCodeCompletion::CodeCompleteObjCPropertySetter | ( | Scope * | S | ) |
Definition at line 7760 of file SemaCodeComplete.cpp.
References AddObjCMethods(), Category, clang::CodeCompletionContext::CCC_Other, clang::Class, clang::Sema::CurContext, HandleCodeCompleteResults(), and MK_OneArgSelector.
void SemaCodeCompletion::CodeCompleteObjCPropertySynthesizeIvar | ( | Scope * | S, |
IdentifierInfo * | PropertyName | ||
) |
Definition at line 8822 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Other, clang::CCP_MemberDeclaration, clang::Class, clang::Sema::CurContext, CXAvailability_Available, CXCursor_ObjCIvarDecl, getCompletionPrintingPolicy(), GetCompletionTypeString(), HandleCodeCompleteResults(), clang::OBJC_PR_query_instance, Priority, clang::Property, clang::Result, and clang::CodeCompletionResult::RK_Declaration.
void SemaCodeCompletion::CodeCompleteObjCProtocolDecl | ( | Scope * | S | ) |
Definition at line 8586 of file SemaCodeComplete.cpp.
References AddProtocolResults(), clang::CodeCompletionContext::CCC_ObjCProtocolName, clang::Sema::CurContext, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteObjCProtocolReferences | ( | ArrayRef< IdentifierLocPair > | Protocols | ) |
Definition at line 8557 of file SemaCodeComplete.cpp.
References AddProtocolResults(), clang::CodeCompletionContext::CCC_ObjCProtocolName, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::SemaObjC::LookupProtocol(), and clang::Sema::ObjC().
void SemaCodeCompletion::CodeCompleteObjCSelector | ( | Scope * | S, |
ArrayRef< const IdentifierInfo * > | SelIdents | ||
) |
Definition at line 8480 of file SemaCodeComplete.cpp.
References clang::SemaObjC::GlobalMethodPool::begin(), clang::CodeCompletionContext::CCC_SelectorName, clang::SemaObjC::GlobalMethodPool::count(), clang::SemaObjC::GlobalMethodPool::end(), clang::Sema::ExternalSource, clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), HandleCodeCompleteResults(), isAcceptableObjCSelector(), clang::Selector::isNull(), clang::Selector::isUnarySelector(), clang::SemaObjC::MethodPool, MK_Any, clang::Sema::ObjC(), and clang::SemaObjC::ReadMethodPool().
void SemaCodeCompletion::CodeCompleteObjCSuperclass | ( | Scope * | S, |
IdentifierInfo * | ClassName, | ||
SourceLocation | ClassNameLoc | ||
) |
Definition at line 8663 of file SemaCodeComplete.cpp.
References AddInterfaceResults(), clang::CodeCompletionContext::CCC_ObjCInterfaceName, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), and clang::Sema::TUScope.
void SemaCodeCompletion::CodeCompleteObjCSuperMessage | ( | Scope * | S, |
SourceLocation | SuperLoc, | ||
ArrayRef< const IdentifierInfo * > | SelIdents, | ||
bool | AtArgumentExpression | ||
) |
Definition at line 8095 of file SemaCodeComplete.cpp.
References clang::Sema::ActOnIdExpression(), clang::ActionResult< PtrTy, Compress >::get(), clang::Sema::getCurMethodDecl(), clang::ObjCInterfaceDecl::getSuperClass(), clang::Sema::getSuperIdentifier(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupSingleName(), clang::OpaquePtr< QualType >::make(), and clang::UnqualifiedId::setIdentifier().
void SemaCodeCompletion::CodeCompleteOperatorName | ( | Scope * | S | ) |
Definition at line 6906 of file SemaCodeComplete.cpp.
References AddTypeSpecifierResults(), clang::CodeCompletionContext::CCC_Type, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), and clang::Result.
void SemaCodeCompletion::CodeCompleteOrdinaryName | ( | Scope * | S, |
SemaCodeCompletion::ParserCompletionContext | CompletionContext | ||
) |
Definition at line 4416 of file SemaCodeComplete.cpp.
References AddMacroResults(), AddOrdinaryNameResults(), AddPrettyFunctionResults(), clang::CPlusPlus, clang::Sema::CurContext, clang::Sema::getCurrentThisType(), HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), mapCodeCompletionContext(), MaybeAddOverrideCalls(), clang::Sema::PP, clang::VK_LValue, and WantTypesInContext().
void SemaCodeCompletion::CodeCompletePostfixExpression | ( | Scope * | S, |
ExprResult | LHS, | ||
QualType | PreferredType | ||
) |
Definition at line 4930 of file SemaCodeComplete.cpp.
References E, and clang::ObjC.
void SemaCodeCompletion::CodeCompletePreprocessorDirective | ( | bool | InConditional | ) |
Definition at line 9917 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_PreprocessorDirective, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, HandleCodeCompleteResults(), and clang::ObjC.
void SemaCodeCompletion::CodeCompletePreprocessorExpression | ( | ) |
Definition at line 10123 of file SemaCodeComplete.cpp.
References AddMacroResults(), clang::CodeCompletionContext::CCC_PreprocessorExpression, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightParen, HandleCodeCompleteResults(), and clang::Sema::PP.
void SemaCodeCompletion::CodeCompletePreprocessorMacroArgument | ( | Scope * | S, |
IdentifierInfo * | Macro, | ||
MacroInfo * | MacroInfo, | ||
unsigned | Argument | ||
) |
Definition at line 10148 of file SemaCodeComplete.cpp.
void SemaCodeCompletion::CodeCompletePreprocessorMacroName | ( | bool | IsDefinition | ) |
Definition at line 10095 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_MacroName, clang::CodeCompletionContext::CCC_MacroNameUse, clang::CCP_CodePattern, CXCursor_MacroDefinition, HandleCodeCompleteResults(), clang::Preprocessor::macro_begin(), clang::Preprocessor::macro_end(), and clang::Sema::PP.
void SemaCodeCompletion::CodeCompleteQualifiedId | ( | Scope * | S, |
CXXScopeSpec & | SS, | ||
bool | EnteringContext, | ||
bool | IsUsingDeclaration, | ||
QualType | BaseType, | ||
QualType | PreferredType | ||
) |
Definition at line 6690 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Symbol, clang::Sema::computeDeclContext(), clang::NestedNameSpecifier::getAsType(), clang::CXXScopeSpec::getScopeRep(), HandleCodeCompleteResults(), clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::CXXScopeSpec::isValid(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupVisibleDecls(), MaybeAddOverrideCalls(), clang::Sema::RequireCompleteDeclContext(), clang::CodeCompletionContext::setCXXScopeSpecifier(), and clang::CodeCompletionContext::setIsUsingDeclaration().
Definition at line 5905 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_ClassOrStructTag, clang::CodeCompletionContext::CCC_EnumTag, clang::CodeCompletionContext::CCC_Other, clang::CodeCompletionContext::CCC_UnionTag, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupNestedNameSpecifierName, clang::Sema::LookupTagName, clang::Sema::LookupVisibleDecls(), clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, and clang::DeclSpec::TST_union.
void SemaCodeCompletion::CodeCompleteTypeQualifiers | ( | DeclSpec & | DS | ) |
Definition at line 5971 of file SemaCodeComplete.cpp.
References AddTypeQualifierResults(), clang::CodeCompletionContext::CCC_TypeQualifiers, and HandleCodeCompleteResults().
void SemaCodeCompletion::CodeCompleteUsing | ( | Scope * | S | ) |
Definition at line 6787 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_SymbolOrNewName, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, and clang::Sema::LookupVisibleDecls().
void SemaCodeCompletion::CodeCompleteUsingDirective | ( | Scope * | S | ) |
Definition at line 6818 of file SemaCodeComplete.cpp.
References clang::CodeCompletionContext::CCC_Namespace, clang::Sema::CurContext, HandleCodeCompleteResults(), clang::Sema::LookupOrdinaryName, and clang::Sema::LookupVisibleDecls().
void SemaCodeCompletion::GatherGlobalCodeCompletions | ( | CodeCompletionAllocator & | Allocator, |
CodeCompletionTUInfo & | CCTUInfo, | ||
SmallVectorImpl< CodeCompletionResult > & | Results | ||
) |
Definition at line 10326 of file SemaCodeComplete.cpp.
References AddMacroResults(), clang::CodeCompletionContext::CCC_Recovery, clang::Sema::LookupAnyName, clang::Sema::LookupVisibleDecls(), and clang::Sema::PP.
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 6219 of file SemaCodeComplete.cpp.
References clang::Sema::AddFunctionCandidates(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddOverloadedCallCandidates(), anyNullArguments(), clang::UnresolvedSetImpl::append(), clang::LookupResult::asUnresolvedSet(), clang::CPlusPlus, clang::OverloadCandidateSet::CSK_Normal, clang::OverloadCandidateSet::empty(), clang::Decl::getAccess(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Type::getPointeeType(), GetPrototypeLoc(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Sema::isCompleteType(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), Loc, clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclAccessPair::make(), mergeCandidatesWithResults(), P, ProduceSignatureHelp(), clang::LookupResult::suppressDiagnostics(), clang::T, and clang::Sema::TooManyArguments().
QualType SemaCodeCompletion::ProduceConstructorSignatureHelp | ( | QualType | Type, |
SourceLocation | Loc, | ||
ArrayRef< Expr * > | Args, | ||
SourceLocation | OpenParLoc, | ||
bool | Braced | ||
) |
Definition at line 6399 of file SemaCodeComplete.cpp.
References clang::Sema::AddOverloadCandidate(), clang::Sema::AddTemplateOverloadCandidate(), clang::C, clang::CPlusPlus, clang::OverloadCandidateSet::CSK_Normal, clang::Type::getAsRecordDecl(), getNextAggregateIndexAfterDesignatedInit(), clang::CodeCompleteConsumer::OverloadCandidate::getNumParams(), clang::CXXRecordDecl::isAggregate(), clang::Sema::isCompleteType(), clang::Sema::isInitListConstructor(), clang::TagDecl::isUnion(), Loc, clang::Sema::LookupConstructors(), clang::DeclAccessPair::make(), mergeCandidatesWithResults(), and ProduceSignatureHelp().
QualType SemaCodeCompletion::ProduceCtorInitMemberSignatureHelp | ( | Decl * | ConstructorDecl, |
CXXScopeSpec | SS, | ||
ParsedType | TemplateTypeTy, | ||
ArrayRef< Expr * > | ArgExprs, | ||
IdentifierInfo * | II, | ||
SourceLocation | OpenParLoc, | ||
bool | Braced | ||
) |
Definition at line 6476 of file SemaCodeComplete.cpp.
References clang::Sema::tryLookupCtorInitMemberDecl().
QualType SemaCodeCompletion::ProduceTemplateArgumentSignatureHelp | ( | TemplateTy | ParsedTemplate, |
ArrayRef< ParsedTemplateArgument > | Args, | ||
SourceLocation | LAngleLoc | ||
) |
Definition at line 6518 of file SemaCodeComplete.cpp.
References argMatchesTemplateParams(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), and ProduceSignatureHelp().
CodeCompleteConsumer* clang::SemaCodeCompletion::CodeCompleter |
Code-completion consumer.
Definition at line 45 of file SemaCodeCompletion.h.
Referenced by AddRecordMembersCompletionResults(), and ProduceSignatureHelp().