clang  8.0.0svn
Public Member Functions | List of all members
clang::PrintingCodeCompleteConsumer Class Reference

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

#include "clang/Sema/CodeCompleteConsumer.h"

Inheritance diagram for clang::PrintingCodeCompleteConsumer:
Inheritance graph
[legend]
Collaboration diagram for clang::PrintingCodeCompleteConsumer:
Collaboration graph
[legend]

Public Member Functions

 PrintingCodeCompleteConsumer (const CodeCompleteOptions &CodeCompleteOpts, raw_ostream &OS)
 Create a new printing code-completion consumer that prints its results to the given raw output stream. More...
 
void ProcessCodeCompleteResults (Sema &S, CodeCompletionContext Context, CodeCompletionResult *Results, unsigned NumResults) override
 Prints the finalized code-completion results. More...
 
void ProcessOverloadCandidates (Sema &S, unsigned CurrentArg, OverloadCandidate *Candidates, unsigned NumCandidates, SourceLocation OpenParLoc) override
 
bool isResultFilteredOut (StringRef Filter, CodeCompletionResult Results) override
 
CodeCompletionAllocatorgetAllocator () override
 Retrieve the allocator that will be used to allocate code completion strings. More...
 
CodeCompletionTUInfogetCodeCompletionTUInfo () override
 
- Public Member Functions inherited from clang::CodeCompleteConsumer
 CodeCompleteConsumer (const CodeCompleteOptions &CodeCompleteOpts, bool OutputIsBinary)
 
bool includeMacros () const
 Whether the code-completion consumer wants to see macros. More...
 
bool includeCodePatterns () const
 Whether the code-completion consumer wants to see code patterns. More...
 
bool includeGlobals () const
 Whether to include global (top-level) declaration results. More...
 
bool includeNamespaceLevelDecls () const
 Whether to include declarations in namespace contexts (including the global namespace). More...
 
bool includeBriefComments () const
 Whether to include brief documentation comments within the set of code completions returned. More...
 
bool includeFixIts () const
 Whether to include completion items with small fix-its, e.g. More...
 
bool loadExternal () const
 Hint whether to load data from the external AST in order to provide full results. More...
 
bool isOutputBinary () const
 Determine whether the output of this consumer is binary. More...
 
virtual ~CodeCompleteConsumer ()
 Deregisters and destroys this code-completion consumer. More...
 

Additional Inherited Members

- Protected Attributes inherited from clang::CodeCompleteConsumer
const CodeCompleteOptions CodeCompleteOpts
 
bool OutputIsBinary
 Whether the output format for the code-completion consumer is binary. More...
 

Detailed Description

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

Definition at line 1163 of file CodeCompleteConsumer.h.

Constructor & Destructor Documentation

◆ PrintingCodeCompleteConsumer()

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

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

Definition at line 1172 of file CodeCompleteConsumer.h.

Member Function Documentation

◆ getAllocator()

CodeCompletionAllocator& clang::PrintingCodeCompleteConsumer::getAllocator ( )
inlineoverridevirtual

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

Implements clang::CodeCompleteConsumer.

Definition at line 1189 of file CodeCompleteConsumer.h.

References clang::CodeCompletionTUInfo::getAllocator().

◆ getCodeCompletionTUInfo()

CodeCompletionTUInfo& clang::PrintingCodeCompleteConsumer::getCodeCompletionTUInfo ( )
inlineoverridevirtual

Implements clang::CodeCompleteConsumer.

Definition at line 1193 of file CodeCompleteConsumer.h.

◆ isResultFilteredOut()

bool PrintingCodeCompleteConsumer::isResultFilteredOut ( StringRef  Filter,
CodeCompletionResult  Results 
)
overridevirtual

◆ ProcessCodeCompleteResults()

void PrintingCodeCompleteConsumer::ProcessCodeCompleteResults ( Sema S,
CodeCompletionContext  Context,
CodeCompletionResult Results,
unsigned  NumResults 
)
overridevirtual

Prints the finalized code-completion results.

Reimplemented from clang::CodeCompleteConsumer.

Definition at line 535 of file CodeCompleteConsumer.cpp.

◆ ProcessOverloadCandidates()

void PrintingCodeCompleteConsumer::ProcessOverloadCandidates ( Sema S,
unsigned  CurrentArg,
OverloadCandidate Candidates,
unsigned  NumCandidates,
SourceLocation  OpenParLoc 
)
overridevirtual
Parameters
Sthe semantic-analyzer object for which code-completion is being done.
CurrentArgthe index of the current argument.
Candidatesan array of overload candidates.
NumCandidatesthe number of overload candidates
OpenParLoclocation of the opening parenthesis of the argument list.

Reimplemented from clang::CodeCompleteConsumer.

Definition at line 636 of file CodeCompleteConsumer.cpp.

References clang::Sema::getSourceManager(), and clang::SourceLocation::print().


The documentation for this class was generated from the following files: