clang-tools
15.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. More... | |
Static Public Member Functions | |
static llvm::Optional< OpaqueType > | fromCompletionResult (ASTContext &Ctx, const CodeCompletionResult &R) |
Create a type from a code completion result. More... | |
static llvm::Optional< OpaqueType > | fromType (ASTContext &Ctx, QualType Type) |
Construct an instance from a clang::QualType. More... | |
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 34 of file ExpectedTypes.h.
|
static |
Create a type from a code completion result.
Definition at line 86 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 80 of file ExpectedTypes.cpp.
|
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 47 of file ExpectedTypes.h.
|
friend |
Definition at line 52 of file ExpectedTypes.h.
|
friend |
Definition at line 49 of file ExpectedTypes.h.