clang
9.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 |
class | LValuePathEntry |
A non-discriminated union of a base, field, or array index. More... | |
struct | MemberPointerData |
struct | NoLValuePath |
struct | UninitArray |
struct | UninitStruct |
Public Types | |
enum | ValueKind { None, Indeterminate, Int, Float, FixedPoint, ComplexInt, ComplexFloat, LValue, Vector, Array, Struct, Union, MemberPointer, AddrLabelDiff } |
typedef llvm::PointerIntPair< const Decl *, 1, bool > | BaseOrMemberType |
A FieldDecl or CXXRecordDecl, along with a flag indicating whether we mean a virtual or non-virtual base class subobject. More... | |
Public Member Functions | |
APValue () | |
APValue (APSInt I) | |
APValue (APFloat F) | |
APValue (APFixedPoint FX) | |
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 | isAbsent () const |
bool | isIndeterminate () const |
bool | hasValue () const |
bool | isInt () const |
bool | isFloat () const |
bool | isFixedPoint () 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, const ASTContext &Ctx, QualType Ty) const |
std::string | getAsString (const 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 |
APFixedPoint & | getFixedPoint () |
const APFixedPoint & | getFixedPoint () 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 | setFixedPoint (APFixedPoint FX) |
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... | |
Static Public Member Functions | |
static APValue | IndeterminateValue () |
Friends | |
class | ASTReader |
class | ASTWriter |
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 |
A FieldDecl or CXXRecordDecl, along with a flag indicating whether we mean a virtual or non-virtual base class subobject.
|
inlineexplicit |
|
inlineexplicit |
APValue::APValue | ( | const APValue & | RHS | ) |
Definition at line 222 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, FixedPoint, Float, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getKind(), getLValueBase(), getLValueOffset(), getLValuePath(), getMemberPointerDecl(), getMemberPointerPath(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getUnionField(), getUnionValue(), getVectorLength(), hasArrayFiller(), hasLValuePath(), Indeterminate, Int, isLValueOnePastTheEnd(), isMemberPointerToDerivedMember(), isNullPointer(), LValue, MemberPointer, None, setAddrLabelDiff(), setComplexFloat(), setComplexInt(), setFloat(), setInt(), setLValue(), setUnion(), setVector(), Struct, Union, and Vector.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 296 of file APValue.h.
References clang::None.
LLVM_DUMP_METHOD void APValue::dump | ( | ) | const |
Definition at line 367 of file APValue.cpp.
Referenced by dump().
void APValue::dump | ( | raw_ostream & | OS | ) | const |
Definition at line 380 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, dump(), FixedPoint, Float, GetApproxValue(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getKind(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getUnionValue(), getVectorElt(), getVectorLength(), hasArrayFiller(), i, Indeterminate, Int, LValue, MemberPointer, None, Struct, Union, and Vector.
|
inline |
Definition at line 490 of file APValue.h.
Referenced by APValue(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 494 of file APValue.h.
Referenced by APValue(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 434 of file APValue.h.
Referenced by APValue(), CheckConstantExpression(), dump(), EvaluateVector(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 423 of file APValue.h.
Referenced by APValue(), CheckConstantExpression(), dump(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 442 of file APValue.h.
Referenced by APValue(), CheckConstantExpression(), dump(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 446 of file APValue.h.
Referenced by APValue(), dump(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
std::string APValue::getAsString | ( | const ASTContext & | Ctx, |
QualType | Ty | ||
) | const |
Definition at line 679 of file APValue.cpp.
References printPretty(), and clang::Result.
Referenced by CheckConvertedConstantExpression(), checkDynamicType(), DiagnoseNarrowingInInitList(), and GetAlignOfExpr().
|
inline |
Definition at line 390 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), HandleConversionToBool(), isFormalAccess(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 382 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), handleCompoundAssignment(), HandleConversionToBool(), isFormalAccess(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 374 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), GetValueRange(), HandleConversionToBool(), isFormalAccess(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 366 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), GetValueRange(), handleCompoundAssignment(), HandleConversionToBool(), isFormalAccess(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 358 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), EvaluateComparisonBinaryOperator(), EvaluateFixedPoint(), HandleConversionToBool(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 350 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), EvaluateComparisonBinaryOperator(), extractSubobject(), clang::StandardConversionSequence::getNarrowingKind(), handleAssignment(), handleCompoundAssignment(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 336 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), 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(), EvaluateCPlusPlus11IntegralConstantExpr(), EvaluateInteger(), EvaluatePointer(), extractSubobject(), GetAlignOfExpr(), getBytesReturnedByAllocSizeCall(), clang::ento::SValBuilder::getConstantVal(), clang::ComparisonCategoryInfo::ValueInfo::getIntValue(), clang::ConstantExpr::getStorageKind(), GetValueRange(), handleAssignment(), handleCompoundAssignment(), HandleConversionToBool(), hasDefaultSetterName(), isInLoop(), needsCleanup(), printPretty(), shouldAddCase(), toIntegralConstant(), truncateBitfieldValue(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and tryEvaluateBuiltinObjectSize().
|
inline |
Definition at line 340 of file APValue.h.
References clang::Result.
|
inline |
Definition at line 311 of file APValue.h.
Referenced by clang::ASTRecordWriter::AddAPValue(), APValue(), dump(), EvaluateBuiltinConstantP(), clang::ConstantExpr::getStorageKind(), handleAssignment(), handleCompoundAssignment(), HandleConversionToBool(), needsCleanup(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
const APValue::LValueBase APValue::getLValueBase | ( | ) | const |
Definition at line 707 of file APValue.cpp.
References isLValue().
Referenced by APValue(), EvalPointerValueAsBool(), EvaluateBuiltinConstantPForLValue(), isNullPointerValueTemplateArgument(), printPretty(), and toIntegralConstant().
unsigned APValue::getLValueCallIndex | ( | ) | const |
Definition at line 733 of file APValue.cpp.
References isLValue().
CharUnits & APValue::getLValueOffset | ( | ) |
Definition at line 717 of file APValue.cpp.
References isLValue().
Referenced by APValue(), EvalPointerValueAsBool(), EvaluateBuiltinConstantPForLValue(), printPretty(), and toIntegralConstant().
|
inline |
ArrayRef< APValue::LValuePathEntry > APValue::getLValuePath | ( | ) | const |
Definition at line 727 of file APValue.cpp.
References clang::APValue::LV::getPath(), hasLValuePath(), and isLValue().
Referenced by APValue().
unsigned APValue::getLValueVersion | ( | ) | const |
Definition at line 738 of file APValue.cpp.
References isLValue().
const ValueDecl * APValue::getMemberPointerDecl | ( | ) | const |
Definition at line 772 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), CheckMemberPointerConstantExpression(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), HandleConversionToBool(), and isNullPointerValueTemplateArgument().
ArrayRef< const CXXRecordDecl * > APValue::getMemberPointerPath | ( | ) | const |
Definition at line 786 of file APValue.cpp.
References Array, clang::APValue::MemberPointerData::getPath(), isAbsent(), isMemberPointer(), LValue, MemberPointer, memcpy(), and clang::APValue::MemberPointerData::resizePath().
Referenced by APValue(), and clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment().
|
inline |
Definition at line 459 of file APValue.h.
References i.
Referenced by APValue(), CheckConstantExpression(), dump(), and HandleConstructorCall().
|
inline |
|
inline |
Definition at line 463 of file APValue.h.
References i.
Referenced by APValue(), CheckConstantExpression(), dump(), clang::ComparisonCategoryInfo::ValueInfo::getIntValue(), and HandleConstructorCall().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 474 of file APValue.h.
Referenced by APValue(), CheckConstantExpression(), and HandleConstructorCall().
|
inline |
Definition at line 478 of file APValue.h.
Referenced by APValue(), CheckConstantExpression(), dump(), and HandleConstructorCall().
|
inline |
|
inline |
Definition at line 410 of file APValue.h.
References isVector().
Referenced by dump(), EvalAndBitcastToAPInt(), EvaluateVector(), GetValueRange(), IsSameFloatAfterCast(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
|
inline |
Definition at line 418 of file APValue.h.
References isVector().
Referenced by APValue(), dump(), EvalAndBitcastToAPInt(), EvaluateVector(), GetValueRange(), IsSameFloatAfterCast(), printPretty(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 431 of file APValue.h.
Referenced by APValue(), CheckConstantExpression(), dump(), EvaluateVector(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
bool APValue::hasLValuePath | ( | ) | const |
Definition at line 722 of file APValue.cpp.
References isLValue().
Referenced by APValue(), getLValuePath(), and printPretty().
|
inline |
Definition at line 315 of file APValue.h.
References clang::None.
Referenced by CheckConstantExpression(), clang::CodeGen::CodeGenFunction::EmitDeclRefExprDbgValue(), EvaluateBuiltinConstantP(), EvaluateLValue(), HandleConstructorCall(), and MaybeElementDependentArrayFiller().
|
inlinestatic |
Definition at line 290 of file APValue.h.
References clang::Result.
Referenced by clang::ASTReader::ReadAPValue().
|
inline |
Definition at line 313 of file APValue.h.
References clang::None.
Referenced by clang::VarDecl::evaluateValue(), findSubobject(), and getMemberPointerPath().
|
inline |
Definition at line 328 of file APValue.h.
References dump(), and clang::getAsString().
Referenced by GetValueRange().
|
inline |
Definition at line 324 of file APValue.h.
Referenced by CheckConstantExpression(), and EvaluateVector().
|
inline |
Definition at line 321 of file APValue.h.
Referenced by isFormalAccess(), and IsSameFloatAfterCast().
|
inline |
Definition at line 320 of file APValue.h.
Referenced by GetValueRange(), and isFormalAccess().
|
inline |
Definition at line 319 of file APValue.h.
Referenced by EvaluateAsFixedPoint(), and EvaluateFixedPoint().
|
inline |
Definition at line 318 of file APValue.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), clang::StandardConversionSequence::getNarrowingKind(), handleAssignment(), IsSameFloatAfterCast(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 314 of file APValue.h.
Referenced by findSubobject().
|
inline |
Definition at line 317 of file APValue.h.
Referenced by CheckConvertedConstantExpression(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), EvaluateAsInt(), EvaluateCPlusPlus11IntegralConstantExpr(), EvaluateInteger(), EvaluatePointer(), extractSubobject(), GetAlignOfExpr(), GetValueRange(), handleAssignment(), shouldAddCase(), toIntegralConstant(), truncateBitfieldValue(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and tryEvaluateBuiltinObjectSize().
|
inline |
Definition at line 322 of file APValue.h.
Referenced by CheckConstantExpression(), getLValueBase(), getLValueCallIndex(), getLValueOffset(), getLValuePath(), getLValueVersion(), GetValueRange(), HandleCovariantReturnAdjustment(), hasLValuePath(), isLValueOnePastTheEnd(), isNullPointer(), isNullPointerValueTemplateArgument(), setLValue(), toIntegralConstant(), and truncateBitfieldValue().
bool APValue::isLValueOnePastTheEnd | ( | ) | const |
|
inline |
Definition at line 327 of file APValue.h.
Referenced by CheckConstantExpression(), getMemberPointerDecl(), getMemberPointerPath(), isMemberPointerToDerivedMember(), and isNullPointerValueTemplateArgument().
bool APValue::isMemberPointerToDerivedMember | ( | ) | const |
Definition at line 779 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), and clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment().
bool APValue::isNullPointer | ( | ) | const |
Definition at line 743 of file APValue.cpp.
References isLValue().
Referenced by APValue(), HandleCovariantReturnAdjustment(), printPretty(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), and toIntegralConstant().
|
inline |
Definition at line 325 of file APValue.h.
Referenced by CheckConstantExpression().
|
inline |
Definition at line 326 of file APValue.h.
References Union.
Referenced by CheckConstantExpression(), and HandleConstructorCall().
|
inline |
Definition at line 323 of file APValue.h.
Referenced by EvalAndBitcastToAPInt(), EvaluateTemporary(), GetValueRange(), and IsSameFloatAfterCast().
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 321 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, FixedPoint, Float, getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getKind(), clang::APFixedPoint::getValue(), Indeterminate, Int, LValue, MemberPointer, None, Struct, Union, and Vector.
Referenced by clang::VarDecl::evaluateValue().
void APValue::printPretty | ( | raw_ostream & | OS, |
const ASTContext & | Ctx, | ||
QualType | Ty | ||
) | const |
Definition at line 459 of file APValue.cpp.
References ComplexFloat, ComplexInt, FixedPoint, Float, GetApproxValue(), clang::Type::getAs(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getKind(), clang::ASTContext::getLangOpts(), getLValueBase(), getLValueOffset(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPrintingPolicy(), clang::CharUnits::getQuantity(), getVectorElt(), getVectorLength(), hasLValuePath(), i, Indeterminate, Int, clang::Type::isBooleanType(), clang::QualType::isNull(), isNullPointer(), clang::Type::isReferenceType(), LValue, None, printPretty(), clang::QualType::stream(), and Vector.
Referenced by describeCall(), getAsString(), printPretty(), clang::TextNodeDumper::VisitConstantExpr(), and clang::JSONNodeDumper::VisitConstantExpr().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void APValue::setLValue | ( | LValueBase | B, |
const CharUnits & | O, | ||
NoLValuePath | , | ||
bool | IsNullPtr | ||
) |
Definition at line 748 of file APValue.cpp.
References isLValue(), and clang::APValue::LV::resizePath().
Referenced by APValue().
void APValue::setLValue | ( | LValueBase | B, |
const CharUnits & | O, | ||
ArrayRef< LValuePathEntry > | Path, | ||
bool | OnePastTheEnd, | ||
bool | IsNullPtr | ||
) |
Definition at line 759 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 359 of file APValue.cpp.
References memcpy().
Referenced by extractSubobject(), and isOnePastTheEndOfCompleteObject().
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 687 of file APValue.cpp.
References getInt(), getLValueBase(), getLValueOffset(), clang::ASTContext::getTargetNullPointerValue(), isInt(), isLValue(), isNullPointer(), and clang::ASTContext::MakeIntValue().
Referenced by AddVariableConstraints(), and EvaluateComparisonBinaryOperator().