19 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_EXPECTED_TYPES_H 20 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_EXPECTED_TYPES_H 22 #include "clang/AST/Type.h" 23 #include "llvm/ADT/StringRef.h" 26 class CodeCompletionResult;
38 static llvm::Optional<OpaqueType>
42 static llvm::Optional<OpaqueType>
fromType(ASTContext &Ctx, QualType Type);
48 llvm::StringRef
raw()
const {
return Data; }
51 return L.Data == R.Data;
58 static llvm::Optional<OpaqueType> encode(ASTContext &Ctx, QualType Type);
A representation of a type that can be computed based on clang AST and compared for equality...
static llvm::Optional< OpaqueType > fromType(ASTContext &Ctx, QualType Type)
Construct an instance from a clang::QualType.
friend bool operator==(const OpaqueType &L, const OpaqueType &R)
llvm::StringRef raw() const
Get the raw byte representation of the type.
friend bool operator!=(const OpaqueType &L, const OpaqueType &R)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
static llvm::Optional< OpaqueType > fromCompletionResult(ASTContext &Ctx, const CodeCompletionResult &R)
Create a type from a code completion result.