class Boolean

Declaration

class Boolean { /* full declaration omitted */ };

Description

Wrapper around boolean types.

Declared at: clang/lib/AST/Interp/Boolean.h:25

Member Variables

private bool V
Underlying boolean.

Method Overview

  • public Boolean()
  • private Boolean(bool V)
  • public static bool add(clang::interp::Boolean A, clang::interp::Boolean B, unsigned int OpBits, clang::interp::Boolean * R)
  • public static constexpr unsigned int bitWidth()
  • public clang::ComparisonCategoryResult compare(const clang::interp::Boolean & RHS) const
  • public unsigned int countLeadingZeros() const
  • public static bool decrement(clang::interp::Boolean A, clang::interp::Boolean * R)
  • public template <typename T>static clang::interp::Boolean from(T Value, unsigned int NumBits)
  • public template <typename T>static std::enable_if_t<std::is_integral<T>::value, Boolean> from(T Value)
  • public template <unsigned int SrcBits, bool SrcSign>static std::enable_if_t<SrcBits != 0, Boolean> from(Integral<SrcBits, SrcSign> Value)
  • public template <bool SrcSign>static clang::interp::Boolean from(Integral<0, SrcSign> Value)
  • public static bool inRange(int64_t Value, unsigned int NumBits)
  • public static bool increment(clang::interp::Boolean A, clang::interp::Boolean * R)
  • public bool isMin() const
  • public static constexpr bool isMinusOne()
  • public static constexpr bool isNegative()
  • public static constexpr bool isPositive()
  • public static constexpr bool isSigned()
  • public bool isZero() const
  • public static clang::interp::Boolean max(unsigned int NumBits)
  • public static clang::interp::Boolean min(unsigned int NumBits)
  • public static bool mul(clang::interp::Boolean A, clang::interp::Boolean B, unsigned int OpBits, clang::interp::Boolean * R)
  • public int64_t operator long() const
  • public unsigned int operator unsigned int() const
  • public uint64_t operator unsigned long() const
  • public void print(llvm::raw_ostream & OS) const
  • public static bool sub(clang::interp::Boolean A, clang::interp::Boolean B, unsigned int OpBits, clang::interp::Boolean * R)
  • public clang::interp::APSInt toAPSInt() const
  • public clang::interp::APSInt toAPSInt(unsigned int NumBits) const
  • public clang::APValue toAPValue() const
  • public clang::interp::Boolean toUnsigned() const
  • public clang::interp::Boolean truncate(unsigned int TruncBits) const
  • public static clang::interp::Boolean zero()

Methods

Boolean()

Description

Zero-initializes a boolean.

Declared at: clang/lib/AST/Interp/Boolean.h:35

Boolean(bool V)

Description

Construct a wrapper from a boolean.

Declared at: clang/lib/AST/Interp/Boolean.h:31

Parameters

bool V

static bool add(clang::interp::Boolean A,
                clang::interp::Boolean B,
                unsigned int OpBits,
                clang::interp::Boolean* R)

Declared at: clang/lib/AST/Interp/Boolean.h:123

Parameters

clang::interp::Boolean A
clang::interp::Boolean B
unsigned int OpBits
clang::interp::Boolean* R

static constexpr unsigned int bitWidth()

Declared at: clang/lib/AST/Interp/Boolean.h:63

clang::ComparisonCategoryResult compare(
    const clang::interp::Boolean& RHS) const

Declared at: clang/lib/AST/Interp/Boolean.h:74

Parameters

const clang::interp::Boolean& RHS

unsigned int countLeadingZeros() const

Declared at: clang/lib/AST/Interp/Boolean.h:78

static bool decrement(clang::interp::Boolean A,
                      clang::interp::Boolean* R)

Declared at: clang/lib/AST/Interp/Boolean.h:119

Parameters

clang::interp::Boolean A
clang::interp::Boolean* R

template <typename T>
static clang::interp::Boolean from(
    T Value,
    unsigned int NumBits)

Declared at: clang/lib/AST/Interp/Boolean.h:106

Templates

T

Parameters

T Value
unsigned int NumBits

