clang
3.9.0
|
Captures a result of code completion. More...
#include <CodeCompleteConsumer.h>
Public Types | |
enum | ResultKind { RK_Declaration = 0, RK_Keyword, RK_Macro, RK_Pattern } |
Describes the kind of result generated. More... | |
Public Attributes | |
const NamedDecl * | Declaration |
When Kind == RK_Declaration or RK_Pattern, the declaration we are referring to. More... | |
union { | |
const char * Keyword | |
When Kind == RK_Keyword, the string representing the keyword or symbol's spelling. More... | |
CodeCompletionString * Pattern | |
When Kind == RK_Pattern, the code-completion string that describes the completion text to insert. More... | |
const IdentifierInfo * Macro | |
When Kind == RK_Macro, the identifier that refers to a macro. More... | |
}; | |
unsigned | Priority |
The priority of this particular code-completion result. More... | |
unsigned | StartParameter |
Specifies which parameter (of a function, Objective-C method, macro, etc.) we should start with when formatting the result. More... | |
ResultKind | Kind |
The kind of result stored here. More... | |
CXCursorKind | CursorKind |
The cursor kind that describes this result. More... | |
CXAvailabilityKind | Availability |
The availability of this result. More... | |
bool | Hidden: 1 |
Whether this result is hidden by another name. More... | |
bool | QualifierIsInformative: 1 |
Whether this result was found via lookup into a base class. More... | |
bool | StartsNestedNameSpecifier: 1 |
Whether this declaration is the beginning of a nested-name-specifier and, therefore, should be followed by '::'. More... | |
bool | AllParametersAreInformative: 1 |
Whether all parameters (of a function, Objective-C method, etc.) should be considered "informative". More... | |
bool | DeclaringEntity: 1 |
Whether we're completing a declaration of the given entity, rather than a use of that entity. More... | |
NestedNameSpecifier * | Qualifier |
If the result should have a nested-name-specifier, this is it. More... | |
Captures a result of code completion.
Definition at line 624 of file CodeCompleteConsumer.h.
Describes the kind of result generated.
Enumerator | |
---|---|
RK_Declaration |
Refers to a declaration. |
RK_Keyword |
Refers to a keyword or symbol. |
RK_Macro |
Refers to a macro. |
RK_Pattern |
Refers to a precomputed pattern. |
Definition at line 627 of file CodeCompleteConsumer.h.
|
inline |
Build a result that refers to a declaration.
Definition at line 691 of file CodeCompleteConsumer.h.
|
inline |
Build a result that refers to a keyword or symbol.
Definition at line 706 of file CodeCompleteConsumer.h.
|
inline |
Build a result that refers to a macro.
Definition at line 715 of file CodeCompleteConsumer.h.
|
inline |
Build a result that refers to a pattern.
Definition at line 725 of file CodeCompleteConsumer.h.
|
inline |
Build a result that refers to a pattern with an associated declaration.
Definition at line 740 of file CodeCompleteConsumer.h.
CodeCompletionString * CodeCompletionResult::CreateCodeCompletionString | ( | Sema & | S, |
const CodeCompletionContext & | CCContext, | ||
CodeCompletionAllocator & | Allocator, | ||
CodeCompletionTUInfo & | CCTUInfo, | ||
bool | IncludeBriefComments | ||
) |
Create a new code-completion string that describes how to insert this result into a program.
S | The semantic analysis that created the result. |
Allocator | The allocator that will be used to allocate the string itself. |
Definition at line 2578 of file SemaCodeComplete.cpp.
References clang::Sema::Context, and clang::Sema::PP.
CodeCompletionString * CodeCompletionResult::CreateCodeCompletionString | ( | ASTContext & | Ctx, |
Preprocessor & | PP, | ||
const CodeCompletionContext & | CCContext, | ||
CodeCompletionAllocator & | Allocator, | ||
CodeCompletionTUInfo & | CCTUInfo, | ||
bool | IncludeBriefComments | ||
) |
If possible, create a new code completion string for the given result.
Definition at line 2594 of file SemaCodeComplete.cpp.
References clang::CodeCompletionBuilder::AddAnnotation(), clang::CodeCompletionBuilder::addBriefComment(), clang::CodeCompletionBuilder::AddChunk(), AddFunctionParameterChunks(), AddFunctionTypeQualsToCompletionString(), clang::CodeCompletionBuilder::AddInformativeChunk(), clang::CodeCompletionBuilder::addParentContext(), clang::CodeCompletionBuilder::AddPlaceholderChunk(), AddQualifierToCompletionString(), AddResultTypeChunk(), AddTemplateParameterChunks(), clang::CodeCompletionBuilder::AddTextChunk(), AddTypedNameChunk(), clang::CodeCompletionBuilder::AddTypedTextChunk(), clang::MacroInfo::arg_begin(), clang::MacroInfo::arg_end(), clang::CodeCompletionString::CK_Comma, clang::CodeCompletionString::CK_HorizontalSpace, clang::CodeCompletionString::CK_LeftAngle, clang::CodeCompletionString::CK_LeftParen, clang::CodeCompletionString::CK_RightAngle, clang::CodeCompletionString::CK_RightParen, clang::CodeCompletionAllocator::CopyString(), clang::ObjCPropertyDecl::findPropertyDecl(), FormatFunctionParameter(), formatObjCParamQualifiers(), clang::CodeCompletionBuilder::getAllocator(), clang::QualType::getAsString(), clang::CodeCompletionContext::getBaseType(), clang::CodeCompletionBuilder::getBriefComment(), getCompletionPrintingPolicy(), clang::Selector::getIdentifierInfoForSlot(), clang::Preprocessor::getMacroInfo(), clang::NamedDecl::getNameAsString(), clang::Selector::getNameForSlot(), clang::Type::getObjCSubstitutions(), clang::CodeCompletionBuilder::getParentName(), clang::ASTContext::getRawCommentForAnyRedecl(), clang::Type::isBlockPointerType(), clang::MacroInfo::isC99Varargs(), clang::MacroInfo::isFunctionLike(), clang::QualType::isNull(), clang::Selector::isUnarySelector(), clang::MacroInfo::isVariadic(), clang::Sema::MarkDeducedTemplateParameters(), MaybeAddSentinel(), P, clang::Parameter, clang::Result, clang::QualType::substObjCTypeArgs(), and clang::CodeCompletionBuilder::TakeString().
|
inline |
Retrieve the declaration stored in this result.
Definition at line 751 of file CodeCompleteConsumer.h.
References Declaration, and RK_Declaration.
|
inline |
Retrieve the keyword stored in this result.
Definition at line 757 of file CodeCompleteConsumer.h.
References Keyword, and RK_Keyword.
union { ... } |
bool clang::CodeCompletionResult::AllParametersAreInformative |
Whether all parameters (of a function, Objective-C method, etc.) should be considered "informative".
Definition at line 679 of file CodeCompleteConsumer.h.
CXAvailabilityKind clang::CodeCompletionResult::Availability |
The availability of this result.
Definition at line 665 of file CodeCompleteConsumer.h.
CXCursorKind clang::CodeCompletionResult::CursorKind |
The cursor kind that describes this result.
Definition at line 662 of file CodeCompleteConsumer.h.
const NamedDecl* clang::CodeCompletionResult::Declaration |
When Kind == RK_Declaration or RK_Pattern, the declaration we are referring to.
In the latter case, the declaration might be NULL.
Definition at line 636 of file CodeCompleteConsumer.h.
Referenced by CalculateHiddenNames(), getDeclaration(), getOrderedName(), and clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults().
bool clang::CodeCompletionResult::DeclaringEntity |
Whether we're completing a declaration of the given entity, rather than a use of that entity.
Definition at line 683 of file CodeCompleteConsumer.h.
bool clang::CodeCompletionResult::Hidden |
Whether this result is hidden by another name.
Definition at line 668 of file CodeCompleteConsumer.h.
const char* clang::CodeCompletionResult::Keyword |
When Kind == RK_Keyword, the string representing the keyword or symbol's spelling.
Definition at line 641 of file CodeCompleteConsumer.h.
Referenced by getKeyword(), getOrderedName(), and clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults().
ResultKind clang::CodeCompletionResult::Kind |
The kind of result stored here.
Definition at line 659 of file CodeCompleteConsumer.h.
Referenced by getOrderedName().
const IdentifierInfo* clang::CodeCompletionResult::Macro |
When Kind == RK_Macro, the identifier that refers to a macro.
Definition at line 648 of file CodeCompleteConsumer.h.
Referenced by getOrderedName(), and clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults().
CodeCompletionString* clang::CodeCompletionResult::Pattern |
When Kind == RK_Pattern, the code-completion string that describes the completion text to insert.
Definition at line 645 of file CodeCompleteConsumer.h.
Referenced by getOrderedName(), and clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults().
unsigned clang::CodeCompletionResult::Priority |
The priority of this particular code-completion result.
Definition at line 652 of file CodeCompleteConsumer.h.
NestedNameSpecifier* clang::CodeCompletionResult::Qualifier |
If the result should have a nested-name-specifier, this is it.
When QualifierIsInformative
, the nested-name-specifier is informative rather than required.
Definition at line 688 of file CodeCompleteConsumer.h.
bool clang::CodeCompletionResult::QualifierIsInformative |
Whether this result was found via lookup into a base class.
Definition at line 671 of file CodeCompleteConsumer.h.
unsigned clang::CodeCompletionResult::StartParameter |
Specifies which parameter (of a function, Objective-C method, macro, etc.) we should start with when formatting the result.
Definition at line 656 of file CodeCompleteConsumer.h.
bool clang::CodeCompletionResult::StartsNestedNameSpecifier |
Whether this declaration is the beginning of a nested-name-specifier and, therefore, should be followed by '::'.
Definition at line 675 of file CodeCompleteConsumer.h.