clang 20.0.0git
|
A simple code-completion consumer that prints the results it receives in a simple format. More...
#include "clang/Sema/CodeCompleteConsumer.h"
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. | |
void | ProcessCodeCompleteResults (Sema &S, CodeCompletionContext Context, CodeCompletionResult *Results, unsigned NumResults) override |
Prints the finalized code-completion results. | |
void | ProcessOverloadCandidates (Sema &S, unsigned CurrentArg, OverloadCandidate *Candidates, unsigned NumCandidates, SourceLocation OpenParLoc, bool Braced) override |
bool | isResultFilteredOut (StringRef Filter, CodeCompletionResult Results) override |
CodeCompletionAllocator & | getAllocator () override |
Retrieve the allocator that will be used to allocate code completion strings. | |
CodeCompletionTUInfo & | getCodeCompletionTUInfo () override |
Public Member Functions inherited from clang::CodeCompleteConsumer | |
CodeCompleteConsumer (const CodeCompleteOptions &CodeCompleteOpts) | |
bool | includeMacros () const |
Whether the code-completion consumer wants to see macros. | |
bool | includeCodePatterns () const |
Whether the code-completion consumer wants to see code patterns. | |
bool | includeGlobals () const |
Whether to include global (top-level) declaration results. | |
bool | includeNamespaceLevelDecls () const |
Whether to include declarations in namespace contexts (including the global namespace). | |
bool | includeBriefComments () const |
Whether to include brief documentation comments within the set of code completions returned. | |
bool | includeFixIts () const |
Whether to include completion items with small fix-its, e.g. | |
bool | loadExternal () const |
Hint whether to load data from the external AST in order to provide full results. | |
virtual | ~CodeCompleteConsumer () |
Deregisters and destroys this code-completion consumer. | |
Additional Inherited Members | |
Protected Attributes inherited from clang::CodeCompleteConsumer | |
const CodeCompleteOptions | CodeCompleteOpts |
A simple code-completion consumer that prints the results it receives in a simple format.
Definition at line 1262 of file CodeCompleteConsumer.h.
|
inline |
Create a new printing code-completion consumer that prints its results to the given raw output stream.
Definition at line 1271 of file CodeCompleteConsumer.h.
|
inlineoverridevirtual |
Retrieve the allocator that will be used to allocate code completion strings.
Implements clang::CodeCompleteConsumer.
Definition at line 1289 of file CodeCompleteConsumer.h.
References clang::CodeCompletionTUInfo::getAllocator().
|
inlineoverridevirtual |
Implements clang::CodeCompleteConsumer.
Definition at line 1293 of file CodeCompleteConsumer.h.
|
overridevirtual |
Reimplemented from clang::CodeCompleteConsumer.
Definition at line 629 of file CodeCompleteConsumer.cpp.
References clang::Result, clang::CodeCompletionResult::RK_Declaration, clang::CodeCompletionResult::RK_Keyword, clang::CodeCompletionResult::RK_Macro, and clang::CodeCompletionResult::RK_Pattern.
|
overridevirtual |
Prints the finalized code-completion results.
Reimplemented from clang::CodeCompleteConsumer.
Definition at line 647 of file CodeCompleteConsumer.cpp.
References clang::Preprocessor::getCodeCompletionFilter(), clang::Sema::getPreprocessor(), clang::Sema::LangOpts, clang::Lexer::MeasureTokenLength(), clang::CodeCompletionResult::RK_Declaration, clang::CodeCompletionResult::RK_Keyword, clang::CodeCompletionResult::RK_Macro, clang::CodeCompletionResult::RK_Pattern, SM, and clang::Sema::SourceMgr.
|
overridevirtual |
S | the semantic-analyzer object for which code-completion is being done. |
CurrentArg | the index of the current argument. |
Candidates | an array of overload candidates. |
NumCandidates | the number of overload candidates |
OpenParLoc | location of the opening parenthesis of the argument list. |
Reimplemented from clang::CodeCompleteConsumer.
Definition at line 755 of file CodeCompleteConsumer.cpp.
References getOverloadAsString(), clang::Sema::getSourceManager(), and clang::SourceLocation::print().