clang 22.0.0git
clang::Expr::EvalResult Struct Reference

EvalResult is a struct with detailed info about an evaluated expression. More...

#include "clang/AST/Expr.h"

Inheritance diagram for clang::Expr::EvalResult:
[legend]

Public Member Functions

bool isGlobalLValue () const
 Return true if the evaluated lvalue expression is global.
Public Member Functions inherited from clang::Expr::EvalStatus
 EvalStatus ()=default
bool hasSideEffects () const
 Return true if the evaluated expression has side effects.

Public Attributes

APValue Val
 Val - This is the value the expression can be folded to.
Public Attributes inherited from clang::Expr::EvalStatus
bool HasSideEffects = false
 Whether the evaluated expression has side effects.
bool HasUndefinedBehavior = false
 Whether the evaluation hit undefined behavior.
SmallVectorImpl< PartialDiagnosticAt > * Diag = nullptr
 Diag - If this is non-null, it will be filled in with a stack of notes indicating why evaluation failed (or why it failed to produce a constant expression).

Detailed Description

EvalResult is a struct with detailed info about an evaluated expression.

Definition at line 645 of file Expr.h.

Member Function Documentation

◆ isGlobalLValue()

bool Expr::EvalResult::isGlobalLValue ( ) const

Return true if the evaluated lvalue expression is global.

Definition at line 17965 of file ExprConstant.cpp.

References IsGlobalLValue(), and Val.

Referenced by clang::Sema::FillInlineAsmIdentifierInfo().

Member Data Documentation

◆ Val

APValue clang::Expr::EvalResult::Val

Val - This is the value the expression can be folded to.

Definition at line 647 of file Expr.h.

Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnGCCAsmStmt(), clang::SemaOpenMP::ActOnOMPArrayShapingExpr(), clang::SemaOpenMP::ActOnOpenMPDeviceNum(), areEqualIntegers(), BuiltinAlignment(), calculateConstraintSatisfaction(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckAdditionOperands(), clang::SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(), checkArrayExpressionDoesNotReferToUnitySize(), checkArrayExpressionDoesNotReferToWholeSize(), clang::Sema::checkCall(), clang::SemaAMDGPU::checkCoopAtomicFunctionCall(), CheckEvalInICE(), clang::Sema::CheckForImmediateInvocation(), checkFormatStringExpr(), clang::Sema::CheckImplicitConversion(), clang::Sema::CheckLogicalOperands(), checkOMPArraySectionConstantForReduction(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSubtractionOperands(), CheckUnicodeArithmeticConversions(), clang::Sema::ConstantFoldAttrArgs(), clang::CIRGen::CIRGenFunction::constantFoldsToSimpleInteger(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), diagnoseWellFormedUnsatisfiedConstraintExpr(), emitAtomicCmpXchgFailureSet(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), EvaluateAndDiagnoseImmediateInvocation(), clang::Sema::EvaluateConvertedConstantExpression(), clang::Sema::FillInlineAsmIdentifierInfo(), findConstantBaseAndOffset(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), clang::Expr::getAsBuiltinConstantDeclRef(), clang::StandardConversionSequence::getNarrowingKind(), isGlobalLValue(), isInLoop(), isNullPointerValueTemplateArgument(), isPtrBufferSafe(), isSafeArraySubscript(), clang::InitializationSequence::Perform(), clang::processConstant32BitIntArgument(), shouldAddCase(), clang::CIRGen::CIRGenFunction::tryEmitAsConstant(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), TryGetExprRange(), and clang::Sema::VerifyIntegerConstantExpression().


The documentation for this struct was generated from the following files: