clang 20.0.0git
|
The class CompletionContextHandler contains four interfaces, each of which handles one type of completion result. More...
Public Member Functions | |
CompletionContextHandler (Sema &S, CodeCompletionContext CCC, std::vector< std::string > &Results) | |
virtual | ~CompletionContextHandler ()=default |
virtual void | handleDeclaration (const CodeCompletionResult &Result) |
Converts a Declaration completion result to a completion string, and then stores it in Results. | |
virtual void | handleKeyword (const CodeCompletionResult &Result) |
Converts a Keyword completion result to a completion string, and then stores it in Results. | |
virtual void | handlePattern (const CodeCompletionResult &Result) |
Converts a Pattern completion result to a completion string, and then stores it in Results. | |
virtual void | handleMacro (const CodeCompletionResult &Result) |
Converts a Macro completion result to a completion string, and then stores it in Results. | |
Protected Attributes | |
CodeCompletionContext | CCC |
std::vector< std::string > & | Results |
The class CompletionContextHandler contains four interfaces, each of which handles one type of completion result.
Its derived classes are used to create concrete handlers based on CodeCompletionContext
.
Definition at line 73 of file CodeCompletion.cpp.
|
inline |
Definition at line 82 of file CodeCompletion.cpp.
|
virtualdefault |
|
inlinevirtual |
Converts a Declaration completion result to a completion string, and then stores it in Results.
Reimplemented in clang::DotMemberAccessHandler.
Definition at line 89 of file CodeCompletion.cpp.
References clang::Type::castAs(), CCC, getPointeeType(), clang::CodeCompletionContext::getPreferredType(), clang::Sema::Ref_Compatible, clang::Sema::Ref_Incompatible, clang::Sema::Ref_Related, clang::Result, and Results.
|
inlinevirtual |
Converts a Keyword completion result to a completion string, and then stores it in Results.
Reimplemented in clang::DotMemberAccessHandler.
Definition at line 120 of file CodeCompletion.cpp.
References CCC, clang::CodeCompletionContext::getBaseType(), clang::CodeCompletionContext::getPreferredType(), clang::QualType::isNull(), clang::Result, and Results.
|
inlinevirtual |
Converts a Macro completion result to a completion string, and then stores it in Results.
Definition at line 136 of file CodeCompletion.cpp.
|
inlinevirtual |
Converts a Pattern completion result to a completion string, and then stores it in Results.
Definition at line 132 of file CodeCompletion.cpp.
|
protected |
Definition at line 75 of file CodeCompletion.cpp.
Referenced by handleDeclaration(), clang::DotMemberAccessHandler::handleDeclaration(), and handleKeyword().
|
protected |
Definition at line 76 of file CodeCompletion.cpp.
Referenced by handleDeclaration(), clang::DotMemberAccessHandler::handleDeclaration(), and handleKeyword().