|
clang
5.0.0
|
A builder class used to construct new code-completion strings. More...
#include "clang/Sema/CodeCompleteConsumer.h"
Public Types | |
| typedef CodeCompletionString::Chunk | Chunk |
Public Member Functions | |
| CodeCompletionBuilder (CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo) | |
| CodeCompletionBuilder (CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, unsigned Priority, CXAvailabilityKind Availability) | |
| CodeCompletionAllocator & | getAllocator () const |
| Retrieve the allocator into which the code completion strings should be allocated. More... | |
| CodeCompletionTUInfo & | getCodeCompletionTUInfo () const |
| CodeCompletionString * | TakeString () |
| Take the resulting completion string. More... | |
| void | AddTypedTextChunk (const char *Text) |
| Add a new typed-text chunk. More... | |
| void | AddTextChunk (const char *Text) |
| Add a new text chunk. More... | |
| void | AddOptionalChunk (CodeCompletionString *Optional) |
| Add a new optional chunk. More... | |
| void | AddPlaceholderChunk (const char *Placeholder) |
| Add a new placeholder chunk. More... | |
| void | AddInformativeChunk (const char *Text) |
| Add a new informative chunk. More... | |
| void | AddResultTypeChunk (const char *ResultType) |
| Add a new result-type chunk. More... | |
| void | AddCurrentParameterChunk (const char *CurrentParameter) |
| Add a new current-parameter chunk. More... | |
| void | AddChunk (CodeCompletionString::ChunkKind CK, const char *Text="") |
| Add a new chunk. More... | |
| void | AddAnnotation (const char *A) |
| void | addParentContext (const DeclContext *DC) |
| Add the parent context information to this code completion. More... | |
| const char * | getBriefComment () const |
| void | addBriefComment (StringRef Comment) |
| StringRef | getParentName () const |
A builder class used to construct new code-completion strings.
Definition at line 545 of file CodeCompleteConsumer.h.
Definition at line 547 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 563 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 569 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 611 of file CodeCompleteConsumer.h.
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().
| void CodeCompletionBuilder::addBriefComment | ( | StringRef | Comment | ) |
Definition at line 392 of file CodeCompleteConsumer.cpp.
References Allocator.
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString(), and clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString().
| void CodeCompletionBuilder::AddChunk | ( | CodeCompletionString::ChunkKind | CK, |
| const char * | Text = "" |
||
| ) |
Add a new chunk.
Definition at line 372 of file CodeCompleteConsumer.cpp.
Referenced by AddFunctionParameterChunks(), AddObjCBlockCall(), AddObjCPassingTypeChunk(), AddOverloadParameterChunks(), AddStaticAssertResult(), AddTemplateParameterChunks(), AddTypedNameChunk(), clang::CodeCompletionResult::CreateCodeCompletionString(), and clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString().
| void CodeCompletionBuilder::AddCurrentParameterChunk | ( | const char * | CurrentParameter | ) |
Add a new current-parameter chunk.
Definition at line 368 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateCurrentParameter().
Referenced by AddOverloadParameterChunks().
| void CodeCompletionBuilder::AddInformativeChunk | ( | const char * | Text | ) |
Add a new informative chunk.
Definition at line 359 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateInformative().
Referenced by AddFunctionTypeQualsToCompletionString(), AddQualifierToCompletionString(), and clang::CodeCompletionResult::CreateCodeCompletionString().
| void CodeCompletionBuilder::AddOptionalChunk | ( | CodeCompletionString * | Optional | ) |
Add a new optional chunk.
Definition at line 351 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateOptional().
Referenced by AddFunctionParameterChunks(), AddOverloadParameterChunks(), and AddTemplateParameterChunks().
| void CodeCompletionBuilder::addParentContext | ( | const DeclContext * | DC | ) |
Add the parent context information to this code completion.
Definition at line 377 of file CodeCompleteConsumer.cpp.
References clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isTranslationUnit().
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().
| void CodeCompletionBuilder::AddPlaceholderChunk | ( | const char * | Placeholder | ) |
Add a new placeholder chunk.
Definition at line 355 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreatePlaceholder().
Referenced by AddFunctionParameterChunks(), AddObjCBlockCall(), AddOverloadParameterChunks(), AddStaticAssertResult(), AddTemplateParameterChunks(), and clang::CodeCompletionResult::CreateCodeCompletionString().
| void CodeCompletionBuilder::AddResultTypeChunk | ( | const char * | ResultType | ) |
Add a new result-type chunk.
Definition at line 363 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateResultType().
Referenced by AddObjCBlockCall(), AddResultTypeChunk(), and clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString().
| void CodeCompletionBuilder::AddTextChunk | ( | const char * | Text | ) |
Add a new text chunk.
Definition at line 347 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateText().
Referenced by AddObjCPassingTypeChunk(), AddQualifierToCompletionString(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), and MaybeAddSentinel().
| void CodeCompletionBuilder::AddTypedTextChunk | ( | const char * | Text | ) |
Add a new typed-text chunk.
Definition at line 343 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::CK_TypedText.
Referenced by AddStaticAssertResult(), AddTypedNameChunk(), clang::Sema::CodeCompleteObjCPropertyFlags(), and clang::CodeCompletionResult::CreateCodeCompletionString().
|
inline |
Retrieve the allocator into which the code completion strings should be allocated.
Definition at line 578 of file CodeCompleteConsumer.h.
Referenced by AddFunctionParameterChunks(), AddFunctionTypeQualsToCompletionString(), AddObjCBlockCall(), AddObjCPassingTypeChunk(), AddOverloadParameterChunks(), AddQualifierToCompletionString(), AddResultTypeChunk(), AddTemplateParameterChunks(), AddTypedNameChunk(), clang::CodeCompletionResult::CreateCodeCompletionString(), and clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString().
|
inline |
Definition at line 616 of file CodeCompleteConsumer.h.
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().
|
inline |
Definition at line 580 of file CodeCompleteConsumer.h.
Referenced by AddFunctionParameterChunks(), AddOverloadParameterChunks(), and AddTemplateParameterChunks().
|
inline |
Definition at line 619 of file CodeCompleteConsumer.h.
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().
| CodeCompletionString * CodeCompletionBuilder::TakeString | ( | ) |
Take the resulting completion string.
This operation can only be performed once.
Definition at line 329 of file CodeCompleteConsumer.cpp.
References clang::Result.
Referenced by AddStaticAssertResult(), clang::CodeCompletionResult::CreateCodeCompletionString(), and clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString().
1.8.6