clang 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::interp::Boolean Class Referencefinal

Wrapper around boolean types. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/Interp/Boolean.h"

Public Member Functions

 Boolean ()
 Zero-initializes a boolean.
 
 Boolean (bool V)
 
bool operator< (Boolean RHS) const
 
bool operator> (Boolean RHS) const
 
bool operator<= (Boolean RHS) const
 
bool operator>= (Boolean RHS) const
 
bool operator== (Boolean RHS) const
 
bool operator!= (Boolean RHS) const
 
bool operator> (unsigned RHS) const
 
Boolean operator- () const
 
Boolean operator- (const Boolean &Other) const
 
Boolean operator~ () const
 
 operator int8_t () const
 
 operator uint8_t () const
 
 operator int16_t () const
 
 operator uint16_t () const
 
 operator int32_t () const
 
 operator uint32_t () const
 
 operator int64_t () const
 
 operator uint64_t () const
 
 operator bool () const
 
APSInt toAPSInt () const
 
APSInt toAPSInt (unsigned NumBits) const
 
APValue toAPValue () const
 
Boolean toUnsigned () const
 
bool isZero () const
 
bool isMin () const
 
ComparisonCategoryResult compare (const Boolean &RHS) const
 
unsigned countLeadingZeros () const
 
Boolean truncate (unsigned TruncBits) const
 
void print (llvm::raw_ostream &OS) const
 
std::string toDiagnosticString (const ASTContext &Ctx) const
 

Static Public Member Functions

static constexpr unsigned bitWidth ()
 
static constexpr bool isMinusOne ()
 
static constexpr bool isSigned ()
 
static constexpr bool isNegative ()
 
static constexpr bool isPositive ()
 
static Boolean min (unsigned NumBits)
 
static Boolean max (unsigned NumBits)
 
template<typename T >
static Boolean from (T Value)
 
template<unsigned SrcBits, bool SrcSign>
static std::enable_if_t< SrcBits !=0, Booleanfrom (Integral< SrcBits, SrcSign > Value)
 
static Boolean zero ()
 
template<typename T >
static Boolean from (T Value, unsigned NumBits)
 
static bool inRange (int64_t Value, unsigned NumBits)
 
static bool increment (Boolean A, Boolean *R)
 
static bool decrement (Boolean A, Boolean *R)
 
static bool add (Boolean A, Boolean B, unsigned OpBits, Boolean *R)
 
static bool sub (Boolean A, Boolean B, unsigned OpBits, Boolean *R)
 
static bool mul (Boolean A, Boolean B, unsigned OpBits, Boolean *R)
 
static bool inv (Boolean A, Boolean *R)
 
static bool neg (Boolean A, Boolean *R)
 

Detailed Description

Wrapper around boolean types.

Definition at line 25 of file Boolean.h.

Constructor & Destructor Documentation

◆ Boolean() [1/2]

clang::interp::Boolean::Boolean ( )
inline

Zero-initializes a boolean.

Definition at line 32 of file Boolean.h.

References V.

Referenced by add(), from(), increment(), inv(), max(), min(), mul(), neg(), operator-(), operator~(), and sub().

◆ Boolean() [2/2]

clang::interp::Boolean::Boolean ( bool  V)
inlineexplicit

Definition at line 33 of file Boolean.h.

References V.

Member Function Documentation

◆ add()

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

Definition at line 130 of file Boolean.h.

References Boolean().

◆ bitWidth()

static constexpr unsigned clang::interp::Boolean::bitWidth ( )
inlinestaticconstexpr

Definition at line 68 of file Boolean.h.

◆ compare()

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

Definition at line 79 of file Boolean.h.

References clang::interp::Compare(), and V.

◆ countLeadingZeros()

unsigned clang::interp::Boolean::countLeadingZeros ( ) const
inline

Definition at line 83 of file Boolean.h.

References V.

◆ decrement()

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

Definition at line 126 of file Boolean.h.

◆ from() [1/3]

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

Definition at line 106 of file Boolean.h.

References Boolean().

◆ from() [2/3]

template<typename T >
static Boolean clang::interp::Boolean::from ( Value)
inlinestatic

◆ from() [3/3]

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

Definition at line 113 of file Boolean.h.

References Boolean().

◆ increment()

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

Definition at line 121 of file Boolean.h.

References Boolean().

◆ inRange()

static bool clang::interp::Boolean::inRange ( int64_t  Value,
unsigned  NumBits 
)
inlinestatic

Definition at line 117 of file Boolean.h.

◆ inv()

static bool clang::interp::Boolean::inv ( Boolean  A,
Boolean R 
)
inlinestatic

Definition at line 145 of file Boolean.h.

References Boolean().

Referenced by clang::interp::Inv().

◆ isMin()

bool clang::interp::Boolean::isMin ( ) const
inline

Definition at line 70 of file Boolean.h.

References isZero().

◆ isMinusOne()

static constexpr bool clang::interp::Boolean::isMinusOne ( )
inlinestaticconstexpr

Definition at line 72 of file Boolean.h.

◆ isNegative()

static constexpr bool clang::interp::Boolean::isNegative ( )
inlinestaticconstexpr

Definition at line 76 of file Boolean.h.

Referenced by isPositive().

◆ isPositive()

static constexpr bool clang::interp::Boolean::isPositive ( )
inlinestaticconstexpr

Definition at line 77 of file Boolean.h.

