class CodeCompletionString

Declaration

class CodeCompletionString { /* full declaration omitted */ };

Description

A "string" used to describe how code completion can be performed for an entity. A code completion string typically shows how a particular entity can be used. For example, the code completion string for a function would show the syntax to call it, including the parentheses, placeholders for the arguments, etc.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:442

Member Variables

private unsigned int NumChunks
The number of chunks stored in this string.
private unsigned int NumAnnotations
The number of annotations for this code-completion result.
private unsigned int Priority
The priority of this code-completion string.
private unsigned int Availability
The availability of this code-completion result.
private llvm::StringRef ParentName
The name of the parent context.
private const char* BriefComment
A brief documentation comment attached to the declaration of entity being completed by this result.

Method Overview

Methods

CodeCompletionString(
    const clang::CodeCompletionString::Chunk*
        Chunks,
    unsigned int NumChunks,
    unsigned int Priority,
    CXAvailabilityKind Availability,
    const char** Annotations,
    unsigned int NumAnnotations,
    llvm::StringRef ParentName,
    const char* BriefComment)

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:586

Parameters

const clang::CodeCompletionString::Chunk* Chunks
unsigned int NumChunks
unsigned int Priority
CXAvailabilityKind Availability
const char** Annotations
unsigned int NumAnnotations
llvm::StringRef ParentName
const char* BriefComment

CodeCompletionString(
    const clang::CodeCompletionString&)

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:594

Parameters

const clang::CodeCompletionString&

clang::CodeCompletionString::iterator begin()
    const

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:599

bool empty() const

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:601

clang::CodeCompletionString::iterator end() const

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:600

std::string getAllTypedText() const

Description

Returns the combined text from all TypedText chunks.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:613

const char* getAnnotation(
    unsigned int AnnotationNr) const

Description

Retrieve the annotation string specified by \c AnnotationNr.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:625

Parameters

unsigned int AnnotationNr

unsigned int getAnnotationCount() const

Description

Retrieve the number of annotations for this code completion result.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:622

std::string getAsString() const

Description

Retrieve a string representation of the code completion string, which is mainly useful for debugging.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:638

unsigned int getAvailability() const

Description

Retrieve the availability of this code completion result.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:619

const char* getBriefComment() const

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:632

llvm::StringRef getParentContextName() const

Description

Retrieve the name of the parent context.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:628

unsigned int getPriority() const

Description

Retrieve the priority of this code completion result.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:616

const char* getTypedText() const

Description

Returns the text in the first TypedText chunk.

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:610

unsigned int size() const

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:602

~CodeCompletionString()

Declared at: clang/include/clang/Sema/CodeCompleteConsumer.h:591