clang 20.0.0git
|
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... | |
class | LValuePathSerializationHelper |
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. | |
Static Public Member Functions | |
static APValue | IndeterminateValue () |
Friends | |
template<typename Impl > | |
class | clang::serialization::BasicReaderBase |
class | ASTImporter |
class | ASTNodeImporter |
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.
|
inline |
Definition at line 317 of file APValue.h.
Referenced by operator=().
|
inlineexplicit |
|
inlineexplicit |
Definition at line 321 of file APValue.h.
References setFloat().
Definition at line 327 of file APValue.h.
References E, and setVector().
|
inline |
Definition at line 330 of file APValue.h.
References setComplexInt().
|
inline |
Definition at line 333 of file APValue.h.
References setComplexFloat().
APValue::APValue | ( | const APValue & | RHS | ) |
Definition at line 311 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.
APValue::APValue | ( | APValue && | RHS | ) |
Definition at line 382 of file APValue.cpp.
References None.
|
inline |
Definition at line 338 of file APValue.h.
References setLValue().
|
inline |
Definition at line 343 of file APValue.h.
References Path, and setLValue().
|
inline |
|
inline |
Definition at line 354 of file APValue.h.
References D, setUnion(), and V.
|
inline |
Definition at line 358 of file APValue.h.
References clang::Member, and Path.
|
inline |
Definition at line 362 of file APValue.h.
References setAddrLabelDiff().
|
inline |
Definition at line 375 of file APValue.h.
References Indeterminate, Kind, and None.
LLVM_DUMP_METHOD void APValue::dump | ( | ) | const |
Definition at line 338 of file ASTDumper.cpp.
References clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
LLVM_DUMP_METHOD void APValue::dump | ( | raw_ostream & | OS, |
const ASTContext & | Context | ||
) | const |
Definition at line 343 of file ASTDumper.cpp.
References clang::ASTContext::CharTy, clang::ASTContext::getDiagnostics(), clang::ASTContext::getPointerType(), clang::DiagnosticsEngine::getShowColors(), and clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
|
inline |
Definition at line 579 of file APValue.h.
References Data, and isAddrLabelDiff().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 583 of file APValue.h.
References Data, and isAddrLabelDiff().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 521 of file APValue.h.
References Data, getArrayInitializedElts(), hasArrayFiller(), and isArray().
Referenced by APValue(), expandArray(), findSubobject(), getArrayFiller(), and Profile().
|
inline |
Definition at line 526 of file APValue.h.
References getArrayFiller().
Definition at line 510 of file APValue.h.
References Data, getArrayInitializedElts(), and isArray().
Referenced by APValue(), expandArray(), findSubobject(), getArrayInitializedElt(), clang::MSGuidDecl::getAsAPValue(), printPretty(), Profile(), clang::interp::Pointer::toRValue(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 515 of file APValue.h.
References getArrayInitializedElt().
|
inline |
Definition at line 529 of file APValue.h.
References Data, and isArray().
Referenced by APValue(), findSubobject(), getArrayFiller(), getArrayInitializedElt(), hasArrayFiller(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 533 of file APValue.h.
References Data, and isArray().
Referenced by APValue(), hasArrayFiller(), clang::ASTNodeImporter::ImportAPValue(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
std::string APValue::getAsString | ( | const ASTContext & | Ctx, |
QualType | Ty | ||
) | const |
Definition at line 946 of file APValue.cpp.
References printPretty(), and clang::Result.
Referenced by BuildConvertedConstantExpression(), checkDynamicType(), checkThreeWayNarrowingConversion(), DiagnoseNarrowingInInitList(), findCompleteObject(), HandleDestructionImpl(), isNullPointerValueTemplateArgument(), clang::interp::FunctionPointer::toDiagnosticString(), and clang::interp::Pointer::toDiagnosticString().
|
inline |
Definition at line 477 of file APValue.h.
References Data, and isComplexFloat().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexFloatImag(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and Profile().
|
inline |
Definition at line 481 of file APValue.h.
References getComplexFloatImag().
|
inline |
Definition at line 469 of file APValue.h.
References Data, and isComplexFloat().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexFloatReal(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), and Profile().
|
inline |
Definition at line 473 of file APValue.h.
References getComplexFloatReal().
|
inline |
Definition at line 461 of file APValue.h.
References Data, and isComplexInt().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexIntImag(), GetValueRange(), HandleConversionToBool(), needsCleanup(), printPretty(), and Profile().
|
inline |
Definition at line 465 of file APValue.h.
References getComplexIntImag().
|
inline |
Definition at line 453 of file APValue.h.
References Data, and isComplexInt().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexIntReal(), GetValueRange(), HandleConversionToBool(), needsCleanup(), printPretty(), and Profile().
|
inline |
Definition at line 457 of file APValue.h.
References getComplexIntReal().
|
inline |
Definition at line 445 of file APValue.h.
References Data, and isFixedPoint().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), EvaluateFixedPoint(), getFixedPoint(), HandleConversionToBool(), needsCleanup(), printPretty(), and Profile().
|
inline |
Definition at line 449 of file APValue.h.
References getFixedPoint().
|
inline |
Definition at line 437 of file APValue.h.
References Data, and isFloat().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), getFloat(), clang::StandardConversionSequence::getNarrowingKind(), handleCompareOpForVector(), HandleConversionToBool(), handleLogicalOpForVector(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), Profile(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 441 of file APValue.h.
References getFloat().
|
inline |
Definition at line 423 of file APValue.h.
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::SemaOpenMP::ActOnOMPArrayShapingExpr(), APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), BuiltinAlignment(), calculateConstraintSatisfaction(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckAdditionOperands(), clang::SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(), clang::Sema::checkCall(), checkFormatStringExpr(), clang::Sema::CheckLogicalOperands(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSubtractionOperands(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), diagnoseWellFormedUnsatisfiedConstraintExpr(), EvaluateBuiltinStrLen(), clang::Expr::EvaluateCharRangeAsString(), EvaluateInteger(), clang::Sema::FillInlineAsmIdentifierInfo(), getInt(), clang::ConstantExpr::getResultAsAPSInt(), GetValueRange(), handleCompareOpForVector(), HandleConversionToBool(), handleLogicalOpForVector(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), needsCleanup(), clang::InitializationSequence::Perform(), printPretty(), Profile(), shouldAddCase(), toIntegralConstant(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::Sema::VerifyIntegerConstantExpression(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
|
inline |
Definition at line 395 of file APValue.h.
References Kind.
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), handleCompareOpForVector(), HandleConversionToBool(), handleLogicalOpForVector(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), clang::ASTNodeImporter::ImportAPValue(), needsCleanup(), and printPretty().
const APValue::LValueBase APValue::getLValueBase | ( | ) | const |
Definition at line 974 of file APValue.cpp.
References isLValue().
Referenced by APValue(), EvaluateBuiltinConstantPForLValue(), getLValueType(), clang::ASTNodeImporter::ImportAPValue(), clang::interp::interp__builtin_constant_p(), clang::Expr::EvalResult::isGlobalLValue(), isNullPointerValueTemplateArgument(), printPretty(), Profile(), toIntegralConstant(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
unsigned APValue::getLValueCallIndex | ( | ) | const |
Definition at line 1000 of file APValue.cpp.
References isLValue().
CharUnits & APValue::getLValueOffset | ( | ) |
Definition at line 984 of file APValue.cpp.
References isLValue().
Referenced by addOrSubLValueAsInteger(), APValue(), EvaluateBuiltinConstantPForLValue(), getLValueOffset(), clang::ASTNodeImporter::ImportAPValue(), clang::interp::interp__builtin_constant_p(), printPretty(), Profile(), and toIntegralConstant().
|
inline |
Definition at line 487 of file APValue.h.
References getLValueOffset().
ArrayRef< APValue::LValuePathEntry > APValue::getLValuePath | ( | ) | const |
Definition at line 994 of file APValue.cpp.
References clang::APValue::LV::getPath(), hasLValuePath(), and isLValue().
Referenced by APValue(), getLValueType(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
unsigned APValue::getLValueVersion | ( | ) | const |
Definition at line 1005 of file APValue.cpp.
References isLValue().
const ValueDecl * APValue::getMemberPointerDecl | ( | ) | const |
Definition at line 1057 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), clang::ASTContext::getMemberPointerPathAdjustment(), HandleConversionToBool(), clang::ASTNodeImporter::ImportAPValue(), isNullPointerValueTemplateArgument(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValue().
ArrayRef< const CXXRecordDecl * > APValue::getMemberPointerPath | ( | ) | const |
Definition at line 1071 of file APValue.cpp.
References clang::APValue::MemberPointerData::getPath(), and isMemberPointer().
Referenced by APValue(), clang::ASTContext::getMemberPointerPathAdjustment(), clang::ASTNodeImporter::ImportAPValue(), and Profile().
Definition at line 546 of file APValue.h.
References Data, getStructNumBases(), and isStruct().
Referenced by APValue(), findSubobject(), getStructBase(), printPretty(), and Profile().
Definition at line 556 of file APValue.h.
References getStructBase().
Definition at line 551 of file APValue.h.
References Data, getStructNumBases(), getStructNumFields(), and isStruct().
Referenced by APValue(), findSubobject(), clang::MSGuidDecl::getAsAPValue(), getStructField(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 559 of file APValue.h.
References getStructField().
|
inline |
Definition at line 538 of file APValue.h.
References Data, and isStruct().
Referenced by APValue(), getStructBase(), getStructField(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 542 of file APValue.h.
References Data, and isStruct().
Referenced by APValue(), getStructField(), clang::ASTNodeImporter::ImportAPValue(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 563 of file APValue.h.
References Data, and isUnion().
Referenced by APValue(), findSubobject(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 567 of file APValue.h.
References Data, and isUnion().
Referenced by APValue(), findSubobject(), getUnionValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 571 of file APValue.h.
References getUnionValue().
Definition at line 497 of file APValue.h.
References Data, getVectorLength(), and isVector().
Referenced by BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), GetValueRange(), getVectorElt(), handleVectorShuffle(), handleVectorVectorBinOp(), IsSameFloatAfterCast(), printPretty(), and Profile().
Definition at line 502 of file APValue.h.
References getVectorElt().
|
inline |
Definition at line 505 of file APValue.h.
References Data, and isVector().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), GetValueRange(), getVectorElt(), handleVectorShuffle(), handleVectorVectorBinOp(), clang::ASTNodeImporter::ImportAPValue(), IsSameFloatAfterCast(), printPretty(), and Profile().
|
inline |
Definition at line 518 of file APValue.h.
References getArrayInitializedElts(), and getArraySize().
Referenced by APValue(), expandArray(), getArrayFiller(), and Profile().
bool APValue::hasLValuePath | ( | ) | const |
Definition at line 989 of file APValue.cpp.
References isLValue().
Referenced by addOrSubLValueAsInteger(), APValue(), getLValuePath(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 399 of file APValue.h.
References Indeterminate, Kind, and None.
Referenced by CheckEvaluationResult(), clang::Sema::CheckForImmediateInvocation(), clang::Sema::ConstantFoldAttrArgs(), and getBuiltinAlignArguments().
|
inlinestatic |
Definition at line 366 of file APValue.h.
References Indeterminate, and clang::Result.
Referenced by clang::ConstantExpr::getAPValueResult(), and handleDefaultInitValue().
|
inline |
Definition at line 397 of file APValue.h.
Referenced by clang::Sema::EvaluateConvertedConstantExpression(), findSubobject(), and clang::MSGuidDecl::getAsAPValue().
|
inline |
Definition at line 412 of file APValue.h.
References AddrLabelDiff, and Kind.
Referenced by getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), and GetValueRange().
|
inline |
Definition at line 408 of file APValue.h.
Referenced by getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 405 of file APValue.h.
References ComplexFloat, and Kind.
Referenced by findSubobject(), getComplexFloatImag(), getComplexFloatReal(), IsSameFloatAfterCast(), and setComplexFloat().
|
inline |
Definition at line 404 of file APValue.h.
References ComplexInt, and Kind.
Referenced by findSubobject(), getComplexIntImag(), getComplexIntReal(), GetValueRange(), and setComplexInt().
|
inline |
Definition at line 403 of file APValue.h.
References FixedPoint, and Kind.
Referenced by EvaluateFixedPoint(), getFixedPoint(), and setFixedPoint().
|
inline |
Definition at line 402 of file APValue.h.
Referenced by getFloat(), clang::StandardConversionSequence::getNarrowingKind(), IsSameFloatAfterCast(), setFloat(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 398 of file APValue.h.
References Indeterminate, and Kind.
Referenced by findSubobject(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 401 of file APValue.h.
Referenced by BuildConvertedConstantExpression(), calculateConstraintSatisfaction(), CheckEvalInICE(), EvaluateBuiltinStrLen(), clang::Sema::EvaluateConvertedConstantExpression(), EvaluateInteger(), getInt(), GetValueRange(), setInt(), shouldAddCase(), toIntegralConstant(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::Sema::VerifyIntegerConstantExpression(), clang::interp::Compiler< Emitter >::visitAPValue(), clang::interp::Compiler< Emitter >::visitAPValueInitializer(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
Definition at line 406 of file APValue.h.
Referenced by FastEvaluateAsRValue(), getLValueBase(), getLValueCallIndex(), getLValueOffset(), getLValuePath(), getLValueVersion(), GetValueRange(), handleVectorVectorBinOp(), hasLValuePath(), clang::interp::interp__builtin_constant_p(), clang::Expr::EvalResult::isGlobalLValue(), isLValueOnePastTheEnd(), isNullPointer(), isNullPointerValueTemplateArgument(), setLValue(), toIntegralConstant(), clang::interp::Compiler< Emitter >::visitAPValue(), clang::interp::Compiler< Emitter >::visitAPValueInitializer(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
bool APValue::isLValueOnePastTheEnd | ( | ) | const |
Definition at line 979 of file APValue.cpp.
References isLValue().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 411 of file APValue.h.
References Kind, and MemberPointer.
Referenced by getMemberPointerDecl(), getMemberPointerPath(), isMemberPointerToDerivedMember(), isNullPointerValueTemplateArgument(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
bool APValue::isMemberPointerToDerivedMember | ( | ) | const |
Definition at line 1064 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), clang::ASTContext::getMemberPointerPathAdjustment(), clang::ASTNodeImporter::ImportAPValue(), and Profile().
bool APValue::isNullPointer | ( | ) | const |
Definition at line 1010 of file APValue.cpp.
References isLValue().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), isNullPointerValueTemplateArgument(), clang::InitializationSequence::Perform(), printPretty(), Profile(), toIntegralConstant(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 409 of file APValue.h.
Referenced by getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 410 of file APValue.h.
Referenced by getUnionField(), getUnionValue(), setUnion(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 407 of file APValue.h.
Referenced by GetValueRange(), getVectorElt(), getVectorLength(), handleVectorVectorBinOp(), 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 431 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, FixedPoint, Float, getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getKind(), Indeterminate, Int, LValue, MemberPointer, needsCleanup(), None, Struct, Union, and Vector.
Referenced by needsCleanup(), and clang::ASTDeclReader::ReadVarDeclInit().
Definition at line 392 of file APValue.cpp.
References Indeterminate, and None.
Definition at line 386 of file APValue.cpp.
References APValue().
void APValue::printPretty | ( | raw_ostream & | OS, |
const ASTContext & | Ctx, | ||
QualType | Ty | ||
) | const |
Definition at line 693 of file APValue.cpp.
References clang::ASTContext::getPrintingPolicy(), and printPretty().
Referenced by DiagTemplateArg(), getAsString(), clang::TemplateArgument::print(), clang::TemplateParamObjectDecl::printAsInit(), and printPretty().
void APValue::printPretty | ( | raw_ostream & | OS, |
const PrintingPolicy & | Policy, | ||
QualType | Ty, | ||
const ASTContext * | Ctx = nullptr |
||
) | const |
Definition at line 698 of file APValue.cpp.
References AddrLabelDiff, Array, clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), clang::Type::castAs(), clang::Type::castAsArrayTypeUnsafe(), ComplexFloat, ComplexInt, E, clang::PrintingPolicy::EntireContentsOfLargeArray, clang::RecordDecl::fields(), clang::First, FixedPoint, Float, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), GetApproxValue(), getArrayInitializedElt(), getArrayInitializedElts(), clang::Type::getAs(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), clang::ArrayType::getElementType(), getFixedPoint(), getFloat(), getInt(), getKind(), clang::AddrLabelExpr::getLabel(), getLValueBase(), getLValueOffset(), getLValuePath(), getMemberPointerDecl(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), getStructBase(), getStructField(), getStructNumBases(), clang::ValueDecl::getType(), clang::CXXBaseSpecifier::getType(), clang::ASTContext::getTypeSizeInCharsIfKnown(), getUnionField(), getUnionValue(), getVectorElt(), getVectorLength(), hasLValuePath(), Indeterminate, Int, clang::Type::isAnyComplexType(), clang::Type::isBooleanType(), isLValueOnePastTheEnd(), clang::QualType::isNull(), isNullPointer(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isVoidType(), clang::CharUnits::isZero(), LValue, MemberPointer, None, clang::PrintingPolicy::Nullptr, clang::CharUnits::One(), Path, printPretty(), clang::Stmt::printPretty(), clang::QualType::stream(), Struct, TryPrintAsStringLiteral(), Union, Vector, and clang::CharUnits::Zero().
void APValue::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const |
profile this value.
There is no guarantee that values of different types will not produce the same profiled value, so the type should typically also be profiled if it's not implied by the context.
Definition at line 479 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, D, E, FixedPoint, Float, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getCanonicalDecl(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getLValueBase(), getLValueOffset(), getLValuePath(), getMemberPointerDecl(), getMemberPointerPath(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getUnionField(), getUnionValue(), getVectorElt(), getVectorLength(), hasArrayFiller(), hasLValuePath(), Indeterminate, Int, isLValueOnePastTheEnd(), isMemberPointerToDerivedMember(), isNullPointer(), LValue, MemberPointer, None, clang::APValue::LValueBase::Profile(), Profile(), clang::Stmt::Profile(), profileIntValue(), Struct, Union, and Vector.
Referenced by Profile(), clang::TemplateArgument::Profile(), clang::UnnamedGlobalConstantDecl::Profile(), and clang::TemplateArgument::structurallyEquals().
|
inline |
|
inline |
Definition at line 612 of file APValue.h.
References Data, and isComplexFloat().
Referenced by APValue().
|
inline |
Definition at line 605 of file APValue.h.
References Data, and isComplexInt().
Referenced by APValue().
|
inline |
Definition at line 596 of file APValue.h.
References Data, and isFixedPoint().
|
inline |
|
inline |
void APValue::setLValue | ( | LValueBase | B, |
const CharUnits & | O, | ||
ArrayRef< LValuePathEntry > | Path, | ||
bool | OnePastTheEnd, | ||
bool | IsNullPtr | ||
) |
Definition at line 1039 of file APValue.cpp.
void APValue::setLValue | ( | LValueBase | B, |
const CharUnits & | O, | ||
NoLValuePath | , | ||
bool | IsNullPtr | ||
) |
Definition at line 1015 of file APValue.cpp.
References isLValue(), and clang::APValue::LV::resizePath().
Referenced by APValue().
Definition at line 1050 of file APValue.cpp.
References isUnion().
Referenced by APValue(), and findSubobject().
void APValue::swap | ( | APValue & | RHS | ) |
Swaps the contents of this and the given APValue.
Definition at line 468 of file APValue.cpp.
Referenced by expandArray().
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 954 of file APValue.cpp.
References getInt(), getLValueBase(), getLValueOffset(), clang::ASTContext::getTargetNullPointerValue(), isInt(), isLValue(), isNullPointer(), clang::ASTContext::MakeIntValue(), and clang::Result.
Referenced by clang::Sema::ActOnGCCAsmStmt().
|
friend |
|
friend |
|
friend |