clang 23.0.0git
clang::interp::Char< Signed > Class Template Referencefinal

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Char.h"

Inheritance diagram for clang::interp::Char< Signed >:
[legend]

Public Types

using AsUnsigned = Char<false>

Public Member Functions

constexpr Char ()=default
constexpr Char (ReprT V)
 Char (const APSInt &V)
constexpr bool isMin () const
constexpr bool isNegative () const
constexpr bool isPositive () const
constexpr bool isZero () const
constexpr bool isMinusOne () const
template<typename Ty, typename = std::enable_if_t<std::is_integral_v<Ty>>>
 operator Ty () const
bool operator< (Char RHS) const
bool operator> (Char RHS) const
bool operator<= (Char RHS) const
bool operator>= (Char RHS) const
bool operator== (Char RHS) const
bool operator!= (Char RHS) const
bool operator>= (unsigned RHS) const
bool operator> (unsigned RHS) const
Char operator- () const
Char operator- (Char Other) const
ComparisonCategoryResult compare (Char RHS) const
void bitcastToMemory (std::byte *Dest) const
APSInt toAPSInt () const
APSInt toAPSInt (unsigned BitWidth) const
APInt toAPInt (unsigned BitWidth) const
APValue toAPValue (const ASTContext &) const
std::string toDiagnosticString (const ASTContext &Ctx) const
Char< falsetoUnsigned () const
Char truncate (unsigned TruncBits) const
unsigned countLeadingZeros () const
void print (llvm::raw_ostream &OS) const

Static Public Member Functions

template<typename T>
static Char from (T t)
template<typename T>
static Char from (T t, unsigned BitWidth)
static bool isSigned ()
static unsigned bitWidth ()
static bool isNumber ()
static Char zero (unsigned BitWidth=8)
static Char bitcastFromMemory (const std::byte *Src, unsigned BitWidth)
static bool increment (Char A, Char *R)
static bool decrement (Char A, Char *R)
static bool add (Char A, Char B, unsigned OpBits, Char *R)
static bool sub (Char A, Char B, unsigned OpBits, Char *R)
static bool mul (Char A, Char B, unsigned OpBits, Char *R)
static bool rem (Char A, Char B, unsigned OpBits, Char *R)
static bool div (Char A, Char B, unsigned OpBits, Char *R)
static bool bitAnd (Char A, Char B, unsigned OpBits, Char *R)
static bool bitOr (Char A, Char B, unsigned OpBits, Char *R)
static bool bitXor (Char A, Char B, unsigned OpBits, Char *R)
static bool neg (Char A, Char *R)
static bool comp (Char A, Char *R)
template<bool RHSSign>
static void shiftLeft (const Char A, const Char< RHSSign > B, unsigned OpBits, Char *R)
template<bool RHSSign>
static void shiftRight (const Char A, const Char< RHSSign > B, unsigned OpBits, Char *R)

Friends

template<bool OtherSigned>
class Char

Detailed Description

template<bool Signed>
class clang::interp::Char< Signed >

Definition at line 28 of file Char.h.

Member Typedef Documentation

◆ AsUnsigned

template<bool Signed>
using clang::interp::Char< Signed >::AsUnsigned = Char<false>

Definition at line 36 of file Char.h.

Constructor & Destructor Documentation

◆ Char() [1/3]

template<bool Signed>
clang::interp::Char< Signed >::Char ( )
constexprdefault

◆ Char() [2/3]

template<bool Signed>
clang::interp::Char< Signed >::Char ( ReprT V)
inlineconstexpr

Definition at line 39 of file Char.h.

◆ Char() [3/3]

template<bool Signed>
clang::interp::Char< Signed >::Char ( const APSInt & V)
inlineexplicit

Definition at line 41 of file Char.h.

Member Function Documentation

◆ add()

template<bool Signed>
bool clang::interp::Char< Signed >::add ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 148 of file Char.h.

Referenced by clang::interp::Char< false >::increment().

◆ bitAnd()

template<bool Signed>
bool clang::interp::Char< Signed >::bitAnd ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 170 of file Char.h.

◆ bitcastFromMemory()

template<bool Signed>
Char clang::interp::Char< Signed >::bitcastFromMemory ( const std::byte * Src,
unsigned BitWidth )
inlinestatic

Definition at line 92 of file Char.h.

◆ bitcastToMemory()

template<bool Signed>
void clang::interp::Char< Signed >::bitcastToMemory ( std::byte * Dest) const
inline

Definition at line 88 of file Char.h.

◆ bitOr()

template<bool Signed>
bool clang::interp::Char< Signed >::bitOr ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 175 of file Char.h.

◆ bitWidth()

template<bool Signed>
unsigned clang::interp::Char< Signed >::bitWidth ( )
inlinestatic

◆ bitXor()

template<bool Signed>
bool clang::interp::Char< Signed >::bitXor ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 180 of file Char.h.

◆ comp()

template<bool Signed>
bool clang::interp::Char< Signed >::comp ( Char< Signed > A,
Char< Signed > * R )
inlinestatic

Definition at line 193 of file Char.h.

◆ compare()

template<bool Signed>
ComparisonCategoryResult clang::interp::Char< Signed >::compare ( Char< Signed > RHS) const
inline

Definition at line 86 of file Char.h.

◆ countLeadingZeros()

template<bool Signed>
unsigned clang::interp::Char< Signed >::countLeadingZeros ( ) const
inline

Definition at line 131 of file Char.h.

◆ decrement()

template<bool Signed>
bool clang::interp::Char< Signed >::decrement ( Char< Signed > A,
Char< Signed > * R )
inlinestatic

Definition at line 144 of file Char.h.

◆ div()

template<bool Signed>
bool clang::interp::Char< Signed >::div ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 165 of file Char.h.

◆ from() [1/2]

template<bool Signed>
template<typename T>
Char clang::interp::Char< Signed >::from ( T t)
inlinestatic

Definition at line 44 of file Char.h.

◆ from() [2/2]

template<bool Signed>
template<typename T>
Char clang::interp::Char< Signed >::from ( T t,
unsigned BitWidth )
inlinestatic

Definition at line 47 of file Char.h.

◆ increment()

template<bool Signed>
bool clang::interp::Char< Signed >::increment ( Char< Signed > A,
Char< Signed > * R )
inlinestatic

Definition at line 140 of file Char.h.

◆ isMin()

template<bool Signed>
bool clang::interp::Char< Signed >::isMin ( ) const
inlineconstexpr

Definition at line 56 of file Char.h.

Referenced by clang::interp::Char< false >::neg().

◆ isMinusOne()

template<bool Signed>
bool clang::interp::Char< Signed >::isMinusOne ( ) const
inlineconstexpr

Definition at line 62 of file Char.h.

◆ isNegative()

template<bool Signed>
bool clang::interp::Char< Signed >::isNegative ( ) const
inlineconstexpr

Definition at line 59 of file Char.h.

Referenced by clang::interp::Char< false >::isPositive().

◆ isNumber()

template<bool Signed>
bool clang::interp::Char< Signed >::isNumber ( )
inlinestatic

Definition at line 53 of file Char.h.

◆ isPositive()

template<bool Signed>
bool clang::interp::Char< Signed >::isPositive ( ) const
inlineconstexpr

Definition at line 60 of file Char.h.

Referenced by clang::interp::Char< false >::countLeadingZeros().

◆ isSigned()

template<bool Signed>
bool clang::interp::Char< Signed >::isSigned ( )
inlinestatic

Definition at line 51 of file Char.h.

◆ isZero()

template<bool Signed>
bool clang::interp::Char< Signed >::isZero ( ) const
inlineconstexpr

Definition at line 61 of file Char.h.

◆ mul()

template<bool Signed>
bool clang::interp::Char< Signed >::mul ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 156 of file Char.h.

◆ neg()

template<bool Signed>
bool clang::interp::Char< Signed >::neg ( Char< Signed > A,
Char< Signed > * R )
inlinestatic

Definition at line 185 of file Char.h.

◆ operator Ty()

template<bool Signed>
template<typename Ty, typename = std::enable_if_t<std::is_integral_v<Ty>>>
clang::interp::Char< Signed >::operator Ty ( ) const
inlineexplicit

Definition at line 65 of file Char.h.

◆ operator!=()

template<bool Signed>
bool clang::interp::Char< Signed >::operator!= ( Char< Signed > RHS) const
inline

Definition at line 74 of file Char.h.

◆ operator-() [1/2]

template<bool Signed>
Char clang::interp::Char< Signed >::operator- ( ) const
inline

Definition at line 83 of file Char.h.

◆ operator-() [2/2]

template<bool Signed>
Char clang::interp::Char< Signed >::operator- ( Char< Signed > Other) const
inline

Definition at line 84 of file Char.h.

◆ operator<()

template<bool Signed>
bool clang::interp::Char< Signed >::operator< ( Char< Signed > RHS) const
inline

Definition at line 69 of file Char.h.

◆ operator<=()

template<bool Signed>
bool clang::interp::Char< Signed >::operator<= ( Char< Signed > RHS) const
inline

Definition at line 71 of file Char.h.

◆ operator==()

template<bool Signed>
bool clang::interp::Char< Signed >::operator== ( Char< Signed > RHS) const
inline

Definition at line 73 of file Char.h.

◆ operator>() [1/2]

template<bool Signed>
bool clang::interp::Char< Signed >::operator> ( Char< Signed > RHS) const
inline

Definition at line 70 of file Char.h.

◆ operator>() [2/2]

template<bool Signed>
bool clang::interp::Char< Signed >::operator> ( unsigned RHS) const
inline

Definition at line 79 of file Char.h.

◆ operator>=() [1/2]

template<bool Signed>
bool clang::interp::Char< Signed >::operator>= ( Char< Signed > RHS) const
inline

Definition at line 72 of file Char.h.

◆ operator>=() [2/2]

template<bool Signed>
bool clang::interp::Char< Signed >::operator>= ( unsigned RHS) const
inline

Definition at line 75 of file Char.h.

◆ print()

template<bool Signed>
void clang::interp::Char< Signed >::print ( llvm::raw_ostream & OS) const
inline

Definition at line 210 of file Char.h.

Referenced by clang::interp::operator<<().

◆ rem()

template<bool Signed>
bool clang::interp::Char< Signed >::rem ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 160 of file Char.h.

◆ shiftLeft()

template<bool Signed>
template<bool RHSSign>
void clang::interp::Char< Signed >::shiftLeft ( const Char< Signed > A,
const Char< RHSSign > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 199 of file Char.h.

◆ shiftRight()

template<bool Signed>
template<bool RHSSign>
void clang::interp::Char< Signed >::shiftRight ( const Char< Signed > A,
const Char< RHSSign > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 205 of file Char.h.

◆ sub()

template<bool Signed>
bool clang::interp::Char< Signed >::sub ( Char< Signed > A,
Char< Signed > B,
unsigned OpBits,
Char< Signed > * R )
inlinestatic

Definition at line 152 of file Char.h.

Referenced by clang::interp::Char< false >::decrement().

◆ toAPInt()

template<bool Signed>
APInt clang::interp::Char< Signed >::toAPInt ( unsigned BitWidth) const
inline

Definition at line 106 of file Char.h.

Referenced by clang::interp::Char< false >::toAPSInt().

◆ toAPSInt() [1/2]

template<bool Signed>
APSInt clang::interp::Char< Signed >::toAPSInt ( ) const
inline

Definition at line 100 of file Char.h.

Referenced by clang::interp::Char< false >::toAPValue().

◆ toAPSInt() [2/2]

template<bool Signed>
APSInt clang::interp::Char< Signed >::toAPSInt ( unsigned BitWidth) const
inline

Definition at line 103 of file Char.h.

◆ toAPValue()

template<bool Signed>
APValue clang::interp::Char< Signed >::toAPValue ( const ASTContext & ) const
inline

Definition at line 112 of file Char.h.

◆ toDiagnosticString()

template<bool Signed>
std::string clang::interp::Char< Signed >::toDiagnosticString ( const ASTContext & Ctx) const
inline

Definition at line 113 of file Char.h.

◆ toUnsigned()

template<bool Signed>
Char< false > clang::interp::Char< Signed >::toUnsigned ( ) const
inline

Definition at line 119 of file Char.h.

◆ truncate()

template<bool Signed>
Char clang::interp::Char< Signed >::truncate ( unsigned TruncBits) const
inline

Definition at line 121 of file Char.h.

◆ zero()

template<bool Signed>
Char clang::interp::Char< Signed >::zero ( unsigned BitWidth = 8)
inlinestatic

Definition at line 54 of file Char.h.

◆ Char


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