template <typename T>
static std::enable_if_t<
    std::is_integral<T>::value,
    Boolean>
from(T Value)

Declared at: clang/lib/AST/Interp/Boolean.h:88

Templates

T

Parameters

T Value

template <unsigned int SrcBits, bool SrcSign>
static std::enable_if_t<SrcBits != 0, Boolean>
from(Integral<SrcBits, SrcSign> Value)

Declared at: clang/lib/AST/Interp/Boolean.h:94

Templates

unsigned int SrcBits
bool SrcSign

Parameters

Integral<SrcBits, SrcSign> Value

template <bool SrcSign>
static clang::interp::Boolean from(
    Integral<0, SrcSign> Value)

Declared at: clang/lib/AST/Interp/Boolean.h:99

Templates

bool SrcSign

Parameters

Integral<0, SrcSign> Value

static bool inRange(int64_t Value,
                    unsigned int NumBits)

Declared at: clang/lib/AST/Interp/Boolean.h:110

Parameters

int64_t Value
unsigned int NumBits

static bool increment(clang::interp::Boolean A,
                      clang::interp::Boolean* R)

Declared at: clang/lib/AST/Interp/Boolean.h:114

Parameters

clang::interp::Boolean A
clang::interp::Boolean* R

bool isMin() const

Declared at: clang/lib/AST/Interp/Boolean.h:65

static constexpr bool isMinusOne()

Declared at: clang/lib/AST/Interp/Boolean.h:67

static constexpr bool isNegative()

Declared at: clang/lib/AST/Interp/Boolean.h:71

static constexpr bool isPositive()

Declared at: clang/lib/AST/Interp/Boolean.h:72

static constexpr bool isSigned()

Declared at: clang/lib/AST/Interp/Boolean.h:69

bool isZero() const

Declared at: clang/lib/AST/Interp/Boolean.h:64

static clang::interp::Boolean max(
    unsigned int NumBits)

Declared at: clang/lib/AST/Interp/Boolean.h:85

Parameters

unsigned int NumBits

static clang::interp::Boolean min(
    unsigned int NumBits)

Declared at: clang/lib/AST/Interp/Boolean.h:84

Parameters

unsigned int NumBits

static bool mul(clang::interp::Boolean A,
                clang::interp::Boolean B,
                unsigned int OpBits,
                clang::interp::Boolean* R)

Declared at: clang/lib/AST/Interp/Boolean.h:133

Parameters

clang::interp::Boolean A
clang::interp::Boolean B
unsigned int OpBits
clang::interp::Boolean* R

int64_t operator long() const

Declared at: clang/lib/AST/Interp/Boolean.h:50

unsigned int operator unsigned int() const

Declared at: clang/lib/AST/Interp/Boolean.h:49

uint64_t operator unsigned long() const

Declared at: clang/lib/AST/Interp/Boolean.h:51

void print(llvm::raw_ostream& OS) const

Declared at: clang/lib/AST/Interp/Boolean.h:82

Parameters

llvm::raw_ostream& OS

static bool sub(clang::interp::Boolean A,
                clang::interp::Boolean B,
                unsigned int OpBits,
                clang::interp::Boolean* R)

Declared at: clang/lib/AST/Interp/Boolean.h:128

Parameters

clang::interp::Boolean A
clang::interp::Boolean B
unsigned int OpBits
clang::interp::Boolean* R

clang::interp::APSInt toAPSInt() const

Declared at: clang/lib/AST/Interp/Boolean.h:53

clang::interp::APSInt toAPSInt(
    unsigned int NumBits) const

Declared at: clang/lib/AST/Interp/Boolean.h:56

Parameters

unsigned int NumBits

clang::APValue toAPValue() const

Declared at: clang/lib/AST/Interp/Boolean.h:59

clang::interp::Boolean toUnsigned() const

Declared at: clang/lib/AST/Interp/Boolean.h:61

clang::interp::Boolean truncate(
    unsigned int TruncBits) const

Declared at: clang/lib/AST/Interp/Boolean.h:80

Parameters

unsigned int TruncBits

static clang::interp::Boolean zero()

Declared at: clang/lib/AST/Interp/Boolean.h:103