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