clang 20.0.0git
|
A builder class used to construct new code-completion strings. More...
#include "clang/Sema/CodeCompleteConsumer.h"
Public Types | |
using | Chunk = CodeCompletionString::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. | |
CodeCompletionTUInfo & | getCodeCompletionTUInfo () const |
CodeCompletionString * | TakeString () |
Take the resulting completion string. | |
void | AddTypedTextChunk (const char *Text) |
Add a new typed-text chunk. | |
void | AddTextChunk (const char *Text) |
Add a new text chunk. | |
void | AddOptionalChunk (CodeCompletionString *Optional) |
Add a new optional chunk. | |
void | AddPlaceholderChunk (const char *Placeholder) |
Add a new placeholder chunk. | |
void | AddInformativeChunk (const char *Text) |
Add a new informative chunk. | |
void | AddResultTypeChunk (const char *ResultType) |
Add a new result-type chunk. | |
void | AddCurrentParameterChunk (const char *CurrentParameter) |
Add a new current-parameter chunk. | |
void | AddChunk (CodeCompletionString::ChunkKind CK, const char *Text="") |
Add a new chunk. | |
void | AddAnnotation (const char *A) |
void | addParentContext (const DeclContext *DC) |
Add the parent context information to this code completion. | |
const char * | getBriefComment () const |
void | addBriefComment (StringRef Comment) |
StringRef | getParentName () const |
A builder class used to construct new code-completion strings.
Definition at line 686 of file CodeCompleteConsumer.h.
Definition at line 688 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 704 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 708 of file CodeCompleteConsumer.h.
References Priority.
|
inline |
Definition at line 749 of file CodeCompleteConsumer.h.
void CodeCompletionBuilder::addBriefComment | ( | StringRef | Comment | ) |
Definition at line 495 of file CodeCompleteConsumer.cpp.
void CodeCompletionBuilder::AddChunk | ( | CodeCompletionString::ChunkKind | CK, |
const char * | Text = "" |
||
) |
Add a new chunk.
Definition at line 477 of file CodeCompleteConsumer.cpp.
References Text.
Referenced by AddFunctionParameterChunks(), AddLambdaCompletion(), AddOverloadParameterChunks(), and AddTemplateParameterChunks().
void CodeCompletionBuilder::AddCurrentParameterChunk | ( | const char * | CurrentParameter | ) |
Add a new current-parameter chunk.
Definition at line 472 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 464 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateInformative(), and Text.
void CodeCompletionBuilder::AddOptionalChunk | ( | CodeCompletionString * | Optional | ) |
Add a new optional chunk.
Definition at line 456 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateOptional(), and clang::Optional.
void CodeCompletionBuilder::addParentContext | ( | const DeclContext * | DC | ) |
Add the parent context information to this code completion.
Definition at line 482 of file CodeCompleteConsumer.cpp.
References clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isTranslationUnit().
void CodeCompletionBuilder::AddPlaceholderChunk | ( | const char * | Placeholder | ) |
Add a new placeholder chunk.
Definition at line 460 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreatePlaceholder().
Referenced by AddLambdaCompletion(), AddOverloadParameterChunks(), and clang::SemaCodeCompletion::CodeCompleteObjCPropertyFlags().
void CodeCompletionBuilder::AddResultTypeChunk | ( | const char * | ResultType | ) |
Add a new result-type chunk.
Definition at line 468 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateResultType().
void CodeCompletionBuilder::AddTextChunk | ( | const char * | Text | ) |
Add a new text chunk.
Definition at line 452 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::Chunk::CreateText(), and Text.
Referenced by AddLambdaCompletion(), and clang::SemaCodeCompletion::CodeCompleteObjCPropertyFlags().
void CodeCompletionBuilder::AddTypedTextChunk | ( | const char * | Text | ) |
Add a new typed-text chunk.
Definition at line 448 of file CodeCompleteConsumer.cpp.
References clang::CodeCompletionString::CK_TypedText, and Text.
Referenced by clang::SemaCodeCompletion::CodeCompleteObjCPropertyFlags().
|
inline |
Retrieve the allocator into which the code completion strings should be allocated.
Definition at line 716 of file CodeCompleteConsumer.h.
Referenced by AddLambdaCompletion().
|
inline |
Definition at line 754 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 718 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 757 of file CodeCompleteConsumer.h.
CodeCompletionString * CodeCompletionBuilder::TakeString | ( | ) |
Take the resulting completion string.
This operation can only be performed once.
Definition at line 436 of file CodeCompleteConsumer.cpp.
References Priority, and clang::Result.
Referenced by AddFunctionParameterChunks(), AddLambdaCompletion(), AddOverloadParameterChunks(), AddTemplateParameterChunks(), clang::SemaCodeCompletion::CodeCompleteObjCPropertyFlags(), and createTemplateSignatureString().