18 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_EXPECTED_TYPES_H 19 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_EXPECTED_TYPES_H 21 #include "clang/AST/Type.h" 22 #include "llvm/ADT/StringRef.h" 25 class CodeCompletionResult;
37 static llvm::Optional<OpaqueType>
41 static llvm::Optional<OpaqueType>
fromType(ASTContext &Ctx, QualType
Type);
47 llvm::StringRef
raw()
const {
return Data; }
50 return L.Data == R.Data;
57 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.