9#ifndef LLVM_CLANG_AST_INTERP_DECLOREXPR_H
10#define LLVM_CLANG_AST_INTERP_DECLOREXPR_H
15#include "llvm/ADT/PointerUnion.h"
21 llvm::PointerUnion<const Decl *, const Expr *>
V;
28 bool isExpr()
const {
return isa_and_nonnull<const Expr *>(
V); }
29 bool isDecl()
const {
return isa_and_nonnull<const Decl *>(
V); }
35 return dyn_cast_if_present<ValueDecl>(
asDecl());
38 return dyn_cast_if_present<VarDecl>(
asDecl());
45 explicit operator bool()
const {
return !
V.isNull(); }
53static_assert(
sizeof(DeclOrExpr) ==
sizeof(
void *));
C Language Family Type Representation.
Decl - This represents one declaration (or definition), e.g.
This represents one expression.
A (possibly-)qualified type.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
DeclOrExpr getSwappedBytes(DeclOrExpr F)
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const Boolean &B)
The JSON file list parser is used to communicate input to InstallAPI.
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
bool operator!=(DeclOrExpr O) const
const Decl * asDecl() const
DeclOrExpr(const Expr *E)
const ValueDecl * asValueDecl() const
const VarDecl * asVarDecl() const
const Expr * asExpr() const
bool operator==(DeclOrExpr O) const
DeclOrExpr(const Decl *VD)
const void * getOpaqueValue() const
llvm::PointerUnion< const Decl *, const Expr * > V
DeclOrExpr(std::nullptr_t)