References isNegative().

◆ isSigned()

static constexpr bool clang::interp::Boolean::isSigned ( )
inlinestaticconstexpr

Definition at line 74 of file Boolean.h.

◆ isZero()

bool clang::interp::Boolean::isZero ( ) const
inline

Definition at line 69 of file Boolean.h.

References V.

Referenced by isMin().

◆ max()

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

Definition at line 96 of file Boolean.h.

References Boolean().

◆ min()

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

Definition at line 95 of file Boolean.h.

References Boolean().

◆ mul()

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

Definition at line 140 of file Boolean.h.

References Boolean().

◆ neg()

static bool clang::interp::Boolean::neg ( Boolean  A,
Boolean R 
)
inlinestatic

Definition at line 150 of file Boolean.h.

References Boolean().

◆ operator bool()

clang::interp::Boolean::operator bool ( ) const
inlineexplicit

Definition at line 56 of file Boolean.h.

References V.

◆ operator int16_t()

clang::interp::Boolean::operator int16_t ( ) const
inlineexplicit

Definition at line 50 of file Boolean.h.

References V.

◆ operator int32_t()

clang::interp::Boolean::operator int32_t ( ) const
inlineexplicit

Definition at line 52 of file Boolean.h.

References V.

◆ operator int64_t()

clang::interp::Boolean::operator int64_t ( ) const
inlineexplicit

Definition at line 54 of file Boolean.h.

References V.

◆ operator int8_t()

clang::interp::Boolean::operator int8_t ( ) const
inlineexplicit

Definition at line 48 of file Boolean.h.

References V.

◆ operator uint16_t()

clang::interp::Boolean::operator uint16_t ( ) const
inlineexplicit

Definition at line 51 of file Boolean.h.

References V.

◆ operator uint32_t()

clang::interp::Boolean::operator uint32_t ( ) const
inlineexplicit

Definition at line 53 of file Boolean.h.

References V.

◆ operator uint64_t()

clang::interp::Boolean::operator uint64_t ( ) const
inlineexplicit

Definition at line 55 of file Boolean.h.

References V.

◆ operator uint8_t()

clang::interp::Boolean::operator uint8_t ( ) const
inlineexplicit

Definition at line 49 of file Boolean.h.

References V.

◆ operator!=()

bool clang::interp::Boolean::operator!= ( Boolean  RHS) const
inline

Definition at line 40 of file Boolean.h.

References V.

◆ operator-() [1/2]

Boolean clang::interp::Boolean::operator- ( ) const
inline

Definition at line 44 of file Boolean.h.

References Boolean(), and V.

◆ operator-() [2/2]

Boolean clang::interp::Boolean::operator- ( const Boolean Other) const
inline

Definition at line 45 of file Boolean.h.

References Boolean(), clang::Other, and V.

◆ operator<()

bool clang::interp::Boolean::operator< ( Boolean  RHS) const
inline

Definition at line 35 of file Boolean.h.

References V.

◆ operator<=()

bool clang::interp::Boolean::operator<= ( Boolean  RHS) const
inline

Definition at line 37 of file Boolean.h.

References V.

◆ operator==()

bool clang::interp::Boolean::operator== ( Boolean  RHS) const
inline

Definition at line 39 of file Boolean.h.

References V.

◆ operator>() [1/2]

bool clang::interp::Boolean::operator> ( Boolean  RHS) const
inline

Definition at line 36 of file Boolean.h.

References V.

◆ operator>() [2/2]

bool clang::interp::Boolean::operator> ( unsigned  RHS) const
inline

Definition at line 42 of file Boolean.h.

References V.

◆ operator>=()

bool clang::interp::Boolean::operator>= ( Boolean  RHS) const
inline

Definition at line 38 of file Boolean.h.

References V.

◆ operator~()

Boolean clang::interp::Boolean::operator~ ( ) const
inline

Definition at line 46 of file Boolean.h.

References Boolean().

◆ print()

void clang::interp::Boolean::print ( llvm::raw_ostream &  OS) const
inline

Definition at line 87 of file Boolean.h.

References V.

Referenced by clang::interp::operator<<(), and toDiagnosticString().

◆ sub()

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

Definition at line 135 of file Boolean.h.

References Boolean().

◆ toAPSInt() [1/2]

APSInt clang::interp::Boolean::toAPSInt ( ) const
inline

Definition at line 58 of file Boolean.h.

References V.

Referenced by toAPSInt(), and toAPValue().

◆ toAPSInt() [2/2]

APSInt clang::interp::Boolean::toAPSInt ( unsigned  NumBits) const
inline

Definition at line 61 of file Boolean.h.

References toAPSInt().

◆ toAPValue()

APValue clang::interp::Boolean::toAPValue ( ) const
inline

Definition at line 64 of file Boolean.h.

References toAPSInt().

◆ toDiagnosticString()

std::string clang::interp::Boolean::toDiagnosticString ( const ASTContext Ctx) const
inline

Definition at line 88 of file Boolean.h.

References print().

◆ toUnsigned()

Boolean clang::interp::Boolean::toUnsigned ( ) const
inline

Definition at line 66 of file Boolean.h.

◆ truncate()

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

Definition at line 85 of file Boolean.h.

◆ zero()

static Boolean clang::interp::Boolean::zero ( )
inlinestatic

Definition at line 110 of file Boolean.h.

References from().


The documentation for this class was generated from the following file: