clang
8.0.0
|
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset], [Vector: N * APValue], [Array: N * APValue]. More...
#include "clang/AST/APValue.h"
Classes | |
struct | LV |
class | LValueBase |
union | LValuePathEntry |
struct | MemberPointerData |
struct | NoLValuePath |
struct | UninitArray |
struct | UninitStruct |
Public Types | |
enum | ValueKind { Uninitialized, Int, Float, ComplexInt, ComplexFloat, LValue, Vector, Array, Struct, Union, MemberPointer, AddrLabelDiff } |
typedef llvm::PointerIntPair< const Decl *, 1, bool > | BaseOrMemberType |
Public Member Functions | |
APValue () | |
APValue (APSInt I) | |
APValue (APFloat F) | |
APValue (const APValue *E, unsigned N) | |
APValue (APSInt R, APSInt I) | |
APValue (APFloat R, APFloat I) | |
APValue (const APValue &RHS) | |
APValue (APValue &&RHS) | |
APValue (LValueBase B, const CharUnits &O, NoLValuePath N, bool IsNullPtr=false) | |
APValue (LValueBase B, const CharUnits &O, ArrayRef< LValuePathEntry > Path, bool OnePastTheEnd, bool IsNullPtr=false) | |
APValue (UninitArray, unsigned InitElts, unsigned Size) | |
APValue (UninitStruct, unsigned B, unsigned M) | |
APValue (const FieldDecl *D, const APValue &V=APValue()) | |
APValue (const ValueDecl *Member, bool IsDerivedMember, ArrayRef< const CXXRecordDecl *> Path) | |
APValue (const AddrLabelExpr *LHSExpr, const AddrLabelExpr *RHSExpr) | |
~APValue () | |
bool | needsCleanup () const |
Returns whether the object performed allocations. More... | |
void | swap (APValue &RHS) |
Swaps the contents of this and the given APValue. More... | |
ValueKind | getKind () const |
bool | isUninit () const |
bool | isInt () const |
bool | isFloat () const |
bool | isComplexInt () const |
bool | isComplexFloat () const |
bool | isLValue () const |
bool | isVector () const |
bool | isArray () const |
bool | isStruct () const |
bool | isUnion () const |
bool | isMemberPointer () const |
bool | isAddrLabelDiff () const |
void | dump () const |
void | dump (raw_ostream &OS) const |
void | printPretty (raw_ostream &OS, ASTContext &Ctx, QualType Ty) const |
std::string | getAsString (ASTContext &Ctx, QualType Ty) const |
APSInt & | getInt () |
const APSInt & | getInt () const |
bool | toIntegralConstant (APSInt &Result, QualType SrcTy, const ASTContext &Ctx) const |
Try to convert this value to an integral constant. More... | |
APFloat & | getFloat () |
const APFloat & | getFloat () const |
APSInt & | getComplexIntReal () |
const APSInt & | getComplexIntReal () const |
APSInt & | getComplexIntImag () |
const APSInt & | getComplexIntImag () const |
APFloat & | getComplexFloatReal () |
const APFloat & | getComplexFloatReal () const |
APFloat & | getComplexFloatImag () |
const APFloat & | getComplexFloatImag () const |
const LValueBase | getLValueBase () const |
CharUnits & | getLValueOffset () |
const CharUnits & | getLValueOffset () const |
bool | isLValueOnePastTheEnd () const |
bool | hasLValuePath () const |
ArrayRef< LValuePathEntry > | getLValuePath () const |
unsigned | getLValueCallIndex () const |
unsigned | getLValueVersion () const |
bool | isNullPointer () const |
APValue & | getVectorElt (unsigned I) |
const APValue & | getVectorElt (unsigned I) const |
unsigned | getVectorLength () const |
APValue & | getArrayInitializedElt (unsigned I) |
const APValue & | getArrayInitializedElt (unsigned I) const |
bool | hasArrayFiller () const |
APValue & | getArrayFiller () |
const APValue & | getArrayFiller () const |
unsigned | getArrayInitializedElts () const |
unsigned | getArraySize () const |
unsigned | getStructNumBases () const |
unsigned | getStructNumFields () const |
APValue & | getStructBase (unsigned i) |
APValue & | getStructField (unsigned i) |
const APValue & | getStructBase (unsigned i) const |
const APValue & | getStructField (unsigned i) const |
const FieldDecl * | getUnionField () const |
APValue & | getUnionValue () |
const APValue & | getUnionValue () const |
const ValueDecl * | getMemberPointerDecl () const |
bool | isMemberPointerToDerivedMember () const |
ArrayRef< const CXXRecordDecl * > | getMemberPointerPath () const |
const AddrLabelExpr * | getAddrLabelDiffLHS () const |
const AddrLabelExpr * | getAddrLabelDiffRHS () const |
void | setInt (APSInt I) |
void | setFloat (APFloat F) |
void | setVector (const APValue *E, unsigned N) |
void | setComplexInt (APSInt R, APSInt I) |
void | setComplexFloat (APFloat R, APFloat I) |
void | setLValue (LValueBase B, const CharUnits &O, NoLValuePath, bool IsNullPtr) |
void | setLValue (LValueBase B, const CharUnits &O, ArrayRef< LValuePathEntry > Path, bool OnePastTheEnd, bool IsNullPtr) |
void | setUnion (const FieldDecl *Field, const APValue &Value) |
void | setAddrLabelDiff (const AddrLabelExpr *LHSExpr, const AddrLabelExpr *RHSExpr) |
APValue & | operator= (APValue RHS) |
Assign by swapping from a copy of the RHS. More... | |
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset], [Vector: N * APValue], [Array: N * APValue].
typedef llvm::PointerIntPair<const Decl *, 1, bool> clang::APValue::BaseOrMemberType |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
Definition at line 175 of file APValue.h.
References setFloat().
|
inlineexplicit |
Definition at line 178 of file APValue.h.
References setVector().
|
inline |
Definition at line 181 of file APValue.h.
References setComplexInt().
|
inline |
Definition at line 184 of file APValue.h.
References APValue(), and setComplexFloat().
APValue::APValue | ( | const APValue & | RHS | ) |
Definition at line 167 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, Float, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFloat(), getInt(), getKind(), getLValueBase(), getLValueOffset(), getLValuePath(), getMemberPointerDecl(), getMemberPointerPath(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getUnionField(), getUnionValue(), getVectorLength(), hasArrayFiller(), hasLValuePath(), Int, isLValueOnePastTheEnd(), isMemberPointerToDerivedMember(), isNullPointer(), LValue, MemberPointer, setAddrLabelDiff(), setComplexFloat(), setComplexInt(), setFloat(), setInt(), setLValue(), setUnion(), setVector(), Struct, Uninitialized, Union, and Vector.
|
inline |
|
inline |
Definition at line 189 of file APValue.h.
References setLValue().
|
inline |
Definition at line 194 of file APValue.h.
References setLValue().
|
inline |
|
inline |
Definition at line 205 of file APValue.h.
References setUnion().
|
inline |
|
inline |
Definition at line 213 of file APValue.h.
References setAddrLabelDiff().
|
inline |
Definition at line 218 of file APValue.h.
References needsCleanup(), and swap().
LLVM_DUMP_METHOD void APValue::dump | ( | ) | const |
Definition at line 300 of file APValue.cpp.
Referenced by dump(), and isAddrLabelDiff().
void APValue::dump | ( | raw_ostream & | OS | ) | const |
Definition at line 313 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, dump(), Float, GetApproxValue(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFloat(), getInt(), getKind(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getUnionValue(), getVectorElt(), getVectorLength(), hasArrayFiller(), Int, LValue, MemberPointer, Struct, Uninitialized, Union, and Vector.
|
inline |
Definition at line 398 of file APValue.h.
References isAddrLabelDiff().
Referenced by APValue(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 402 of file APValue.h.
References isAddrLabelDiff().
Referenced by APValue(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 342 of file APValue.h.
References getArrayInitializedElts(), hasArrayFiller(), and isArray().
Referenced by APValue(), CheckConstantExpression(), dump(), EvaluateVector(), getArrayFiller(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 347 of file APValue.h.
References getArrayFiller().
|
inline |
Definition at line 331 of file APValue.h.
References getArrayInitializedElts(), and isArray().
Referenced by APValue(), CheckConstantExpression(), dump(), getArrayInitializedElt(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 336 of file APValue.h.
References getArrayInitializedElt().
|
inline |
Definition at line 350 of file APValue.h.
References isArray().
Referenced by APValue(), CheckConstantExpression(), dump(), getArrayFiller(), getArrayInitializedElt(), hasArrayFiller(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 354 of file APValue.h.
References isArray().
Referenced by APValue(), dump(), hasArrayFiller(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
std::string APValue::getAsString | ( | ASTContext & | Ctx, |
QualType | Ty | ||
) | const |
Definition at line 595 of file APValue.cpp.
References printPretty(), and clang::Result.
Referenced by CheckConvertedConstantExpression(), DiagnoseNarrowingInInitList(), GetAlignOfExpr(), and isAddrLabelDiff().
|
inline |
Definition at line 298 of file APValue.h.
References isComplexFloat().
Referenced by APValue(), dump(), getComplexFloatImag(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 302 of file APValue.h.
References getComplexFloatImag(), getLValueBase(), and getLValueOffset().
|
inline |
Definition at line 290 of file APValue.h.
References isComplexFloat().
Referenced by APValue(), dump(), getComplexFloatReal(), handleCompoundAssignment(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 294 of file APValue.h.
References getComplexFloatReal().
|
inline |
Definition at line 282 of file APValue.h.
References isComplexInt().
Referenced by APValue(), dump(), getComplexIntImag(), GetValueRange(), HandleConversionToBool(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 286 of file APValue.h.
References getComplexIntImag().
|
inline |
Definition at line 274 of file APValue.h.
References isComplexInt().
Referenced by APValue(), dump(), getComplexIntReal(), GetValueRange(), handleCompoundAssignment(), HandleConversionToBool(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 278 of file APValue.h.
References getComplexIntReal().
|
inline |
Definition at line 266 of file APValue.h.
References isFloat().
Referenced by APValue(), dump(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), extractSubobject(), getFloat(), clang::StandardConversionSequence::getNarrowingKind(), handleAssignment(), handleCompoundAssignment(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 270 of file APValue.h.
References getFloat().
|
inline |
Definition at line 252 of file APValue.h.
References isInt().
Referenced by AddVariableConstraints(), AnalyzeBitFieldAssignment(), APValue(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), checkArrayExpressionDoesNotReferToUnitySize(), checkArrayExpressionDoesNotReferToWholeSize(), checkFormatStringExpr(), CheckImplicitConversion(), checkMapClauseExpressionBase(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), dump(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::emitDeclareSimdFunction(), EvalAndBitcastToAPInt(), EvaluateComparisonBinaryOperator(), EvaluateCPlusPlus11IntegralConstantExpr(), EvaluateInteger(), EvaluatePointer(), extractSubobject(), GetAlignOfExpr(), getBytesReturnedByAllocSizeCall(), clang::ento::SValBuilder::getConstantVal(), getInt(), clang::ComparisonCategoryInfo::ValueInfo::getIntValue(), GetValueRange(), handleAssignment(), handleCompoundAssignment(), HandleConversionToBool(), hasDefaultSetterName(), isInLoop(), needsCleanup(), printPretty(), shouldAddCase(), toIntegralConstant(), truncateBitfieldValue(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and tryEvaluateBuiltinObjectSize().
|
inline |
Definition at line 256 of file APValue.h.
References getInt(), clang::Result, and toIntegralConstant().
|
inline |
Definition at line 232 of file APValue.h.
Referenced by APValue(), dump(), EvaluateBuiltinConstantP(), handleAssignment(), handleCompoundAssignment(), HandleConversionToBool(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
const APValue::LValueBase APValue::getLValueBase | ( | ) | const |
Definition at line 623 of file APValue.cpp.
References isLValue().
Referenced by APValue(), EvalPointerValueAsBool(), getComplexFloatImag(), isNullPointerValueTemplateArgument(), printPretty(), and toIntegralConstant().
unsigned APValue::getLValueCallIndex | ( | ) | const |
CharUnits & APValue::getLValueOffset | ( | ) |
Definition at line 633 of file APValue.cpp.
References isLValue().
Referenced by APValue(), EvalPointerValueAsBool(), getComplexFloatImag(), getLValueOffset(), printPretty(), and toIntegralConstant().
|
inline |
Definition at line 308 of file APValue.h.
References getLValueCallIndex(), getLValueOffset(), getLValuePath(), getLValueVersion(), hasLValuePath(), isLValueOnePastTheEnd(), and isNullPointer().
ArrayRef< APValue::LValuePathEntry > APValue::getLValuePath | ( | ) | const |
Definition at line 643 of file APValue.cpp.
References clang::APValue::LV::getPath(), hasLValuePath(), and isLValue().
Referenced by APValue(), and getLValueOffset().
unsigned APValue::getLValueVersion | ( | ) | const |
const ValueDecl * APValue::getMemberPointerDecl | ( | ) | const |
Definition at line 688 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), CheckMemberPointerConstantExpression(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getUnionValue(), HandleConversionToBool(), and isNullPointerValueTemplateArgument().
ArrayRef< const CXXRecordDecl * > APValue::getMemberPointerPath | ( | ) | const |
Definition at line 702 of file APValue.cpp.
References Array, clang::APValue::MemberPointerData::getPath(), isMemberPointer(), isUninit(), LValue, MemberPointer, memcpy(), and clang::APValue::MemberPointerData::resizePath().
Referenced by APValue(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), and getUnionValue().
|
inline |
Definition at line 367 of file APValue.h.
References isStruct().
Referenced by APValue(), CheckConstantExpression(), dump(), getStructBase(), and HandleConstructorCall().
|
inline |
Definition at line 375 of file APValue.h.
References getStructBase().
|
inline |
Definition at line 371 of file APValue.h.
References getStructNumBases(), and isStruct().
Referenced by APValue(), CheckConstantExpression(), dump(), clang::ComparisonCategoryInfo::ValueInfo::getIntValue(), getStructField(), and HandleConstructorCall().
|
inline |
Definition at line 378 of file APValue.h.
References getStructField().
|
inline |
Definition at line 359 of file APValue.h.
References isStruct().
Referenced by APValue(), dump(), and getStructField().
|
inline |
Definition at line 363 of file APValue.h.
References isStruct().
|
inline |
Definition at line 382 of file APValue.h.
References isUnion().
Referenced by APValue(), CheckConstantExpression(), and HandleConstructorCall().
|
inline |
Definition at line 386 of file APValue.h.
References isUnion().
Referenced by APValue(), CheckConstantExpression(), dump(), getUnionValue(), and HandleConstructorCall().
|
inline |
Definition at line 390 of file APValue.h.
References getMemberPointerDecl(), getMemberPointerPath(), getUnionValue(), and isMemberPointerToDerivedMember().
|
inline |
Definition at line 318 of file APValue.h.
References getVectorLength(), and isVector().
Referenced by dump(), EvalAndBitcastToAPInt(), EvaluateVector(), GetValueRange(), getVectorElt(), IsSameFloatAfterCast(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 323 of file APValue.h.
References getVectorElt().
|
inline |
Definition at line 326 of file APValue.h.
References isVector().
Referenced by APValue(), dump(), EvalAndBitcastToAPInt(), EvaluateVector(), GetValueRange(), getVectorElt(), IsSameFloatAfterCast(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 339 of file APValue.h.
References getArrayInitializedElts(), and getArraySize().
Referenced by APValue(), CheckConstantExpression(), dump(), EvaluateVector(), getArrayFiller(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
bool APValue::hasLValuePath | ( | ) | const |
Definition at line 638 of file APValue.cpp.
References isLValue().
Referenced by APValue(), getLValueOffset(), getLValuePath(), and printPretty().
|
inline |
Definition at line 244 of file APValue.h.
References AddrLabelDiff, dump(), getAsString(), and printPretty().
Referenced by getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), and GetValueRange().
|
inline |
Definition at line 240 of file APValue.h.
References Array.
Referenced by CheckConstantExpression(), EvaluateVector(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), and getArraySize().
|
inline |
Definition at line 237 of file APValue.h.
References ComplexFloat.
Referenced by getComplexFloatImag(), getComplexFloatReal(), IsSameFloatAfterCast(), and setComplexFloat().
|
inline |
Definition at line 236 of file APValue.h.
References ComplexInt.
Referenced by getComplexIntImag(), getComplexIntReal(), GetValueRange(), and setComplexInt().
|
inline |
Definition at line 235 of file APValue.h.
References Float.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), getFloat(), clang::StandardConversionSequence::getNarrowingKind(), handleAssignment(), IsSameFloatAfterCast(), setFloat(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 234 of file APValue.h.
References Int.
Referenced by CheckConvertedConstantExpression(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), EvaluateAsInt(), EvaluateCPlusPlus11IntegralConstantExpr(), EvaluateInteger(), EvaluatePointer(), extractSubobject(), GetAlignOfExpr(), getInt(), GetValueRange(), handleAssignment(), setInt(), shouldAddCase(), toIntegralConstant(), truncateBitfieldValue(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and tryEvaluateBuiltinObjectSize().
|
inline |
Definition at line 238 of file APValue.h.
References LValue.
Referenced by CheckConstantExpression(), EvaluateVector(), getLValueBase(), getLValueCallIndex(), getLValueOffset(), getLValuePath(), getLValueVersion(), GetValueRange(), hasLValuePath(), isLValueOnePastTheEnd(), isNullPointer(), isNullPointerValueTemplateArgument(), setLValue(), toIntegralConstant(), and truncateBitfieldValue().
bool APValue::isLValueOnePastTheEnd | ( | ) | const |
Definition at line 628 of file APValue.cpp.
References isLValue().
Referenced by APValue(), and getLValueOffset().
|
inline |
Definition at line 243 of file APValue.h.
References MemberPointer.
Referenced by CheckConstantExpression(), getMemberPointerDecl(), getMemberPointerPath(), isMemberPointerToDerivedMember(), and isNullPointerValueTemplateArgument().
bool APValue::isMemberPointerToDerivedMember | ( | ) | const |
Definition at line 695 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), and getUnionValue().
bool APValue::isNullPointer | ( | ) | const |
Definition at line 659 of file APValue.cpp.
References isLValue().
Referenced by APValue(), getLValueOffset(), printPretty(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), and toIntegralConstant().
|
inline |
Definition at line 241 of file APValue.h.
References Struct.
Referenced by CheckConstantExpression(), getStructBase(), getStructField(), getStructNumBases(), and getStructNumFields().
|
inline |
Definition at line 233 of file APValue.h.
References Uninitialized.
Referenced by CheckConstantExpression(), clang::CodeGen::CodeGenFunction::EmitDeclRefExprDbgValue(), EvaluateLValue(), clang::VarDecl::evaluateValue(), findSubobject(), getMemberPointerPath(), HandleConstructorCall(), MaybeElementDependentArrayFiller(), and operator=().
|
inline |
Definition at line 242 of file APValue.h.
References Union.
Referenced by CheckConstantExpression(), getUnionField(), getUnionValue(), HandleConstructorCall(), and setUnion().
|
inline |
Definition at line 239 of file APValue.h.
References Vector.
Referenced by EvalAndBitcastToAPInt(), EvaluateTemporary(), GetValueRange(), getVectorElt(), getVectorLength(), IsSameFloatAfterCast(), and setVector().
bool APValue::needsCleanup | ( | ) | const |
Returns whether the object performed allocations.
If APValues are constructed via placement new, needsCleanup()
indicates whether the destructor must be called in order to correctly free all allocated memory.
Definition at line 257 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, Float, getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFloat(), getInt(), getKind(), Int, LValue, MemberPointer, Struct, Uninitialized, Union, and Vector.
Referenced by clang::VarDecl::evaluateValue(), and ~APValue().
Assign by swapping from a copy of the RHS.
Definition at line 453 of file APValue.h.
References AddrLabelDiff, ComplexFloat, ComplexInt, Float, Int, isUninit(), Struct, swap(), Uninitialized, Union, and Vector.
void APValue::printPretty | ( | raw_ostream & | OS, |
ASTContext & | Ctx, | ||
QualType | Ty | ||
) | const |
Definition at line 386 of file APValue.cpp.
References ComplexFloat, ComplexInt, Float, GetApproxValue(), clang::Type::getAs(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFloat(), getInt(), getKind(), clang::ASTContext::getLangOpts(), getLValueBase(), getLValueOffset(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPrintingPolicy(), clang::CharUnits::getQuantity(), getVectorElt(), getVectorLength(), hasLValuePath(), Int, clang::Type::isBooleanType(), clang::QualType::isNull(), isNullPointer(), clang::Type::isReferenceType(), LValue, printPretty(), clang::QualType::stream(), Uninitialized, and Vector.
Referenced by describeCall(), getAsString(), isAddrLabelDiff(), and printPretty().
|
inline |
|
inline |
Definition at line 429 of file APValue.h.
References isComplexFloat(), and setLValue().
Referenced by APValue().
|
inline |
|
inline |
|
inline |
void APValue::setLValue | ( | LValueBase | B, |
const CharUnits & | O, | ||
NoLValuePath | , | ||
bool | IsNullPtr | ||
) |
Definition at line 664 of file APValue.cpp.
References isLValue(), and clang::APValue::LV::resizePath().
Referenced by APValue(), and setComplexFloat().
void APValue::setLValue | ( | LValueBase | B, |
const CharUnits & | O, | ||
ArrayRef< LValuePathEntry > | Path, | ||
bool | OnePastTheEnd, | ||
bool | IsNullPtr | ||
) |
Definition at line 675 of file APValue.cpp.
References clang::APValue::LV::getPath(), isLValue(), memcpy(), and clang::APValue::LV::resizePath().
|
inline |
void APValue::swap | ( | APValue & | RHS | ) |
Swaps the contents of this and the given APValue.
Definition at line 292 of file APValue.cpp.
References memcpy().
Referenced by APValue(), extractSubobject(), isOnePastTheEndOfCompleteObject(), operator=(), and ~APValue().
bool APValue::toIntegralConstant | ( | APSInt & | Result, |
QualType | SrcTy, | ||
const ASTContext & | Ctx | ||
) | const |
Try to convert this value to an integral constant.
This works if it's an integer, null pointer, or offset from a null pointer. Returns true on success.
Definition at line 603 of file APValue.cpp.
References getInt(), getLValueBase(), getLValueOffset(), clang::ASTContext::getTargetNullPointerValue(), isInt(), isLValue(), isNullPointer(), and clang::ASTContext::MakeIntValue().
Referenced by AddVariableConstraints(), EvaluateComparisonBinaryOperator(), and getInt().