clang-tools 20.0.0git
|
A representation of a type that can be computed based on clang AST and compared for equality. More...
#include <ExpectedTypes.h>
Public Member Functions | |
llvm::StringRef | raw () const |
Get the raw byte representation of the type. | |
Static Public Member Functions | |
static std::optional< OpaqueType > | fromCompletionResult (ASTContext &Ctx, const CodeCompletionResult &R) |
Create a type from a code completion result. | |
static std::optional< OpaqueType > | fromType (ASTContext &Ctx, QualType Type) |
Construct an instance from a clang::QualType. | |
Friends | |
bool | operator== (const OpaqueType &L, const OpaqueType &R) |
bool | operator!= (const OpaqueType &L, const OpaqueType &R) |
A representation of a type that can be computed based on clang AST and compared for equality.
The encoding is stable between different ASTs, this allows the representation to be stored in the index and compared with types coming from a different AST later. OpaqueType is a strongly-typedefed std::string, you can get the underlying string with raw().
Definition at line 35 of file ExpectedTypes.h.
|
static |
Create a type from a code completion result.
Definition at line 84 of file ExpectedTypes.cpp.
|
static |
Construct an instance from a clang::QualType.
This is usually a PreferredType from a clang's completion context.
Definition at line 79 of file ExpectedTypes.cpp.
References Type.
|
inline |
Get the raw byte representation of the type.
You can only rely on the types being equal iff their raw representation is the same. The particular details of the used encoding might change over time and one should not rely on it.
Definition at line 48 of file ExpectedTypes.h.
|
friend |
Definition at line 53 of file ExpectedTypes.h.
|
friend |
Definition at line 50 of file ExpectedTypes.h.