class PrintingCodeCompleteConsumer

Declaration

class PrintingCodeCompleteConsumer : public CodeCompleteConsumer { /* full declaration omitted */ };

Description

A simple code-completion consumer that prints the results it receives in a simple format.

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

Inherits from: CodeCompleteConsumer

Member Variables

private llvm::raw_ostream& OS
The raw output stream.
private clang::CodeCompletionTUInfo CCTUInfo

Inherited from CodeCompleteConsumer:

protected CodeCompleteOpts

Method Overview

  • public PrintingCodeCompleteConsumer(const clang::CodeCompleteOptions & CodeCompleteOpts, llvm::raw_ostream & OS)
  • public void ProcessCodeCompleteResults(clang::Sema & S, clang::CodeCompletionContext Context, clang::CodeCompletionResult * Results, unsigned int NumResults)
  • public void ProcessOverloadCandidates(clang::Sema & S, unsigned int CurrentArg, clang::CodeCompleteConsumer::OverloadCandidate * Candidates, unsigned int NumCandidates, clang::SourceLocation OpenParLoc, bool Braced)
  • public clang::CodeCompletionAllocator & getAllocator()
  • public clang::CodeCompletionTUInfo & getCodeCompletionTUInfo()
  • public bool isResultFilteredOut(llvm::StringRef Filter, clang::CodeCompletionResult Results)

Inherited from CodeCompleteConsumer:

Methods

PrintingCodeCompleteConsumer(
    const clang::CodeCompleteOptions&
        CodeCompleteOpts,
    llvm::raw_ostream& OS)

Description

Create a new printing code-completion consumer that prints its results to the given raw output stream.

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

Parameters

const clang::CodeCompleteOptions& CodeCompleteOpts
llvm::raw_ostream& OS

void ProcessCodeCompleteResults(
    clang::Sema& S,
    clang::CodeCompletionContext Context,
    clang::CodeCompletionResult* Results,
    unsigned int NumResults)

Description

Prints the finalized code-completion results.

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

Parameters

clang::Sema& S
clang::CodeCompletionContext Context
clang::CodeCompletionResult* Results
unsigned int NumResults

void ProcessOverloadCandidates(
    clang::Sema& S,
    unsigned int CurrentArg,
    clang::CodeCompleteConsumer::
        OverloadCandidate* Candidates,
    unsigned int NumCandidates,
    clang::SourceLocation OpenParLoc,
    bool Braced)

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

Parameters

clang::Sema& S
the semantic-analyzer object for which code-completion is being done.
unsigned int CurrentArg
the index of the current argument.
clang::CodeCompleteConsumer::OverloadCandidate* Candidates
an array of overload candidates.
unsigned int NumCandidates
the number of overload candidates
clang::SourceLocation OpenParLoc
location of the opening parenthesis of the argument list.
bool Braced

clang::CodeCompletionAllocator& getAllocator()

Description

Retrieve the allocator that will be used to allocate code completion strings.

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

clang::CodeCompletionTUInfo&
getCodeCompletionTUInfo()

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

bool isResultFilteredOut(
    llvm::StringRef Filter,
    clang::CodeCompletionResult Results)

Description

Check if the result should be filtered out.

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

Parameters

llvm::StringRef Filter
clang::CodeCompletionResult Results