clang
6.0.0
|
The context in which code completion occurred, so that the code-completion consumer can process the results accordingly. More...
#include "clang/Sema/CodeCompleteConsumer.h"
Public Member Functions | |
CodeCompletionContext (enum Kind Kind) | |
Construct a new code-completion context of the given kind. More... | |
CodeCompletionContext (enum Kind Kind, QualType T, ArrayRef< IdentifierInfo *> SelIdents=None) | |
Construct a new code-completion context of the given kind. More... | |
enum Kind | getKind () const |
Retrieve the kind of code-completion context. More... | |
QualType | getPreferredType () const |
Retrieve the type that this expression would prefer to have, e.g., if the expression is a variable initializer or a function argument, the type of the corresponding variable or function parameter. More... | |
QualType | getBaseType () const |
Retrieve the type of the base object in a member-access expression. More... | |
ArrayRef< IdentifierInfo * > | getSelIdents () const |
Retrieve the Objective-C selector identifiers. More... | |
bool | wantConstructorResults () const |
Determines whether we want C++ constructors as results within this context. More... | |
void | setCXXScopeSpecifier (CXXScopeSpec SS) |
Sets the scope specifier that comes before the completion token. More... | |
llvm::Optional< const CXXScopeSpec * > | getCXXScopeSpecifier () |
The context in which code completion occurred, so that the code-completion consumer can process the results accordingly.
Definition at line 161 of file CodeCompleteConsumer.h.
Definition at line 163 of file CodeCompleteConsumer.h.
|
inline |
Construct a new code-completion context of the given kind.
Definition at line 290 of file CodeCompleteConsumer.h.
|
inline |
Construct a new code-completion context of the given kind.
Definition at line 293 of file CodeCompleteConsumer.h.
References CCC_ArrowMemberAccess, CCC_DotMemberAccess, CCC_ObjCClassMessage, CCC_ObjCInstanceMessage, CCC_ObjCPropertyAccess, and clang::T.
|
inline |
Retrieve the type of the base object in a member-access expression.
Definition at line 315 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 331 of file CodeCompleteConsumer.h.
References clang::None.
|
inline |
Retrieve the kind of code-completion context.
Definition at line 306 of file CodeCompleteConsumer.h.
Referenced by clang::getDeclUsageType(), and clang::CodeCompleteConsumer::OverloadCandidate::getFunctionTemplate().
|
inline |
Retrieve the type that this expression would prefer to have, e.g., if the expression is a variable initializer or a function argument, the type of the corresponding variable or function parameter.
Definition at line 311 of file CodeCompleteConsumer.h.
|
inline |
Retrieve the Objective-C selector identifiers.
Definition at line 318 of file CodeCompleteConsumer.h.
References wantConstructorResults().
|
inline |
Sets the scope specifier that comes before the completion token.
This is expected to be set in code completions on qualfied specifiers (e.g. "a::b::").
Definition at line 327 of file CodeCompleteConsumer.h.
Referenced by clang::Sema::CodeCompleteQualifiedId().
bool CodeCompletionContext::wantConstructorResults | ( | ) | const |
Determines whether we want C++ constructors as results within this context.
Definition at line 35 of file CodeCompleteConsumer.cpp.
References CCC_ArrowMemberAccess, CCC_ClassOrStructTag, CCC_ClassStructUnion, CCC_DotMemberAccess, CCC_EnumTag, CCC_Expression, CCC_MacroName, CCC_MacroNameUse, CCC_Name, CCC_Namespace, CCC_NaturalLanguage, CCC_ObjCCategoryName, CCC_ObjCClassMessage, CCC_ObjCImplementation, CCC_ObjCInstanceMessage, CCC_ObjCInterface, CCC_ObjCInterfaceName, CCC_ObjCIvarList, CCC_ObjCMessageReceiver, CCC_ObjCPropertyAccess, CCC_ObjCProtocolName, CCC_Other, CCC_OtherWithMacros, CCC_ParenthesizedExpression, CCC_PotentiallyQualifiedName, CCC_PreprocessorDirective, CCC_PreprocessorExpression, CCC_Recovery, CCC_SelectorName, CCC_Statement, CCC_TopLevel, CCC_Type, CCC_TypeQualifiers, and CCC_UnionTag.
Referenced by clang::getDeclUsageType(), and getSelIdents().