clang 22.0.0git
clang::Expr Class Reference

This represents one expression. More...

#include "clang/AST/Expr.h"

Inherits clang::ValueStmt.

Inherited by clang::AbstractConditionalOperator, clang::AddrLabelExpr, clang::ArrayInitIndexExpr, clang::ArrayInitLoopExpr, clang::ArraySectionExpr, clang::ArraySubscriptExpr, clang::ArrayTypeTraitExpr, clang::AsTypeExpr, clang::AtomicExpr, clang::BinaryOperator, clang::BlockExpr, clang::CXXBindTemporaryExpr, clang::CXXBoolLiteralExpr, clang::CXXConstructExpr, clang::CXXDefaultArgExpr, clang::CXXDefaultInitExpr, clang::CXXDeleteExpr, clang::CXXDependentScopeMemberExpr, clang::CXXFoldExpr, clang::CXXInheritedCtorInitExpr, clang::CXXNewExpr, clang::CXXNoexceptExpr, clang::CXXNullPtrLiteralExpr, clang::CXXParenListInitExpr, clang::CXXPseudoDestructorExpr, clang::CXXRewrittenBinaryOperator, clang::CXXScalarValueInitExpr, clang::CXXStdInitializerListExpr, clang::CXXThisExpr, clang::CXXThrowExpr, clang::CXXTypeidExpr, clang::CXXUnresolvedConstructExpr, clang::CXXUuidofExpr, clang::CallExpr, clang::CastExpr, clang::CharacterLiteral, clang::ChooseExpr, clang::CompoundLiteralExpr, clang::ConceptSpecializationExpr, clang::ConvertVectorExpr, clang::CoroutineSuspendExpr, clang::DeclRefExpr, clang::DependentCoawaitExpr, clang::DependentScopeDeclRefExpr, clang::DesignatedInitExpr, clang::DesignatedInitUpdateExpr, clang::EmbedExpr, clang::ExpressionTraitExpr, clang::ExtVectorElementExpr, clang::FixedPointLiteral, clang::FloatingLiteral, clang::FullExpr, clang::FunctionParmPackExpr, clang::GNUNullExpr, clang::GenericSelectionExpr, clang::HLSLOutArgExpr, clang::ImaginaryLiteral, clang::ImplicitValueInitExpr, clang::InitListExpr, clang::IntegerLiteral, clang::LambdaExpr, clang::MSPropertyRefExpr, clang::MSPropertySubscriptExpr, clang::MaterializeTemporaryExpr, clang::MatrixSubscriptExpr, clang::MemberExpr, clang::NoInitExpr, clang::OMPArrayShapingExpr, clang::OMPIteratorExpr, clang::ObjCArrayLiteral, clang::ObjCAvailabilityCheckExpr, clang::ObjCBoolLiteralExpr, clang::ObjCBoxedExpr, clang::ObjCDictionaryLiteral, clang::ObjCEncodeExpr, clang::ObjCIndirectCopyRestoreExpr, clang::ObjCIsaExpr, clang::ObjCIvarRefExpr, clang::ObjCMessageExpr, clang::ObjCPropertyRefExpr, clang::ObjCProtocolExpr, clang::ObjCSelectorExpr, clang::ObjCStringLiteral, clang::ObjCSubscriptRefExpr, clang::OffsetOfExpr, clang::OpaqueValueExpr, clang::OpenACCAsteriskSizeExpr, clang::OverloadExpr, clang::PackExpansionExpr, clang::PackIndexingExpr, clang::ParenExpr, clang::ParenListExpr, clang::PredefinedExpr, clang::PseudoObjectExpr, clang::RecoveryExpr, clang::RequiresExpr, clang::SYCLUniqueStableNameExpr, clang::ShuffleVectorExpr, clang::SizeOfPackExpr, clang::SourceLocExpr, clang::StmtExpr, clang::StringLiteral, clang::SubstNonTypeTemplateParmExpr, clang::SubstNonTypeTemplateParmPackExpr, clang::TypeTraitExpr, clang::UnaryExprOrTypeTraitExpr, clang::UnaryOperator, and clang::VAArgExpr.

Classes

class  Classification
 The return type of classify(). More...
struct  EvalResult
 EvalResult is a struct with detailed info about an evaluated expression. More...
struct  EvalStatus
 EvalStatus is a struct with detailed info about an evaluation in progress. More...

Public Types

enum  LValueClassification {
  LV_Valid , LV_NotObjectType , LV_IncompleteVoidType , LV_DuplicateVectorComponents ,
  LV_InvalidExpression , LV_InvalidMessageExpression , LV_MemberFunction , LV_SubObjCPropertySetting ,
  LV_ClassTemporary , LV_ArrayTemporary
}
enum  isModifiableLvalueResult {
  MLV_Valid , MLV_NotObjectType , MLV_IncompleteVoidType , MLV_DuplicateVectorComponents ,
  MLV_InvalidExpression , MLV_LValueCast , MLV_IncompleteType , MLV_ConstQualified ,
  MLV_ConstQualifiedField , MLV_ConstAddrSpace , MLV_ArrayType , MLV_NoSetterProperty ,
  MLV_MemberFunction , MLV_SubObjCPropertySetting , MLV_InvalidMessageExpression , MLV_ClassTemporary ,
  MLV_ArrayTemporary
}
enum  SideEffectsKind { SE_NoSideEffects , SE_AllowUndefinedBehavior , SE_AllowSideEffects }
enum class  ConstantExprKind { Normal , NonClassTemplateArgument , ClassTemplateArgument , ImmediateInvocation }
enum  NullPointerConstantKind {
  NPCK_NotNull = 0 , NPCK_ZeroExpression , NPCK_ZeroLiteral , NPCK_CXX11_nullptr ,
  NPCK_GNUNull
}
 Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant(). More...
enum  NullPointerConstantValueDependence { NPC_NeverValueDependent = 0 , NPC_ValueDependentIsNull , NPC_ValueDependentIsNotNull }
 Enumeration used to describe how isNullPointerConstant() should cope with value-dependent expressions. More...
Public Types inherited from clang::Stmt
enum  StmtClass { NoStmtClass = 0 }
enum  Likelihood { LH_Unlikely = -1 , LH_None , LH_Likely }
 The likelihood of a branch being taken. More...
using child_iterator = StmtIterator
 Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatements/subexpressions of an AST node.
using const_child_iterator = ConstStmtIterator
using child_range = llvm::iterator_range<child_iterator>
using const_child_range = llvm::iterator_range<const_child_iterator>

Public Member Functions

 Expr ()=delete
 Expr (const Expr &)=delete
 Expr (Expr &&)=delete
Exproperator= (const Expr &)=delete
Exproperator= (Expr &&)=delete
QualType getType () const
void setType (QualType t)
QualType getEnumCoercedType (const ASTContext &Ctx) const
 If this expression is an enumeration constant, return the enumeration type under which said constant was declared.
ExprDependence getDependence () const
bool isValueDependent () const
 Determines whether the value of this expression depends on.
bool isTypeDependent () const
 Determines whether the type of this expression depends on.
bool isInstantiationDependent () const
 Whether this expression is instantiation-dependent, meaning that it depends in some way on.
bool containsUnexpandedParameterPack () const
 Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates).
bool containsErrors () const
 Whether this expression contains subexpressions which had errors.
SourceLocation getExprLoc () const LLVM_READONLY
 getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.
bool isReadIfDiscardedInCPlusPlus11 () const
 Determine whether an lvalue-to-rvalue conversion should implicitly be applied to this expression if it appears as a discarded-value expression in C++11 onwards.
bool isUnusedResultAWarning (const Expr *&WarnExpr, SourceLocation &Loc, SourceRange &R1, SourceRange &R2, ASTContext &Ctx) const
 isUnusedResultAWarning - Return true if this immediate expression should be warned about if the result is unused.
bool isLValue () const
 isLValue - True if this expression is an "l-value" according to the rules of the current language.
bool isPRValue () const
bool isXValue () const
bool isGLValue () const
LValueClassification ClassifyLValue (ASTContext &Ctx) const
 Reasons why an expression might not be an l-value.
isModifiableLvalueResult isModifiableLvalue (ASTContext &Ctx, SourceLocation *Loc=nullptr) const
 isModifiableLvalue - C99 6.3.2.1: an lvalue that does not have array type, does not have an incomplete type, does not have a const-qualified type, and if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const-qualified type.
Classification Classify (ASTContext &Ctx) const
 Classify - Classify this expression according to the C++11 expression taxonomy.
Classification ClassifyModifiable (ASTContext &Ctx, SourceLocation &Loc) const
 ClassifyModifiable - Classify this expression according to the C++11 expression taxonomy, and see if it is valid on the left side of an assignment.
FPOptions getFPFeaturesInEffect (const LangOptions &LO) const
 Returns the set of floating point options that apply to this expression.
ExprValueKind getValueKind () const
 getValueKind - The value kind that this expression produces.
ExprObjectKind getObjectKind () const
 getObjectKind - The object kind that this expression produces.
bool isOrdinaryOrBitFieldObject () const
void setValueKind (ExprValueKind Cat)
 setValueKind - Set the value kind produced by this expression.
void setObjectKind (ExprObjectKind Cat)
 setObjectKind - Set the object kind produced by this expression.
bool refersToBitField () const
 Returns true if this expression is a gl-value that potentially refers to a bit-field.
FieldDeclgetSourceBitField ()
 If this expression refers to a bit-field, retrieve the declaration of that bit-field.
EnumConstantDeclgetEnumConstantDecl ()
 If this expression refers to an enum constant, retrieve its declaration.
const EnumConstantDeclgetEnumConstantDecl () const
const FieldDeclgetSourceBitField () const
DeclgetReferencedDeclOfCallee ()
const DeclgetReferencedDeclOfCallee () const
const ObjCPropertyRefExprgetObjCProperty () const
 If this expression is an l-value for an Objective C property, find the underlying property reference expression.
bool isObjCSelfExpr () const
 Check if this expression is the ObjC 'self' implicit parameter.
bool refersToVectorElement () const
 Returns whether this expression refers to a vector element.
bool refersToMatrixElement () const
 Returns whether this expression refers to a matrix element.
bool refersToGlobalRegisterVar () const
 Returns whether this expression refers to a global register variable.
bool hasPlaceholderType () const
 Returns whether this expression has a placeholder type.
bool hasPlaceholderType (BuiltinType::Kind K) const
 Returns whether this expression has a specific placeholder type.
bool isKnownToHaveBooleanValue (bool Semantic=true) const
 isKnownToHaveBooleanValue - Return true if this is an integer expression that is known to return 0 or 1.
bool isFlexibleArrayMemberLike (const ASTContext &Context, LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel, bool IgnoreTemplateOrMacroSubstitution=false) const
 Check whether this array fits the idiom of a flexible array member, depending on the value of -fstrict-flex-array.
std::optional< llvm::APSInt > getIntegerConstantExpr (const ASTContext &Ctx) const
 isIntegerConstantExpr - Return the value if this expression is a valid integer constant expression.
bool isIntegerConstantExpr (const ASTContext &Ctx) const
bool isCXX98IntegralConstantExpr (const ASTContext &Ctx) const
 isCXX98IntegralConstantExpr - Return true if this expression is an integral constant expression in C++98.
bool isCXX11ConstantExpr (const ASTContext &Ctx, APValue *Result=nullptr) const
 isCXX11ConstantExpr - Return true if this expression is a constant expression in C++11.
bool isConstantInitializer (ASTContext &Ctx, bool ForRef, const Expr **Culprit=nullptr) const
 isConstantInitializer - Returns true if this expression can be emitted to IR as a constant, and thus can be used as a constant initializer in C.
const ValueDeclgetAsBuiltinConstantDeclRef (const ASTContext &Context) const
 If this expression is an unambiguous reference to a single declaration, in the style of __builtin_function_start, return that declaration.
bool EvaluateAsRValue (EvalResult &Result, const ASTContext &Ctx, bool InConstantContext=false) const
 EvaluateAsRValue - Return true if this is a constant which we can fold to an rvalue using any crazy technique (that has nothing to do with language standards) that we want to, even if the expression has side-effects.
bool EvaluateAsBooleanCondition (bool &Result, const ASTContext &Ctx, bool InConstantContext=false) const
 EvaluateAsBooleanCondition - Return true if this is a constant which we can fold and convert to a boolean condition using any crazy technique that we want to, even if the expression has side-effects.
bool EvaluateAsInt (EvalResult &Result, const ASTContext &Ctx, SideEffectsKind AllowSideEffects=SE_NoSideEffects, bool InConstantContext=false) const
 EvaluateAsInt - Return true if this is a constant which we can fold and convert to an integer, using any crazy technique that we want to.
bool EvaluateAsFloat (llvm::APFloat &Result, const ASTContext &Ctx, SideEffectsKind AllowSideEffects=SE_NoSideEffects, bool InConstantContext=false) const
 EvaluateAsFloat - Return true if this is a constant which we can fold and convert to a floating point value, using any crazy technique that we want to.
bool EvaluateAsFixedPoint (EvalResult &Result, const ASTContext &Ctx, SideEffectsKind AllowSideEffects=SE_NoSideEffects, bool InConstantContext=false) const
 EvaluateAsFixedPoint - Return true if this is a constant which we can fold and convert to a fixed point value.
bool isEvaluatable (const ASTContext &Ctx, SideEffectsKind AllowSideEffects=SE_NoSideEffects) const
 isEvaluatable - Call EvaluateAsRValue to see if this expression can be constant folded without side-effects, but discard the result.
bool HasSideEffects (const ASTContext &Ctx, bool IncludePossibleEffects=true) const
 HasSideEffects - This routine returns true for all those expressions which have any effect other than producing a value.
bool hasNonTrivialCall (const ASTContext &Ctx) const
 Determine whether this expression involves a call to any function that is not trivial.
llvm::APSInt EvaluateKnownConstInt (const ASTContext &Ctx) const
 EvaluateKnownConstInt - Call EvaluateAsRValue and return the folded integer.
llvm::APSInt EvaluateKnownConstIntCheckOverflow (const ASTContext &Ctx, SmallVectorImpl< PartialDiagnosticAt > *Diag=nullptr) const
void EvaluateForOverflow (const ASTContext &Ctx) const
bool EvaluateAsLValue (EvalResult &Result, const ASTContext &Ctx, bool InConstantContext=false) const
 EvaluateAsLValue - Evaluate an expression to see if we can fold it to an lvalue with link time known address, with no side-effects.
bool EvaluateAsInitializer (APValue &Result, const ASTContext &Ctx, const VarDecl *VD, SmallVectorImpl< PartialDiagnosticAt > &Notes, bool IsConstantInitializer) const
 EvaluateAsInitializer - Evaluate an expression as if it were the initializer of the given declaration.
bool EvaluateWithSubstitution (APValue &Value, ASTContext &Ctx, const FunctionDecl *Callee, ArrayRef< const Expr * > Args, const Expr *This=nullptr) const
 EvaluateWithSubstitution - Evaluate an expression as if from the context of a call to the given function with the given arguments, inside an unevaluated context.
bool EvaluateAsConstantExpr (EvalResult &Result, const ASTContext &Ctx, ConstantExprKind Kind=ConstantExprKind::Normal) const
 Evaluate an expression that is required to be a constant expression.
bool tryEvaluateObjectSize (uint64_t &Result, ASTContext &Ctx, unsigned Type) const
 If the current Expr is a pointer, this will try to statically determine the number of bytes available where the pointer is pointing.
bool tryEvaluateStrLen (uint64_t &Result, ASTContext &Ctx) const
 If the current Expr is a pointer, this will try to statically determine the strlen of the string pointed to.
bool EvaluateCharRangeAsString (std::string &Result, const Expr *SizeExpression, const Expr *PtrExpression, ASTContext &Ctx, EvalResult &Status) const
bool EvaluateCharRangeAsString (APValue &Result, const Expr *SizeExpression, const Expr *PtrExpression, ASTContext &Ctx, EvalResult &Status) const
std::optional< std::string > tryEvaluateString (ASTContext &Ctx) const
 If the current Expr can be evaluated to a pointer to a null-terminated constant string, return the constant string (without the terminating null).
NullPointerConstantKind isNullPointerConstant (ASTContext &Ctx, NullPointerConstantValueDependence NPC) const
 isNullPointerConstant - C99 6.3.2.3p3 - Test if this reduces down to a Null pointer constant.
bool isOBJCGCCandidate (ASTContext &Ctx) const
 isOBJCGCCandidate - Return true if this expression may be used in a read/ write barrier.
bool isBoundMemberFunction (ASTContext &Ctx) const
 Returns true if this expression is a bound member function.
ExprIgnoreUnlessSpelledInSource ()
 Skip past any invisible AST nodes which might surround this statement, such as ExprWithCleanups or ImplicitCastExpr nodes, but also injected CXXMemberExpr and CXXConstructExpr which represent implicit conversions.
const ExprIgnoreUnlessSpelledInSource () const
ExprIgnoreImpCasts () LLVM_READONLY
 Skip past any implicit casts which might surround this expression until reaching a fixed point.
const ExprIgnoreImpCasts () const
ExprIgnoreCasts () LLVM_READONLY
 Skip past any casts which might surround this expression until reaching a fixed point.
const ExprIgnoreCasts () const
ExprIgnoreImplicit () LLVM_READONLY
 Skip past any implicit AST nodes which might surround this expression until reaching a fixed point.
const ExprIgnoreImplicit () const
ExprIgnoreImplicitAsWritten () LLVM_READONLY
 Skip past any implicit AST nodes which might surround this expression until reaching a fixed point.
const ExprIgnoreImplicitAsWritten () const
ExprIgnoreParens () LLVM_READONLY
 Skip past any parentheses which might surround this expression until reaching a fixed point.
const ExprIgnoreParens () const
ExprIgnoreParenImpCasts () LLVM_READONLY
 Skip past any parentheses and implicit casts which might surround this expression until reaching a fixed point.
const ExprIgnoreParenImpCasts () const
ExprIgnoreParenCasts () LLVM_READONLY
 Skip past any parentheses and casts which might surround this expression until reaching a fixed point.
const ExprIgnoreParenCasts () const
ExprIgnoreConversionOperatorSingleStep () LLVM_READONLY
 Skip conversion operators.
const ExprIgnoreConversionOperatorSingleStep () const
ExprIgnoreParenLValueCasts () LLVM_READONLY
 Skip past any parentheses and lvalue casts which might surround this expression until reaching a fixed point.
const ExprIgnoreParenLValueCasts () const
ExprIgnoreParenNoopCasts (const ASTContext &Ctx) LLVM_READONLY
 Skip past any parentheses and casts which do not change the value (including ptr->int casts of the same size) until reaching a fixed point.
const ExprIgnoreParenNoopCasts (const ASTContext &Ctx) const
ExprIgnoreParenBaseCasts () LLVM_READONLY
 Skip past any parentheses and derived-to-base casts until reaching a fixed point.
const ExprIgnoreParenBaseCasts () const
bool isDefaultArgument () const
 Determine whether this expression is a default function argument.
bool isTemporaryObject (ASTContext &Ctx, const CXXRecordDecl *TempTy) const
 Determine whether the result of this expression is a temporary object of the given class type.
bool isImplicitCXXThis () const
 Whether this expression is an implicit reference to 'this' in C++.
const CXXRecordDeclgetBestDynamicClassType () const
 For an expression of class type or pointer to class type, return the most derived class decl the expression is known to refer to.
const ExprgetBestDynamicClassTypeExpr () const
 Get the inner expression that determines the best dynamic class.
const ExprskipRValueSubobjectAdjustments (SmallVectorImpl< const Expr * > &CommaLHS, SmallVectorImpl< SubobjectAdjustment > &Adjustments) const
 Walk outwards from an expression we want to bind a reference to and find the expression whose lifetime needs to be extended.
const ExprskipRValueSubobjectAdjustments () const
Public Member Functions inherited from clang::ValueStmt
const ExprgetExprStmt () const
ExprgetExprStmt ()
Public Member Functions inherited from clang::Stmt
void * operator new (size_t bytes, const ASTContext &C, unsigned alignment=8)
void * operator new (size_t bytes, const ASTContext *C, unsigned alignment=8)
void * operator new (size_t bytes, void *mem) noexcept
void operator delete (void *, const ASTContext &, unsigned) noexcept
void operator delete (void *, const ASTContext *, unsigned) noexcept
void operator delete (void *, size_t) noexcept
void operator delete (void *, void *) noexcept
 Stmt ()=delete
 Stmt (const Stmt &)=delete
 Stmt (Stmt &&)=delete
Stmtoperator= (const Stmt &)=delete
Stmtoperator= (Stmt &&)=delete
 Stmt (StmtClass SC)
StmtClass getStmtClass () const
const char * getStmtClassName () const
SourceRange getSourceRange () const LLVM_READONLY
 SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager.
SourceLocation getBeginLoc () const LLVM_READONLY
SourceLocation getEndLoc () const LLVM_READONLY
void dump () const
 Dumps the specified AST fragment and all subtrees to llvm::errs().
void dump (raw_ostream &OS, const ASTContext &Context) const
int64_t getID (const ASTContext &Context) const
void dumpColor () const
 dumpColor - same as dump(), but forces color highlighting.
void dumpPretty (const ASTContext &Context) const
 dumpPretty/printPretty - These two methods do a "pretty print" of the AST back to its original source language syntax.
void printPretty (raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, StringRef NewlineSymbol="\n", const ASTContext *Context=nullptr) const
void printPrettyControlled (raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, StringRef NewlineSymbol="\n", const ASTContext *Context=nullptr) const
void printJson (raw_ostream &Out, PrinterHelper *Helper, const PrintingPolicy &Policy, bool AddQuotes) const
 Pretty-prints in JSON format.
void viewAST () const
 viewAST - Visualize an AST rooted at this Stmt* using GraphViz.
StmtIgnoreContainers (bool IgnoreCaptured=false)
 Skip no-op (attributed, compound) container stmts and skip captured stmt at the top, if IgnoreCaptured is true.
const StmtIgnoreContainers (bool IgnoreCaptured=false) const
const StmtstripLabelLikeStatements () const
 Strip off all label-like statements.
StmtstripLabelLikeStatements ()
child_range children ()
const_child_range children () const
child_iterator child_begin ()
child_iterator child_end ()
const_child_iterator child_begin () const
const_child_iterator child_end () const
void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical, bool ProfileLambdaExpr=false) const
 Produce a unique representation of the given statement.
void ProcessODRHash (llvm::FoldingSetNodeID &ID, ODRHash &Hash) const
 Calculate a unique representation for a statement that is stable across compiler invocations.

Static Public Member Functions

static std::pair< const NamedDecl *, const WarnUnusedResultAttr * > getUnusedResultAttrImpl (const Decl *Callee, QualType ReturnType)
 Returns the WarnUnusedResultAttr that is declared on the callee or its return type declaration, together with a NamedDecl that refers to the declaration the attribute is attached to.
static ExprValueKind getValueKindForType (QualType T)
 getValueKindForType - Given a formal return or parameter type, give its value kind.
static bool isPotentialConstantExpr (const FunctionDecl *FD, SmallVectorImpl< PartialDiagnosticAt > &Diags)
 isPotentialConstantExpr - Return true if this function's definition might be usable in a constant expression in C++11, if it were marked constexpr.
static bool isPotentialConstantExprUnevaluated (Expr *E, const FunctionDecl *FD, SmallVectorImpl< PartialDiagnosticAt > &Diags)
 isPotentialConstantExprUnevaluated - Return true if this expression might be usable in a constant expression in C++11 in an unevaluated context, if it were in function FD marked constexpr.
static QualType findBoundMemberType (const Expr *expr)
 Given an expression of bound-member type, find the type of the member.
static bool hasAnyTypeDependentArguments (ArrayRef< Expr * > Exprs)
 hasAnyTypeDependentArguments - Determines if any of the expressions in Exprs is type-dependent.
static bool isSameComparisonOperand (const Expr *E1, const Expr *E2)
 Checks that the two Expr's will refer to the same value as a comparison operand.
static bool classof (const Stmt *T)
Static Public Member Functions inherited from clang::ValueStmt
static bool classof (const Stmt *T)
Static Public Member Functions inherited from clang::Stmt
static void addStmtClass (const StmtClass s)
static void EnableStatistics ()
static void PrintStats ()
static Likelihood getLikelihood (ArrayRef< const Attr * > Attrs)
static Likelihood getLikelihood (const Stmt *S)
static const AttrgetLikelihoodAttr (const Stmt *S)
static Likelihood getLikelihood (const Stmt *Then, const Stmt *Else)
static std::tuple< bool, const Attr *, const Attr * > determineLikelihoodConflict (const Stmt *Then, const Stmt *Else)

Protected Member Functions

 Expr (StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK)
 Expr (StmtClass SC, EmptyShell)
 Construct an empty expression.
void setDependence (ExprDependence Deps)
 Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
Protected Member Functions inherited from clang::ValueStmt
 Stmt (StmtClass SC, EmptyShell)
 Construct an empty statement.
 Stmt ()=delete
 Stmt (const Stmt &)=delete
 Stmt (Stmt &&)=delete
 Stmt (StmtClass SC)
Protected Member Functions inherited from clang::Stmt
void * operator new (size_t bytes) noexcept
void operator delete (void *data) noexcept
 Stmt (StmtClass SC, EmptyShell)
 Construct an empty statement.

Friends

class ASTImporter
class ASTStmtReader

Additional Inherited Members

Protected Types inherited from clang::Stmt
enum  { NumExprBits = NumStmtBits + 5 + llvm::BitWidth<ExprDependence> }
enum  { NumCallExprBits = 25 }
enum  { NumOverloadExprBits = NumExprBits + 1 }
template<typename T>
using ConstCastIterator = CastIterator<T, const T *const, const Stmt *const>
 Const iterator for iterating over Stmt * arrays that contain only T *.
using ExprIterator = CastIterator<Expr>
using ConstExprIterator = ConstCastIterator<Expr>
Protected Attributes inherited from clang::Stmt
union { 
   StmtBitfields   StmtBits 
   NullStmtBitfields   NullStmtBits 
   CompoundStmtBitfields   CompoundStmtBits 
   LabelStmtBitfields   LabelStmtBits 
   AttributedStmtBitfields   AttributedStmtBits 
   IfStmtBitfields   IfStmtBits 
   SwitchStmtBitfields   SwitchStmtBits 
   WhileStmtBitfields   WhileStmtBits 
   DoStmtBitfields   DoStmtBits 
   ForStmtBitfields   ForStmtBits 
   GotoStmtBitfields   GotoStmtBits 
   LoopControlStmtBitfields   LoopControlStmtBits 
   ReturnStmtBitfields   ReturnStmtBits 
   SwitchCaseBitfields   SwitchCaseBits 
   ExprBitfields   ExprBits 
   ConstantExprBitfields   ConstantExprBits 
   PredefinedExprBitfields   PredefinedExprBits 
   DeclRefExprBitfields   DeclRefExprBits 
   FloatingLiteralBitfields   FloatingLiteralBits 
   StringLiteralBitfields   StringLiteralBits 
   CharacterLiteralBitfields   CharacterLiteralBits 
   UnaryOperatorBitfields   UnaryOperatorBits 
   UnaryExprOrTypeTraitExprBitfields   UnaryExprOrTypeTraitExprBits 
   ArrayOrMatrixSubscriptExprBitfields   ArrayOrMatrixSubscriptExprBits 
   CallExprBitfields   CallExprBits 
   MemberExprBitfields   MemberExprBits 
   CastExprBitfields   CastExprBits 
   BinaryOperatorBitfields   BinaryOperatorBits 
   InitListExprBitfields   InitListExprBits 
   ParenListExprBitfields   ParenListExprBits 
   GenericSelectionExprBitfields   GenericSelectionExprBits 
   PseudoObjectExprBitfields   PseudoObjectExprBits 
   SourceLocExprBitfields   SourceLocExprBits 
   ParenExprBitfields   ParenExprBits 
   ShuffleVectorExprBitfields   ShuffleVectorExprBits 
   StmtExprBitfields   StmtExprBits 
   ChooseExprBitfields   ChooseExprBits 
   CXXOperatorCallExprBitfields   CXXOperatorCallExprBits 
   CXXRewrittenBinaryOperatorBitfields   CXXRewrittenBinaryOperatorBits 
   CXXBoolLiteralExprBitfields   CXXBoolLiteralExprBits 
   CXXNullPtrLiteralExprBitfields   CXXNullPtrLiteralExprBits 
   CXXThisExprBitfields   CXXThisExprBits 
   CXXThrowExprBitfields   CXXThrowExprBits 
   CXXDefaultArgExprBitfields   CXXDefaultArgExprBits 
   CXXDefaultInitExprBitfields   CXXDefaultInitExprBits 
   CXXScalarValueInitExprBitfields   CXXScalarValueInitExprBits 
   CXXNewExprBitfields   CXXNewExprBits 
   CXXDeleteExprBitfields   CXXDeleteExprBits 
   TypeTraitExprBitfields   TypeTraitExprBits 
   DependentScopeDeclRefExprBitfields   DependentScopeDeclRefExprBits 
   CXXConstructExprBitfields   CXXConstructExprBits 
   ExprWithCleanupsBitfields   ExprWithCleanupsBits 
   CXXUnresolvedConstructExprBitfields   CXXUnresolvedConstructExprBits 
   CXXDependentScopeMemberExprBitfields   CXXDependentScopeMemberExprBits 
   OverloadExprBitfields   OverloadExprBits 
   UnresolvedLookupExprBitfields   UnresolvedLookupExprBits 
   UnresolvedMemberExprBitfields   UnresolvedMemberExprBits 
   CXXNoexceptExprBitfields   CXXNoexceptExprBits 
   SubstNonTypeTemplateParmExprBitfields   SubstNonTypeTemplateParmExprBits 
   LambdaExprBitfields   LambdaExprBits 
   RequiresExprBitfields   RequiresExprBits 
   ArrayTypeTraitExprBitfields   ArrayTypeTraitExprBits 
   ExpressionTraitExprBitfields   ExpressionTraitExprBits 
   CXXFoldExprBitfields   CXXFoldExprBits 
   PackIndexingExprBitfields   PackIndexingExprBits 
   CoawaitExprBitfields   CoawaitBits 
   ObjCIndirectCopyRestoreExprBitfields   ObjCIndirectCopyRestoreExprBits 
   OpaqueValueExprBitfields   OpaqueValueExprBits 
   ConvertVectorExprBitfields   ConvertVectorExprBits 
}; 

Detailed Description

This represents one expression.

Note that Expr's are subclasses of Stmt. This allows an expression to be transparently used any place a Stmt is required.

Definition at line 112 of file Expr.h.

Member Enumeration Documentation

◆ ConstantExprKind

enum class clang::Expr::ConstantExprKind
strong
Enumerator
Normal 

An integer constant expression (an array bound, enumerator, case value, bit-field width, or similar) or similar.

NonClassTemplateArgument 

A non-class template argument.

Such a value is only used for mangling, not for code generation, so can refer to dllimported functions.

ClassTemplateArgument 

A class template argument. Such a value is used for code generation.

ImmediateInvocation 

An immediate invocation.

The destruction of the end result of this evaluation is not part of the evaluation, but all other temporaries are destroyed.

Definition at line 749 of file Expr.h.

◆ isModifiableLvalueResult

Enumerator
MLV_Valid 
MLV_NotObjectType 
MLV_IncompleteVoidType 
MLV_DuplicateVectorComponents 
MLV_InvalidExpression 
MLV_LValueCast 
MLV_IncompleteType 
MLV_ConstQualified 
MLV_ConstQualifiedField 
MLV_ConstAddrSpace 
MLV_ArrayType 
MLV_NoSetterProperty 
MLV_MemberFunction 
MLV_SubObjCPropertySetting 
MLV_InvalidMessageExpression 
MLV_ClassTemporary 
MLV_ArrayTemporary 

Definition at line 304 of file Expr.h.

◆ LValueClassification

Enumerator
LV_Valid 
LV_NotObjectType 
LV_IncompleteVoidType 
LV_DuplicateVectorComponents 
LV_InvalidExpression 
LV_InvalidMessageExpression 
LV_MemberFunction 
LV_SubObjCPropertySetting 
LV_ClassTemporary 
LV_ArrayTemporary 

Definition at line 289 of file Expr.h.

◆ NullPointerConstantKind

Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant().

Enumerator
NPCK_NotNull 

Expression is not a Null pointer constant.

NPCK_ZeroExpression 

Expression is a Null pointer constant built from a zero integer expression that is not a simple, possibly parenthesized, zero literal.

C++ Core Issue 903 will classify these expressions as "not pointers" once it is adopted. http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#903

NPCK_ZeroLiteral 

Expression is a Null pointer constant built from a literal zero.

NPCK_CXX11_nullptr 

Expression is a C++11 nullptr.

NPCK_GNUNull 

Expression is a GNU-style __null constant.

Definition at line 802 of file Expr.h.

◆ NullPointerConstantValueDependence

Enumeration used to describe how isNullPointerConstant() should cope with value-dependent expressions.

Enumerator
NPC_NeverValueDependent 

Specifies that the expression should never be value-dependent.

NPC_ValueDependentIsNull 

Specifies that a value-dependent expression of integral or dependent type should be considered a null pointer constant.

NPC_ValueDependentIsNotNull 

Specifies that a value-dependent expression should be considered to never be a null pointer constant.

Definition at line 825 of file Expr.h.

◆ SideEffectsKind

Enumerator
SE_NoSideEffects 

Strictly evaluate the expression.

SE_AllowUndefinedBehavior 

Allow UB that we can give a value, but not arbitrary unmodeled side effects.

SE_AllowSideEffects 

Allow any unmodeled side effect.

Definition at line 670 of file Expr.h.

Constructor & Destructor Documentation

◆ Expr() [1/5]

clang::Expr::Expr ( )
delete

Referenced by clang::AbstractConditionalOperator::AbstractConditionalOperator(), clang::AbstractConditionalOperator::AbstractConditionalOperator(), clang::AddrLabelExpr::AddrLabelExpr(), clang::AddrLabelExpr::AddrLabelExpr(), clang::ArrayInitIndexExpr::ArrayInitIndexExpr(), clang::ArrayInitLoopExpr::ArrayInitLoopExpr(), clang::ArraySectionExpr::ArraySectionExpr(), clang::ArraySectionExpr::ArraySectionExpr(), clang::ArraySectionExpr::ArraySectionExpr(), clang::ArraySubscriptExpr::ArraySubscriptExpr(), clang::ArraySubscriptExpr::ArraySubscriptExpr(), clang::ArrayTypeTraitExpr::ArrayTypeTraitExpr(), clang::ArrayTypeTraitExpr::ArrayTypeTraitExpr(), clang::CXXDefaultArgExpr::ASTReader, clang::CXXDefaultInitExpr::ASTReader, clang::AsTypeExpr::ASTStmtReader, clang::ConvertVectorExpr::ASTStmtReader, clang::CXXPseudoDestructorExpr::ASTStmtReader, clang::CXXUnresolvedConstructExpr::ASTStmtReader, clang::ObjCIndirectCopyRestoreExpr::ASTStmtReader, clang::OpaqueValueExpr::ASTStmtReader, clang::OpenACCAsteriskSizeExpr::ASTStmtReader, clang::SubstNonTypeTemplateParmExpr::ASTStmtReader, clang::SubstNonTypeTemplateParmPackExpr::ASTStmtReader, clang::CXXParenListInitExpr::ASTStmtWriter, clang::MaterializeTemporaryExpr::ASTStmtWriter, clang::OMPArrayShapingExpr::ASTStmtWriter, clang::PackIndexingExpr::ASTStmtWriter, clang::SizeOfPackExpr::ASTStmtWriter, clang::AsTypeExpr::AsTypeExpr(), clang::AtomicExpr::AtomicExpr(), clang::AtomicExpr::AtomicExpr(), clang::BinaryOperator::BinaryOperator(), clang::BinaryOperator::BinaryOperator(), clang::BinaryOperator::BinaryOperator(), clang::BinaryOperator::BinaryOperator(), clang::BlockExpr::BlockExpr(), clang::BlockExpr::BlockExpr(), clang::CallExpr::CallExpr(), clang::CallExpr::CallExpr(), clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_begin(), clang::CastExpr::CastExpr(), clang::CastExpr::CastExpr(), clang::CharacterLiteral::CharacterLiteral(), clang::CharacterLiteral::CharacterLiteral(), clang::ChooseExpr::ChooseExpr(), clang::ChooseExpr::ChooseExpr(), clang::CompoundLiteralExpr::CompoundLiteralExpr(), clang::CompoundLiteralExpr::CompoundLiteralExpr(), clang::CallExpr::computeDependence(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::BinaryOperator::Create(), clang::CallExpr::Create(), clang::ConvertVectorExpr::Create(), clang::CXXBindTemporaryExpr::Create(), clang::CXXDefaultArgExpr::Create(), clang::CXXDefaultInitExpr::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::CXXNewExpr::Create(), clang::DesignatedInitExpr::Create(), clang::GenericSelectionExpr::Create(), clang::GenericSelectionExpr::Create(), clang::HLSLOutArgExpr::Create(), clang::MemberExpr::Create(), clang::ObjCMessageExpr::Create(), clang::OMPArrayShapingExpr::Create(), clang::PackIndexingExpr::Create(), clang::PseudoObjectExpr::Create(), clang::UnaryOperator::Create(), clang::MemberExpr::CreateImplicit(), clang::CXXBindTemporaryExpr::CXXBindTemporaryExpr(), clang::CXXBoolLiteralExpr::CXXBoolLiteralExpr(), clang::CXXBoolLiteralExpr::CXXBoolLiteralExpr(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXDeleteExpr::CXXDeleteExpr(), clang::CXXDeleteExpr::CXXDeleteExpr(), clang::CXXFoldExpr::CXXFoldExpr(), clang::CXXFoldExpr::CXXFoldExpr(), clang::CXXInheritedCtorInitExpr::CXXInheritedCtorInitExpr(), clang::CXXInheritedCtorInitExpr::CXXInheritedCtorInitExpr(), clang::CXXNoexceptExpr::CXXNoexceptExpr(), clang::CXXNoexceptExpr::CXXNoexceptExpr(), clang::CXXNullPtrLiteralExpr::CXXNullPtrLiteralExpr(), clang::CXXNullPtrLiteralExpr::CXXNullPtrLiteralExpr(), clang::CXXParenListInitExpr::CXXParenListInitExpr(), clang::CXXPseudoDestructorExpr::CXXPseudoDestructorExpr(), clang::CXXPseudoDestructorExpr::CXXPseudoDestructorExpr(), clang::CXXRewrittenBinaryOperator::CXXRewrittenBinaryOperator(), clang::CXXRewrittenBinaryOperator::CXXRewrittenBinaryOperator(), clang::CXXScalarValueInitExpr::CXXScalarValueInitExpr(), clang::CXXScalarValueInitExpr::CXXScalarValueInitExpr(), clang::CXXStdInitializerListExpr::CXXStdInitializerListExpr(), clang::CXXThrowExpr::CXXThrowExpr(), clang::CXXThrowExpr::CXXThrowExpr(), clang::CXXTypeidExpr::CXXTypeidExpr(), clang::CXXTypeidExpr::CXXTypeidExpr(), clang::CXXTypeidExpr::CXXTypeidExpr(), clang::CXXUuidofExpr::CXXUuidofExpr(), clang::CXXUuidofExpr::CXXUuidofExpr(), clang::CXXUuidofExpr::CXXUuidofExpr(), clang::DeclRefExpr::DeclRefExpr(), clang::DependentCoawaitExpr::DependentCoawaitExpr(), clang::DependentCoawaitExpr::DependentCoawaitExpr(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), clang::EmbedExpr::EmbedExpr(), clang::EmbedExpr::EmbedExpr(), EvaluateAsConstantExpr(), clang::CallExpr::evaluateBytesReturnedByAllocSizeCall(), EvaluateCharRangeAsString(), EvaluateCharRangeAsString(), clang::SourceLocExpr::EvaluateInContext(), EvaluateWithSubstitution(), Expr(), Expr(), clang::ExpressionTraitExpr::ExpressionTraitExpr(), clang::ExpressionTraitExpr::ExpressionTraitExpr(), clang::ExtVectorElementExpr::ExtVectorElementExpr(), clang::ExtVectorElementExpr::ExtVectorElementExpr(), clang::OverloadExpr::find(), findBoundMemberType(), clang::OpaqueValueExpr::findInCopyConstruct(), clang::FixedPointLiteral::FixedPointLiteral(), clang::FullExpr::FullExpr(), clang::FullExpr::FullExpr(), clang::CXXDefaultArgExpr::getAdjustedRewrittenExpr(), clang::CXXDefaultArgExpr::getAdjustedRewrittenExpr(), clang::CallExpr::getArg(), clang::CallExpr::getArg(), clang::CXXConstructExpr::getArg(), clang::CXXConstructExpr::getArg(), clang::CXXUnresolvedConstructExpr::getArg(), clang::CXXUnresolvedConstructExpr::getArg(), clang::ObjCMessageExpr::getArg(), clang::ObjCMessageExpr::getArg(), clang::HLSLOutArgExpr::getArgLValue(), clang::HLSLOutArgExpr::getArgLValue(), clang::CallExpr::getArgs(), clang::CallExpr::getArgs(), clang::CXXConstructExpr::getArgs(), clang::CXXConstructExpr::getArgs(), clang::ObjCMessageExpr::getArgs(), clang::ObjCMessageExpr::getArgs(), clang::CXXDeleteExpr::getArgument(), clang::CXXDeleteExpr::getArgument(), clang::UnaryExprOrTypeTraitExpr::getArgumentExpr(), clang::UnaryExprOrTypeTraitExpr::getArgumentExpr(), clang::CXXParenListInitExpr::getArrayFiller(), clang::CXXParenListInitExpr::getArrayFiller(), clang::InitListExpr::getArrayFiller(), clang::InitListExpr::getArrayFiller(), clang::DesignatedInitExpr::getArrayIndex(), clang::DesignatedInitExpr::getArrayRangeEnd(), clang::DesignatedInitExpr::getArrayRangeStart(), clang::GenericSelectionExpr::getAssocExprs(), clang::ArraySectionExpr::getBase(), clang::ArraySectionExpr::getBase(), clang::ArraySubscriptExpr::getBase(), clang::ArraySubscriptExpr::getBase(), clang::CXXDependentScopeMemberExpr::getBase(), clang::CXXPseudoDestructorExpr::getBase(), clang::DesignatedInitUpdateExpr::getBase(), clang::ExtVectorElementExpr::getBase(), clang::ExtVectorElementExpr::getBase(), clang::MatrixSubscriptExpr::getBase(), clang::MatrixSubscriptExpr::getBase(), clang::MemberExpr::getBase(), clang::MSPropertySubscriptExpr::getBase(), clang::MSPropertySubscriptExpr::getBase(), clang::ObjCIsaExpr::getBase(), clang::ObjCIvarRefExpr::getBase(), clang::ObjCIvarRefExpr::getBase(), clang::ObjCPropertyRefExpr::getBase(), clang::ObjCPropertyRefExpr::getBase(), clang::OMPArrayShapingExpr::getBase(), clang::OMPArrayShapingExpr::getBase(), clang::MSPropertyRefExpr::getBaseExpr(), clang::ObjCSubscriptRefExpr::getBaseExpr(), clang::ArraySectionExpr::getBaseOriginalType(), getBestDynamicClassType(), getBestDynamicClassTypeExpr(), clang::CallExpr::getCallee(), clang::CallExpr::getCallee(), clang::CallExpr::getCallReturnType(), clang::ChooseExpr::getChosenSubExpr(), clang::MatrixSubscriptExpr::getColumnIdx(), clang::MatrixSubscriptExpr::getColumnIdx(), clang::CoroutineSuspendExpr::getCommonExpr(), clang::AbstractConditionalOperator::getCond(), clang::ChooseExpr::getCond(), clang::GenericSelectionExpr::getControllingExpr(), clang::GenericSelectionExpr::getControllingExpr(), clang::CastExpr::getConversionFunction(), clang::CXXRewrittenBinaryOperator::getDecomposedForm(), clang::CXXDeleteExpr::getDestroyedType(), clang::ArrayTypeTraitExpr::getDimensionExpression(), clang::ObjCArrayLiteral::getElement(), clang::ObjCArrayLiteral::getElement(), clang::ObjCArrayLiteral::getElements(), clang::ObjCArrayLiteral::getElements(), clang::CXXConstructExpr::getEndLoc(), getEnumConstantDecl(), getEnumConstantDecl(), clang::CXXDefaultArgExpr::getExpr(), clang::CXXDefaultArgExpr::getExpr(), clang::CXXDefaultInitExpr::getExpr(), clang::CXXDefaultInitExpr::getExpr(), clang::ParenListExpr::getExpr(), clang::ParenListExpr::getExpr(), clang::ShuffleVectorExpr::getExpr(), clang::ShuffleVectorExpr::getExpr(), clang::CXXTypeidExpr::getExprOperand(), clang::CXXUuidofExpr::getExprOperand(), clang::ParenListExpr::getExprs(), clang::AbstractConditionalOperator::getFalseExpr(), clang::ArraySubscriptExpr::getIdx(), clang::ArraySubscriptExpr::getIdx(), clang::MSPropertySubscriptExpr::getIdx(), clang::MSPropertySubscriptExpr::getIdx(), clang::OffsetOfExpr::getIndexExpr(), clang::OffsetOfExpr::getIndexExpr(), clang::PackIndexingExpr::getIndexExpr(), clang::CXXFoldExpr::getInit(), clang::DesignatedInitExpr::getInit(), clang::InitListExpr::getInit(), clang::InitListExpr::getInit(), clang::CompoundLiteralExpr::getInitializer(), clang::CompoundLiteralExpr::getInitializer(), clang::CXXNewExpr::getInitializer(), clang::CXXNewExpr::getInitializer(), clang::InitListExpr::getInits(), clang::InitListExpr::getInits(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCSubscriptRefExpr::getKeyExpr(), clang::ArraySectionExpr::getLength(), clang::ArraySectionExpr::getLength(), clang::ArraySubscriptExpr::getLHS(), clang::ArraySubscriptExpr::getLHS(), clang::BinaryOperator::getLHS(), clang::ChooseExpr::getLHS(), clang::CXXFoldExpr::getLHS(), clang::CXXRewrittenBinaryOperator::getLHS(), clang::ArraySectionExpr::getLowerBound(), clang::ArraySectionExpr::getLowerBound(), getObjCProperty(), clang::CoroutineSuspendExpr::getOperand(), clang::CXXNoexceptExpr::getOperand(), clang::DependentCoawaitExpr::getOperand(), clang::AtomicExpr::getOrder(), clang::AtomicExpr::getOrderFail(), clang::PackIndexingExpr::getPackIdExpression(), clang::CXXFoldExpr::getPattern(), clang::PackExpansionExpr::getPattern(), clang::PackExpansionExpr::getPattern(), clang::CXXNewExpr::getPlacementArg(), clang::CXXNewExpr::getPlacementArg(), clang::CXXNewExpr::getPlacementArgs(), clang::AtomicExpr::getPtr(), clang::ExpressionTraitExpr::getQueriedExpression(), clang::CoroutineSuspendExpr::getReadyExpr(), getReferencedDeclOfCallee(), getReferencedDeclOfCallee(), clang::SubstNonTypeTemplateParmExpr::getReplacement(), clang::GenericSelectionExpr::getResultExpr(), clang::GenericSelectionExpr::getResultExpr(), clang::PseudoObjectExpr::getResultExpr(), clang::PseudoObjectExpr::getResultExpr(), clang::CoroutineSuspendExpr::getResumeExpr(), clang::CXXDefaultArgExpr::getRewrittenExpr(), clang::CXXDefaultArgExpr::getRewrittenExpr(), clang::CXXDefaultInitExpr::getRewrittenExpr(), clang::CXXDefaultInitExpr::getRewrittenExpr(), clang::ArraySubscriptExpr::getRHS(), clang::ArraySubscriptExpr::getRHS(), clang::BinaryOperator::getRHS(), clang::ChooseExpr::getRHS(), clang::CXXFoldExpr::getRHS(), clang::CXXRewrittenBinaryOperator::getRHS(), clang::MatrixSubscriptExpr::getRowIdx(), clang::MatrixSubscriptExpr::getRowIdx(), clang::AtomicExpr::getScope(), clang::PackIndexingExpr::getSelectedExpr(), clang::ObjCMessageExpr::getSelectorLoc(), clang::PseudoObjectExpr::getSemanticExpr(), clang::PseudoObjectExpr::getSemanticExpr(), clang::CXXRewrittenBinaryOperator::getSemanticForm(), clang::CXXRewrittenBinaryOperator::getSemanticForm(), getSourceBitField(), getSourceBitField(), clang::OpaqueValueExpr::getSourceExpr(), clang::AsTypeExpr::getSrcExpr(), clang::ConvertVectorExpr::getSrcExpr(), clang::ArraySectionExpr::getStride(), clang::ArraySectionExpr::getStride(), clang::ArrayInitLoopExpr::getSubExpr(), clang::CastExpr::getSubExpr(), clang::CastExpr::getSubExpr(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::CXXStdInitializerListExpr::getSubExpr(), clang::CXXStdInitializerListExpr::getSubExpr(), clang::CXXThrowExpr::getSubExpr(), clang::CXXThrowExpr::getSubExpr(), clang::DesignatedInitExpr::getSubExpr(), clang::FullExpr::getSubExpr(), clang::FullExpr::getSubExpr(), clang::ImaginaryLiteral::getSubExpr(), clang::ImaginaryLiteral::getSubExpr(), clang::MaterializeTemporaryExpr::getSubExpr(), clang::ObjCBoxedExpr::getSubExpr(), clang::ObjCBoxedExpr::getSubExpr(), clang::ObjCIndirectCopyRestoreExpr::getSubExpr(), clang::ObjCIndirectCopyRestoreExpr::getSubExpr(), clang::ParenExpr::getSubExpr(), clang::ParenExpr::getSubExpr(), clang::UnaryOperator::getSubExpr(), clang::VAArgExpr::getSubExpr(), clang::VAArgExpr::getSubExpr(), clang::CastExpr::getSubExprAsWritten(), clang::CastExpr::getSubExprAsWritten(), clang::AtomicExpr::getSubExprs(), clang::AtomicExpr::getSubExprs(), clang::ShuffleVectorExpr::getSubExprs(), clang::CoroutineSuspendExpr::getSuspendExpr(), clang::PseudoObjectExpr::getSyntacticForm(), clang::PseudoObjectExpr::getSyntacticForm(), clang::AbstractConditionalOperator::getTrueExpr(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::AtomicExpr::getWeak(), clang::HLSLOutArgExpr::getWritebackCast(), clang::HLSLOutArgExpr::getWritebackCast(), clang::GNUNullExpr::GNUNullExpr(), clang::GNUNullExpr::GNUNullExpr(), HasSideEffects(), IgnoreCasts(), IgnoreCasts(), IgnoreConversionOperatorSingleStep(), IgnoreConversionOperatorSingleStep(), IgnoreImpCasts(), IgnoreImpCasts(), IgnoreImplicit(), IgnoreImplicit(), IgnoreImplicitAsWritten(), IgnoreImplicitAsWritten(), IgnoreParenBaseCasts(), IgnoreParenBaseCasts(), IgnoreParenCasts(), IgnoreParenCasts(), IgnoreParenImpCasts(), IgnoreParenImpCasts(), IgnoreParenLValueCasts(), IgnoreParenLValueCasts(), IgnoreParenNoopCasts(), IgnoreParenNoopCasts(), IgnoreParens(), IgnoreParens(), IgnoreUnlessSpelledInSource(), IgnoreUnlessSpelledInSource(), clang::ImaginaryLiteral::ImaginaryLiteral(), clang::ImaginaryLiteral::ImaginaryLiteral(), clang::ImplicitValueInitExpr::ImplicitValueInitExpr(), clang::ImplicitValueInitExpr::ImplicitValueInitExpr(), clang::InitListExpr::InitListExpr(), clang::InitListExpr::InitListExpr(), clang::IntegerLiteral::IntegerLiteral(), clang::CallExpr::isBuiltinAssumeFalse(), isConstantInitializer(), isDefaultArgument(), isFlexibleArrayMemberLike(), isImplicitCXXThis(), isKnownToHaveBooleanValue(), clang::CXXTypeidExpr::isMostDerived(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isNullPointerConstant(), isOBJCGCCandidate(), isObjCSelfExpr(), isPotentialConstantExprUnevaluated(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), isReadIfDiscardedInCPlusPlus11(), isSameComparisonOperand(), clang::InitListExpr::isStringLiteralInit(), isTemporaryObject(), isUnusedResultAWarning(), clang::MaterializeTemporaryExpr::MaterializeTemporaryExpr(), clang::MaterializeTemporaryExpr::MaterializeTemporaryExpr(), clang::MatrixSubscriptExpr::MatrixSubscriptExpr(), clang::MatrixSubscriptExpr::MatrixSubscriptExpr(), clang::MSPropertyRefExpr::MSPropertyRefExpr(), clang::MSPropertyRefExpr::MSPropertyRefExpr(), clang::MSPropertySubscriptExpr::MSPropertySubscriptExpr(), clang::MSPropertySubscriptExpr::MSPropertySubscriptExpr(), clang::NoInitExpr::NoInitExpr(), clang::NoInitExpr::NoInitExpr(), clang::ObjCAvailabilityCheckExpr::ObjCAvailabilityCheckExpr(), clang::ObjCAvailabilityCheckExpr::ObjCAvailabilityCheckExpr(), clang::ObjCBoolLiteralExpr::ObjCBoolLiteralExpr(), clang::ObjCBoolLiteralExpr::ObjCBoolLiteralExpr(), clang::ObjCBoxedExpr::ObjCBoxedExpr(), clang::ObjCBoxedExpr::ObjCBoxedExpr(), clang::ObjCEncodeExpr::ObjCEncodeExpr(), clang::ObjCEncodeExpr::ObjCEncodeExpr(), clang::ObjCIndirectCopyRestoreExpr::ObjCIndirectCopyRestoreExpr(), clang::ObjCIsaExpr::ObjCIsaExpr(), clang::ObjCIsaExpr::ObjCIsaExpr(), clang::ObjCIvarRefExpr::ObjCIvarRefExpr(), clang::ObjCIvarRefExpr::ObjCIvarRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCProtocolExpr::ObjCProtocolExpr(), clang::ObjCProtocolExpr::ObjCProtocolExpr(), clang::ObjCSelectorExpr::ObjCSelectorExpr(), clang::ObjCSelectorExpr::ObjCSelectorExpr(), clang::ObjCStringLiteral::ObjCStringLiteral(), clang::ObjCStringLiteral::ObjCStringLiteral(), clang::ObjCSubscriptRefExpr::ObjCSubscriptRefExpr(), clang::ObjCSubscriptRefExpr::ObjCSubscriptRefExpr(), clang::OpaqueValueExpr::OpaqueValueExpr(), clang::OpaqueValueExpr::OpaqueValueExpr(), operator=(), operator=(), clang::OverloadExpr::OverloadExpr(), clang::OverloadExpr::OverloadExpr(), clang::PackExpansionExpr::PackExpansionExpr(), clang::PackExpansionExpr::PackExpansionExpr(), clang::ParenExpr::ParenExpr(), clang::ParenExpr::ParenExpr(), refersToGlobalRegisterVar(), refersToVectorElement(), clang::CallExpr::setArg(), clang::CXXConstructExpr::setArg(), clang::CXXUnresolvedConstructExpr::setArg(), clang::ObjCMessageExpr::setArg(), clang::UnaryExprOrTypeTraitExpr::setArgument(), clang::CXXParenListInitExpr::setArrayFiller(), clang::InitListExpr::setArrayFiller(), clang::DesignatedInitUpdateExpr::setBase(), clang::ExtVectorElementExpr::setBase(), clang::MatrixSubscriptExpr::setBase(), clang::MemberExpr::setBase(), clang::ObjCIsaExpr::setBase(), clang::ObjCIvarRefExpr::setBase(), clang::CallExpr::setCallee(), clang::MatrixSubscriptExpr::setColumnIdx(), clang::ChooseExpr::setCond(), clang::OffsetOfExpr::setIndexExpr(), clang::DesignatedInitExpr::setInit(), clang::InitListExpr::setInit(), clang::CompoundLiteralExpr::setInitializer(), clang::ObjCMessageExpr::setInstanceReceiver(), clang::ArraySubscriptExpr::setLHS(), clang::BinaryOperator::setLHS(), clang::ChooseExpr::setLHS(), clang::ArraySubscriptExpr::setRHS(), clang::BinaryOperator::setRHS(), clang::ChooseExpr::setRHS(), clang::MatrixSubscriptExpr::setRowIdx(), clang::CastExpr::setSubExpr(), clang::CXXBindTemporaryExpr::setSubExpr(), clang::DesignatedInitExpr::setSubExpr(), clang::FullExpr::setSubExpr(), clang::ImaginaryLiteral::setSubExpr(), clang::ParenExpr::setSubExpr(), clang::UnaryOperator::setSubExpr(), clang::VAArgExpr::setSubExpr(), clang::DesignatedInitUpdateExpr::setUpdater(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), skipRValueSubobjectAdjustments(), skipRValueSubobjectAdjustments(), clang::SourceLocExpr::SourceLocExpr(), clang::SourceLocExpr::SourceLocExpr(), clang::StmtExpr::StmtExpr(), clang::StmtExpr::StmtExpr(), clang::SubstNonTypeTemplateParmExpr::SubstNonTypeTemplateParmExpr(), clang::SubstNonTypeTemplateParmPackExpr::SubstNonTypeTemplateParmPackExpr(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::UnaryOperator::UnaryOperator(), clang::UnaryOperator::UnaryOperator(), clang::InitListExpr::updateInit(), clang::VAArgExpr::VAArgExpr(), and clang::VAArgExpr::VAArgExpr().

◆ Expr() [2/5]

clang::Expr::Expr ( const Expr & )
delete

References Expr().

◆ Expr() [3/5]

clang::Expr::Expr ( Expr && )
delete

References Expr().

◆ Expr() [4/5]

clang::Expr::Expr ( StmtClass SC,
QualType T,
ExprValueKind VK,
ExprObjectKind OK )
inlineprotected

Definition at line 123 of file Expr.h.

References clang::Stmt::ExprBits, setType(), and clang::T.

◆ Expr() [5/5]

clang::Expr::Expr ( StmtClass SC,
EmptyShell  )
inlineexplicitprotected

Construct an empty expression.

Definition at line 133 of file Expr.h.

Member Function Documentation

◆ Classify()

Classification clang::Expr::Classify ( ASTContext & Ctx) const
inline

Classify - Classify this expression according to the C++11 expression taxonomy.

C++11 defines ([basic.lval]) a new taxonomy of expressions to replace the old lvalue vs rvalue. This function determines the type of expression this is. There are three expression types:

  • lvalues are classical lvalues as in C++03.
  • prvalues are equivalent to rvalues in C++03.
  • xvalues are expressions yielding unnamed rvalue references, e.g. a function returning an rvalue reference. lvalues and xvalues are collectively referred to as glvalues, while prvalues and xvalues together form rvalues.

Definition at line 412 of file Expr.h.

Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::AddFunctionCandidates(), AddTemplateConversionCandidateImmediately(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::CheckPointerToMemberOperands(), ClassifyLValue(), isTemporaryObject(), clang::Sema::LookupSpecialMember(), LookupSpecialMemberFromXValue(), and clang::Sema::PerformImplicitObjectArgumentInitialization().

◆ ClassifyLValue()

◆ ClassifyModifiable()

Classification clang::Expr::ClassifyModifiable ( ASTContext & Ctx,
SourceLocation & Loc ) const
inline

ClassifyModifiable - Classify this expression according to the C++11 expression taxonomy, and see if it is valid on the left side of an assignment.

This function extends classify in that it also tests whether the expression is modifiable (C99 6.3.2.1p1).

Parameters
LocA source location that might be filled with a relevant location if the expression is not modifiable.

Definition at line 424 of file Expr.h.

Referenced by isModifiableLvalue().

◆ classof()

bool clang::Expr::classof ( const Stmt * T)
inlinestatic

Definition at line 1031 of file Expr.h.

References clang::ValueStmt::Stmt(), and clang::T.

◆ containsErrors()

◆ containsUnexpandedParameterPack()

bool clang::Expr::containsUnexpandedParameterPack ( ) const
inline

Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates).

Given the following function template:

template<typename F, typename ...Types>
void forward(const F &f, Types &&...args) {
f(static_cast<Types&&>(args)...);
}
Code completion in a.

The expressions args and static_cast<Types&&>(args) both contain parameter packs.

Definition at line 241 of file Expr.h.

References getDependence().

Referenced by clang::Sema::ActOnCXXFoldExpr(), clang::Sema::ActOnNoexceptSpec(), clang::SemaOpenMP::ActOnOpenMPAllocateClause(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPDetachClause(), clang::SemaOpenMP::ActOnOpenMPDistScheduleClause(), clang::SemaOpenMP::ActOnOpenMPInitClause(), clang::SemaOpenMP::ActOnOpenMPLinearClause(), clang::SemaOpenMP::ActOnOpenMPScheduleClause(), applyOMPAllocateAttribute(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckPackExpansion(), checkSimdlenSafelenSpecified(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::DiagnoseUnexpandedParameterPackInRequiresExpr(), getAllocatorKind(), getPrivateItem(), handleAlignedAttr(), clang::CXXFoldExpr::isRightFold(), processImplicitMapsWithDefaultMappers(), clang::SemaOpenMP::VerifyPositiveIntegerConstantInClause(), clang::ASTNodeImporter::VisitGenericSelectionExpr(), and clang::ASTNodeImporter::VisitLambdaExpr().

◆ EvaluateAsBooleanCondition()

bool Expr::EvaluateAsBooleanCondition ( bool & Result,
const ASTContext & Ctx,
bool InConstantContext = false ) const

EvaluateAsBooleanCondition - Return true if this is a constant which we can fold and convert to a boolean condition using any crazy technique that we want to, even if the expression has side-effects.

Definition at line 17702 of file ExprConstant.cpp.

References EvaluateAsRValue(), HandleConversionToBool(), isValueDependent(), and clang::Result.

Referenced by CheckNonNullExpr(), emitAtomicOp(), FindTypeTagExpr(), getNumThreads(), and clang::CallExpr::isBuiltinAssumeFalse().

◆ EvaluateAsConstantExpr()

◆ EvaluateAsFixedPoint()

bool Expr::EvaluateAsFixedPoint ( EvalResult & Result,
const ASTContext & Ctx,
SideEffectsKind AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false ) const

EvaluateAsFixedPoint - Return true if this is a constant which we can fold and convert to a fixed point value.

Definition at line 17723 of file ExprConstant.cpp.

References clang::IgnoreSideEffects, isValueDependent(), and clang::Result.

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

◆ EvaluateAsFloat()

bool Expr::EvaluateAsFloat ( llvm::APFloat & Result,
const ASTContext & Ctx,
SideEffectsKind AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false ) const

EvaluateAsFloat - Return true if this is a constant which we can fold and convert to a floating point value, using any crazy technique that we want to.

Definition at line 17734 of file ExprConstant.cpp.

References EvaluateAsRValue(), getType(), hasUnacceptableSideEffect(), isValueDependent(), and clang::Result.

Referenced by DiagnoseFloatingImpCast(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().

◆ EvaluateAsInitializer()

bool Expr::EvaluateAsInitializer ( APValue & Result,
const ASTContext & Ctx,
const VarDecl * VD,
SmallVectorImpl< PartialDiagnosticAt > & Notes,
bool IsConstantInitializer ) const

EvaluateAsInitializer - Evaluate an expression as if it were the initializer of the given declaration.

Returns true if the initializer can be folded to a constant, and produces any relevant notes. In C++11, notes will be produced if the expression is not a constant expression.

Definition at line 17878 of file ExprConstant.cpp.

References CheckConstantExpression(), CheckMemoryLeaks(), clang::ConstantExpression, clang::ConstantFold, clang::Expr::EvalStatus::Diag, EvaluateInPlace(), clang::ASTContext::getLangOpts(), clang::Decl::getLocation(), clang::ValueDecl::getType(), isValueDependent(), and clang::NamedDecl::printQualifiedName().

◆ EvaluateAsInt()

bool Expr::EvaluateAsInt ( EvalResult & Result,
const ASTContext & Ctx,
SideEffectsKind AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false ) const

EvaluateAsInt - Return true if this is a constant which we can fold and convert to an integer, using any crazy technique that we want to.

Definition at line 17712 of file ExprConstant.cpp.

References clang::IgnoreSideEffects, isValueDependent(), and clang::Result.

Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnFinishSwitchStmt(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPDeviceNum(), AnalyzeBitFieldAssignment(), areEqualIntegers(), BuiltinAlignment(), checkArrayExpressionDoesNotReferToWholeSize(), clang::SemaAMDGPU::checkCoopAtomicFunctionCall(), checkFormatStringExpr(), clang::CodeGen::CodeGenFunction::checkIfLoopMustProgress(), clang::Sema::CheckImplicitConversion(), clang::Sema::CheckLogicalOperands(), CheckObjCDictionaryLiteralDuplicateKeys(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSubtractionOperands(), CheckUnicodeArithmeticConversions(), clang::CIRGen::CIRGenFunction::constantFoldsToSimpleInteger(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseIntInBoolContext(), DiagnoseMixedUnicodeImplicitConversion(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), emitAtomicCmpXchgFailureSet(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), clang::CallExpr::evaluateBytesReturnedByAllocSizeCall(), clang::ento::SValBuilder::getConstantVal(), getIntegerConstantExpr(), isConstantInitializer(), isSafeArraySubscript(), TryToFixInvalidVariablyModifiedType(), and clang::ento::ExprEngine::VisitOffsetOfExpr().

◆ EvaluateAsLValue()

◆ EvaluateAsRValue()

bool Expr::EvaluateAsRValue ( EvalResult & Result,
const ASTContext & Ctx,
bool InConstantContext = false ) const

EvaluateAsRValue - Return true if this is a constant which we can fold to an rvalue using any crazy technique (that has nothing to do with language standards) that we want to, even if the expression has side-effects.

EvaluateAsRValue - Return true if this is a constant which we can fold using any crazy technique (that has nothing to do with language standards) that we want to. If this function returns true, it returns the folded constant in Result. If this expression is a glvalue, an lvalue-to-rvalue conversion will be applied to the result.

If this function returns true, it returns the folded constant in Result. If the expression is a glvalue, an lvalue-to-rvalue conversion will be applied.

Definition at line 17692 of file ExprConstant.cpp.

References clang::IgnoreSideEffects, isValueDependent(), and clang::Result.

Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::CheckImplicitConversion(), clang::Sema::DiagnoseStaticAssertDetails(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), EvaluateForOverflow(), clang::Sema::FillInlineAsmIdentifierInfo(), findConstantBaseAndOffset(), isNullPointerValueTemplateArgument(), maybeConstEvalStringLiteral(), clang::InitializationSequence::Perform(), clang::CIRGen::CIRGenFunction::tryEmitAsConstant(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryGetExprRange(), and clang::Sema::VerifyIntegerConstantExpression().

◆ EvaluateCharRangeAsString() [1/2]

bool Expr::EvaluateCharRangeAsString ( APValue & Result,
const Expr * SizeExpression,
const Expr * PtrExpression,
ASTContext & Ctx,
EvalResult & Status ) const

Definition at line 18915 of file ExprConstant.cpp.

References EvaluateCharRangeAsStringImpl(), Expr(), and clang::Result.

◆ EvaluateCharRangeAsString() [2/2]

bool Expr::EvaluateCharRangeAsString ( std::string & Result,
const Expr * SizeExpression,
const Expr * PtrExpression,
ASTContext & Ctx,
EvalResult & Status ) const

Definition at line 18907 of file ExprConstant.cpp.

References EvaluateCharRangeAsStringImpl(), Expr(), and clang::Result.

◆ EvaluateForOverflow()

void Expr::EvaluateForOverflow ( const ASTContext & Ctx) const

◆ EvaluateKnownConstInt()

◆ EvaluateKnownConstIntCheckOverflow()

APSInt Expr::EvaluateKnownConstIntCheckOverflow ( const ASTContext & Ctx,
SmallVectorImpl< PartialDiagnosticAt > * Diag = nullptr ) const

◆ EvaluateWithSubstitution()

bool Expr::EvaluateWithSubstitution ( APValue & Value,
ASTContext & Ctx,
const FunctionDecl * Callee,
ArrayRef< const Expr * > Args,
const Expr * This = nullptr ) const

EvaluateWithSubstitution - Evaluate an expression as if from the context of a call to the given function with the given arguments, inside an unevaluated context.

Returns true if the expression could be folded to a constant.

Definition at line 18617 of file ExprConstant.cpp.

References clang::APValue, clang::Call, clang::ConstantExpressionUnevaluated, Evaluate(), EvaluateCallArg(), EvaluateObjectArgument(), Expr(), clang::ASTContext::getPrintingPolicy(), clang::Expr::EvalStatus::HasSideEffects, and isValueDependent().

◆ findBoundMemberType()

QualType Expr::findBoundMemberType ( const Expr * expr)
static

Given an expression of bound-member type, find the type of the member.

Returns null if this is an overloaded bound member expression.

Definition at line 3041 of file Expr.cpp.

References Expr(), clang::ast_matchers::expr, getPointeeType(), clang::isa(), and clang::ast_matchers::type.

Referenced by clang::CallExpr::getCallReturnType().

◆ getAsBuiltinConstantDeclRef()

const ValueDecl * Expr::getAsBuiltinConstantDeclRef ( const ASTContext & Context) const

If this expression is an unambiguous reference to a single declaration, in the style of __builtin_function_start, return that declaration.

Note that this may return a non-static member function or field in C++ if this expression is a member pointer constant.

Definition at line 222 of file Expr.cpp.

References EvaluateAsConstantExpr(), and clang::Expr::EvalResult::Val.

Referenced by BuiltinFunctionStart(), and clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().

◆ getBestDynamicClassType()

const CXXRecordDecl * Expr::getBestDynamicClassType ( ) const

For an expression of class type or pointer to class type, return the most derived class decl the expression is known to refer to.

If this expression is a cast, this method looks through it to find the most derived decl that can be inferred from the expression. This is valid because derived-to-base conversions have undefined behavior if the object isn't dynamically of the derived type.

Definition at line 68 of file Expr.cpp.

References clang::Type::castAsCXXRecordDecl(), Expr(), clang::Type::getAs(), getBestDynamicClassTypeExpr(), clang::Type::getPointeeType(), getType(), and clang::Type::isDependentType().

◆ getBestDynamicClassTypeExpr()

const Expr * Expr::getBestDynamicClassTypeExpr ( ) const

Get the inner expression that determines the best dynamic class.

If this is a prvalue, we guarantee that it is of the most-derived type for the object itself.

Definition at line 43 of file Expr.cpp.

References Expr(), and IgnoreParenBaseCasts().

Referenced by getBestDynamicClassType().

◆ getDependence()

ExprDependence clang::Expr::getDependence ( ) const
inline

Definition at line 164 of file Expr.h.

References clang::Stmt::ExprBits.

Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnGCCAsmStmtString(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), containsErrors(), containsUnexpandedParameterPack(), clang::GCCAsmStmt::ExtractStringFromGCCAsmStmtComponent(), isInstantiationDependent(), isTypeDependent(), isValueDependent(), clang::CallExpr::markDependentForPostponedNameLookup(), clang::InitListExpr::markError(), clang::InitListExpr::setInit(), and clang::ASTNodeImporter::VisitUnresolvedLookupExpr().

◆ getEnumCoercedType()

QualType Expr::getEnumCoercedType ( const ASTContext & Ctx) const

If this expression is an enumeration constant, return the enumeration type under which said constant was declared.

Otherwise return the expression's type. Note this effectively circumvents the weak typing of C's enum constants

Definition at line 262 of file Expr.cpp.

References clang::cast(), clang::ASTContext::getCanonicalTagType(), getEnumConstantDecl(), getType(), and clang::isa().

Referenced by checkBuiltinVectorMathMixedEnums(), clang::Sema::checkEnumArithmeticConversions(), and clang::Sema::CheckImplicitConversion().

◆ getEnumConstantDecl() [1/2]

EnumConstantDecl * Expr::getEnumConstantDecl ( )

If this expression refers to an enum constant, retrieve its declaration.

Definition at line 4252 of file Expr.cpp.

References Expr(), and IgnoreParenImpCasts().

Referenced by getEnumCoercedType(), and getEnumConstantDecl().

◆ getEnumConstantDecl() [2/2]

const EnumConstantDecl * clang::Expr::getEnumConstantDecl ( ) const
inline

Definition at line 490 of file Expr.h.

References Expr(), and getEnumConstantDecl().

◆ getExprLoc()

SourceLocation Expr::getExprLoc ( ) const

getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.

Definition at line 273 of file Expr.cpp.

References clang::Stmt::getStmtClass(), and clang::Stmt::NoStmtClass.

Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnArraySubscriptExpr(), clang::SemaOpenACC::ActOnCacheVar(), clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnEffectExpression(), clang::Sema::ActOnExprStmt(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnIfStmt(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPAllocateClause(), clang::SemaOpenMP::ActOnOpenMPAllocateDirective(), clang::SemaOpenMP::ActOnOpenMPAllocatorClause(), clang::SemaOpenMP::ActOnOpenMPAtomicDirective(), clang::SemaOpenMP::ActOnOpenMPCopyinClause(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareVariantDirective(), clang::SemaOpenMP::ActOnOpenMPDependClause(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPDetachClause(), clang::SemaOpenMP::ActOnOpenMPDeviceNum(), clang::SemaOpenMP::ActOnOpenMPDispatchDirective(), clang::SemaOpenMP::ActOnOpenMPHasDeviceAddrClause(), clang::SemaOpenMP::ActOnOpenMPInitClause(), clang::SemaOpenMP::ActOnOpenMPInterchangeDirective(), clang::SemaOpenMP::ActOnOpenMPIsDevicePtrClause(), clang::SemaOpenMP::ActOnOpenMPMapClause(), clang::SemaOpenMP::ActOnOpenMPPermutationClause(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartLinkageSpecification(), clang::SemaOpenACC::ActOnVar(), clang::CodeGen::CodeGenFunction::AddAMDGPUFenceAddressSpaceMMRA(), clang::Sema::AddConversionCandidate(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddOverloadedCallCandidates(), clang::interp::AddSubMulHelper(), AnalyzeBitFieldAssignment(), AnalyzeImplicitConversions(), applyCocoaAPICheck(), clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), clang::Sema::BuildAtomicExpr(), buildCapture(), buildCapture(), buildCaptureDecl(), BuildConvertedConstantExpression(), clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDecltypeType(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::SemaObjC::BuildInstanceMessage(), clang::SemaObjC::BuildObjCBoxedExpr(), buildPostUpdate(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildSynthesizedThreeWayComparison(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVectorLiteral(), BuiltinAlignment(), clang::Sema::BuiltinElementwiseTernaryMath(), BuiltinIsWithinLifetime(), BuiltinMaskedGather(), BuiltinMaskedLoad(), BuiltinMaskedStore(), BuiltinOverflow(), BuiltinSEHScopeCheck(), BuiltinTriviallyRelocate(), clang::Sema::BuiltinVectorMath(), clang::interp::State::CCEDiag(), clang::Sema::CheckAddressOfOperand(), CheckAlignOfExpr(), checkAllocateClauses(), clang::SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::Sema::CheckAssignmentConstraints(), checkBlockType(), clang::Sema::checkCall(), checkCastFunctionType(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::checkConstantPointerAuthKey(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckCXXBooleanCondition(), clang::Sema::CheckCXXThrowOperand(), clang::SemaOpenMP::checkDeclIsAllowedInOpenMPTarget(), CheckedIntArithmetic(), checkEnumTypesInSwitchStmt(), CheckFoldOperand(), clang::Sema::CheckForConstantInitializer(), CheckForReference(), clang::Sema::CheckFunctionCall(), CheckIdentityFieldAssignment(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), clang::Sema::CheckImplicitConversion(), checkIndirectCopyRestoreSource(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), clang::Sema::CheckLValueToRValueConversionOperand(), checkMapClauseExpressionBase(), checkMapConflicts(), CheckMaskedBuiltinArgs(), CheckMemaccessSize(), clang::interp::CheckNewDeleteForms(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), checkOpenMPIterationSpace(), checkOpenMPLoop(), clang::Sema::checkPointerAuthDiscriminatorArg(), checkPointerAuthEnabled(), checkPointerAuthValue(), clang::Sema::CheckPointerConversion(), checkPositiveIntArgument(), checkPreviousOMPAllocateAttribute(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::SemaOpenACC::CheckReductionVar(), CheckResourceHandle(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSingleAssignmentConstraints(), clang::SemaObjC::CheckSubscriptingKind(), CheckSufficientAllocSize(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTypenameType(), clang::Sema::checkUInt32Argument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::SemaOpenACC::CheckVarIsPointerType(), clang::Sema::completeExprArrayBound(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateGenericSelectionExpr(), clang::CodeGen::CodeGenFunction::createTLSAtExitStub(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DiagnoseAlwaysNonNullPointer(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadFunctionCast(), DiagnoseCastOfObjCSEL(), clang::Sema::DiagnoseConditionalForNull(), clang::SemaObjC::DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseDirectIsaAccess(), DiagnoseFloatingImpCast(), DiagnoseForRangeVariableCopies(), DiagnoseImpCast(), DiagnoseIntInBoolContext(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), diagnoseNoViableConversion(), DiagnoseNullConversion(), clang::diagnoseRetainCycle(), diagnoseUnknownAnyExpr(), diagnoseXorMisusedAsPow(), DiagRecursiveConstraintEval(), diagReturnOnAllocFailure(), clang::CodeGen::ConstantEmitter::emitAbstract(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), EmitAsmStores(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitBoundsCheckImpl(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinAlignTo(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CIRGen::CIRGenFunction::emitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCheckedArgForAssume(), clang::CodeGen::CodeGenFunction::EmitCheckedArgForBuiltin(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CIRGen::CIRGenFunction::emitComplexExprIntoLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), EmitDoacrossOrdered(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CIRGen::CIRGenFunction::emitExprAsInit(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), EmitNontemporalLoad(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOrigPointerRValue(), EmitOverflowCheckedAbs(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), emitRestoreIP(), clang::CodeGen::CodeGenFunction::emitScalarConstant(), clang::CodeGen::CodeGenFunction::EmitScalarInit(), emitSuspendExpression(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CIRGen::CIRGenFunction::emitVAArg(), EvaluateAsConstantExpr(), EvaluateAsLValue(), EvaluateAsRValue(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CIRGen::CIRGenFunction::evaluateExprAsBool(), clang::interp::State::FFDiag(), findSubobject(), getAllocatorVal(), clang::ArraySectionExpr::getExprLoc(), clang::ArraySubscriptExpr::getExprLoc(), clang::CXXMemberCallExpr::getExprLoc(), clang::MatrixSubscriptExpr::getExprLoc(), clang::MSPropertySubscriptExpr::getExprLoc(), clang::ObjCIndirectCopyRestoreExpr::getExprLoc(), clang::PseudoObjectExpr::getExprLoc(), clang::CXXRewrittenBinaryOperator::getOperatorLoc(), getPrivateItem(), GetTypeOfFunction(), handleCleanupAttr(), HandleConstructorCall(), clang::interp::handleFixedPointOverflow(), HandleLValueArrayAdjustment(), HandleLValueComplexElement(), HandleLValueVectorElement(), clang::SemaHLSL::handleNumThreadsAttr(), HandleOperatorDeleteCall(), HandleOperatorNewCall(), handleRestrictAttr(), clang::SemaHLSL::handleWaveSizeAttr(), HasSideEffects(), clang::Sema::IgnoredValueConversions(), clang::Sema::ImpCastExprToType(), clang::interp::IncDecHelper(), clang::Sema::InitializeExplicitObjectArgument(), clang::interp::interp__builtin_is_constant_evaluated(), clang::interp::EvalEmitter::interpretAsPointer(), clang::interp::EvalEmitter::interpretExpr(), clang::Decl::isFlexibleArrayMemberLike(), isImplicitMapperNeeded(), isNonNegativeIntegerValue(), isNullPointerValueTemplateArgument(), isUnusedResultAWarning(), IsUserDefinedConversion(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), makeAttributeArgExpr(), makeFloorIVRef(), clang::Sema::MakeFullDiscardedValueExpr(), clang::Sema::MakeFullExpr(), makeLaunchBoundsArgExpr(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MaybeConvertParenListExprToParenExpr(), clang::interp::Neg(), NoteLValueLocation(), clang::Parser::ParseConstraintLogicalAndExpression(), clang::Sema::ParseLifetimeCaptureByAttr(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitConversion(), PointerAuthStringDiscriminator(), clang::Sema::PrepareScalarCast(), processImplicitMapsWithDefaultMappers(), clang::Sema::RebuildExprInCurrentInstantiation(), recordConversion(), reportOriginalDsa(), clang::Sema::RequireCompleteExprType(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), clang::Sema::ResolveSingleFunctionTemplateSpecialization(), rewriteToNumericBoxedExpression(), sharedInstantiateConstructorDestructorAttr(), clang::Sema::TemporaryMaterializationConversion(), tryEvaluateBuiltinObjectSize(), TryInitializerListConstruction(), TryOrBuildParenListInitialization(), clang::Sema::tryToRecoverWithCall(), TryUserDefinedConversion(), clang::SemaOpenMP::VerifyPositiveIntegerConstantInClause(), warnInvalidLock(), and clang::Sema::WarnOnPendingNoDerefs().

◆ getFPFeaturesInEffect()

FPOptions Expr::getFPFeaturesInEffect ( const LangOptions & LO) const

Returns the set of floating point options that apply to this expression.

Only meaningful for operations on floating point values.

Definition at line 3963 of file Expr.cpp.

References clang::Call, and clang::FPOptions::defaultWithoutTrailingStorage().

Referenced by clang::CodeGen::CodeGenFunction::CGFPOptionsRAII::CGFPOptionsRAII(), checkFloatingPointResult(), and getActiveRoundingMode().

◆ getIntegerConstantExpr()

std::optional< llvm::APSInt > Expr::getIntegerConstantExpr ( const ASTContext & Ctx) const

isIntegerConstantExpr - Return the value if this expression is a valid integer constant expression.

If not a valid i-c-e, return std::nullopt.

Note: This does not perform the implicit conversions required by C++11 [expr.const]p5.

Definition at line 18548 of file ExprConstant.cpp.

References EvaluateAsInt(), EvaluateCPlusPlus11IntegralConstantExpr(), clang::ASTContext::getLangOpts(), clang::IgnoreSideEffects, isIntegerConstantExpr(), isValueDependent(), and SE_AllowSideEffects.

Referenced by clang::Sema::ActOnEffectExpression(), clang::SemaOpenMP::ActOnOMPIteratorExpr(), clang::SemaOpenMP::ActOnOpenMPDistScheduleClause(), clang::SemaOpenMP::ActOnOpenMPLinearClause(), clang::SemaOpenMP::ActOnOpenMPScheduleClause(), clang::Sema::ActOnPragmaPack(), clang::Sema::AddAssumeAlignedAttr(), AnalyzeComparison(), BuildAddressSpaceIndex(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildMatrixType(), clang::Sema::BuildVectorType(), clang::Sema::BuiltinConstantArg(), clang::Sema::BuiltinShuffleVector(), clang::SemaARM::CheckARMCoprocessorImmediate(), clang::SemaBPF::CheckBPFBuiltinFunctionCall(), clang::SemaHLSL::CheckBuiltinFunctionCall(), clang::SemaOpenACC::CheckCollapseLoopCount(), clang::Sema::checkConstantPointerAuthKey(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::CheckImplicitConversion(), clang::Sema::checkPointerAuthDiscriminatorArg(), clang::SemaPPC::CheckPPCBuiltinFunctionCall(), clang::SemaSystemZ::CheckSystemZBuiltinFunctionCall(), clang::SemaOpenACC::CheckTileSizeExpr(), clang::Sema::checkUInt32Argument(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DiagnoseAssignmentEnum(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), EmitAArch64TblBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitScalarOrConstFoldImmArg(), clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), clang::Sema::FinalizeDeclaration(), fitsInto(), fixUPCAddressofArraySubscriptWithSpan(), clang::CodeGen::CodeGenFunction::GetAArch64SVEProcessedOperands(), getAlignmentAndOffsetFromBinAddOrSub(), getAndVerifyMatrixDimension(), getCommonSugarTypeNode(), GetIntegerConstantValue(), clang::CodeGen::CGOpenMPRuntime::getNumTeamsExprForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective(), handleHLSLLoopHintAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), handleOpenCLUnrollHint(), handleSentinelAttr(), handleWorkGroupSize(), isNonNegativeIntegerExpr(), isNonNegativeIntegerValue(), isSafeSpanTwoParamConstruct(), makeAttributeArgExpr(), makeLaunchBoundsArgExpr(), clang::ASTContext::mergeTypes(), and sharedInstantiateConstructorDestructorAttr().

◆ getObjCProperty()

const ObjCPropertyRefExpr * Expr::getObjCProperty ( ) const

If this expression is an l-value for an Objective C property, find the underlying property reference expression.

Definition at line 4168 of file Expr.cpp.

References clang::cast(), Expr(), getObjectKind(), IgnoreParenCasts(), isLValue(), and clang::OK_ObjCProperty.

◆ getObjectKind()

ExprObjectKind clang::Expr::getObjectKind ( ) const
inline

getObjectKind - The object kind that this expression produces.

Object kinds are meaningful only for expressions that yield an l-value or x-value.

Definition at line 451 of file Expr.h.

References clang::Stmt::ExprBits.

Referenced by clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::CXXDefaultArgExpr::ASTReader, buildCapture(), buildCaptureDecl(), buildCoawaitCalls(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildSynthesizedThreeWayComparison(), clang::Sema::CheckAddressOfOperand(), CheckAlignOfExpr(), CheckIncrementDecrementOperand(), ClassifyBinaryOp(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::PseudoObjectExpr::Create(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::CXXRewrittenBinaryOperator::CXXRewrittenBinaryOperator(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CIRGen::CIRGenFunction::emitCallArg(), clang::FullExpr::FullExpr(), getObjCProperty(), isOrdinaryOrBitFieldObject(), clang::isValidPreserveFieldInfoArg(), clang::PackExpansionExpr::PackExpansionExpr(), clang::ParenExpr::ParenExpr(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), refersToBitField(), refersToMatrixElement(), clang::SemaObjC::stripARCUnbridgedCast(), clang::SemaHLSL::transformInitList(), TryReinterpretCast(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::ASTNodeImporter::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitBinaryConditionalOperator(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitChooseExpr(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitConditionalOperator(), clang::ASTNodeImporter::VisitConvertVectorExpr(), clang::ASTNodeImporter::VisitMemberExpr(), and clang::ASTNodeImporter::VisitOpaqueValueExpr().

◆ getReferencedDeclOfCallee() [1/2]

◆ getReferencedDeclOfCallee() [2/2]

const Decl * clang::Expr::getReferencedDeclOfCallee ( ) const
inline

Definition at line 499 of file Expr.h.

References Expr(), and getReferencedDeclOfCallee().

◆ getSourceBitField() [1/2]

FieldDecl * Expr::getSourceBitField ( )

If this expression refers to a bit-field, retrieve the declaration of that bit-field.

Note that this returns a non-null pointer in subtly different places than refersToBitField returns true. In particular, this can return a non-null pointer even for r-values loaded from bit-fields, but it will return null for a conditional bit-field.

Definition at line 4205 of file Expr.cpp.

References Expr(), getSourceBitField(), IgnoreParens(), and clang::FieldDecl::isBitField().

Referenced by clang::Sema::ActOnMSAsmStmt(), AnalyzeAssignment(), getSourceBitField(), getSourceBitField(), clang::Sema::IsIntegralPromotion(), isKnownToHaveBooleanValue(), clang::ASTContext::isPromotableBitField(), and TryGetExprRange().

◆ getSourceBitField() [2/2]

const FieldDecl * clang::Expr::getSourceBitField ( ) const
inline

Definition at line 494 of file Expr.h.

References Expr(), and getSourceBitField().

◆ getType()

QualType clang::Expr::getType ( ) const
inline

Definition at line 144 of file Expr.h.

Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXNamedCast(), clang::Sema::ActOnDecltypeExpression(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnIndirectGotoStmt(), clang::SemaObjC::ActOnInstanceMessage(), clang::SemaOpenACC::ActOnIntExpr(), clang::Sema::ActOnMSAsmStmt(), clang::Sema::ActOnNumericConstant(), clang::SemaObjC::ActOnObjCAtSynchronizedOperand(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPAtomicDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDependClause(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPInterchangeDirective(), clang::SemaOpenMP::ActOnOpenMPLinearClause(), clang::SemaOpenMP::ActOnOpenMPMapClause(), clang::SemaOpenMP::ActOnOpenMPMessageClause(), clang::SemaOpenMP::ActOnOpenMPStripeDirective(), clang::SemaOpenMP::ActOnOpenMPTileDirective(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::SemaHLSL::ActOnOutParamExpr(), clang::Sema::ActOnParenExpr(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::ActOnStmtExprResult(), clang::Sema::AddConversionCandidate(), clang::Sema::AddFunctionCandidates(), clang::CodeGen::CGDebugInfo::AddStringLiteralDebugInfo(), clang::interp::AddSubMulHelper(), AddTemplateConversionCandidateImmediately(), clang::InitializationSequence::AddUnwrapInitListInitStep(), AdjustAddressSpaceForBuiltinOperandType(), adjustBlockReturnsToEnum(), clang::interp::Compiler< Emitter >::allocateLocal(), clang::interp::Compiler< Emitter >::allocateTemporary(), AnalyzeAssignment(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeCompoundAssignment(), AnalyzeImplicitConversions(), areEqualIntegers(), clang::hlsl::BuiltinTypeMethodBuilder::assign(), clang::CXXDefaultArgExpr::ASTReader, clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::ento::ExprEngine::bindReturnValue(), clang::Sema::BoundsSafetyCheckUseOfCountAttrPtr(), clang::tooling::buildAccess(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildArrayType(), clang::Sema::BuildAsTypeExpr(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildBinOp(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallToMemberFunction(), buildCapture(), buildCoawaitCalls(), clang::Sema::BuildCompoundLiteralExpr(), BuildConvertedConstantExpression(), clang::Sema::BuildCoreturnStmt(), buildCounterInit(), buildCounterUpdate(), clang::Sema::BuildCoyieldExpr(), BuildCXXCastArgument(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildCXXUuidof(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildExprRequirement(), clang::Sema::BuildFieldReferenceExpr(), buildGlobalBlock(), clang::SemaObjC::BuildInstanceMessage(), clang::SemaObjC::BuildIvarRefExpr(), clang::Sema::BuildMemberReferenceExpr(), buildMemcpyForAssignmentOp(), BuildNonArrayForRange(), clang::SemaObjC::BuildObjCAtThrowStmt(), clang::SemaObjC::BuildObjCBoxedExpr(), clang::SemaObjC::BuildObjCBridgedCast(), clang::SemaObjC::BuildObjCNumericLiteral(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildSynthesizedThreeWayComparison(), clang::Sema::BuildTemplateIdExpr(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildUnaryOp(), clang::Sema::BuildVAArgExpr(), BuiltinAlignment(), builtinAllocaAddrSpace(), BuiltinAnnotation(), clang::SemaARM::BuiltinARMMemoryTaggingCall(), BuiltinCallWithStaticChain(), BuiltinCountZeroBitsGeneric(), BuiltinDumpStruct(), clang::Sema::BuiltinElementwiseTernaryMath(), BuiltinIsWithinLifetime(), BuiltinLaunder(), BuiltinMaskedGather(), BuiltinMaskedLoad(), BuiltinMaskedScatter(), BuiltinMaskedStore(), BuiltinOverflow(), BuiltinPopcountg(), clang::SemaPPC::BuiltinPPCMMACall(), BuiltinPreserveAI(), clang::Sema::BuiltinShuffleVector(), BuiltinTriviallyRelocate(), clang::Sema::BuiltinVectorMath(), clang::SemaPPC::BuiltinVSX(), clang::SemaWasm::BuiltinWasmRefIsNullExtern(), clang::SemaWasm::BuiltinWasmTableFill(), clang::SemaWasm::BuiltinWasmTableGrow(), clang::SemaWasm::BuiltinWasmTableSet(), clang::SemaWasm::BuiltinWasmTestFunctionPointerSignature(), clang::Sema::CallExprUnaryConversions(), clang::interp::CallPtr(), clang::Sema::canCalleeThrow(), clang::interp::Context::canClassify(), canElideOverflowCheck(), clang::SemaHLSL::CanPerformAggregateSplatCast(), clang::SemaHLSL::CanPerformElementwiseCast(), CanThrow(), castArgToParamTypeIfNeeded(), clang::interp::CastFloatingIntegral(), CastForMoving(), castForMoving(), clang::CastExpr::changesVolatileQualification(), clang::Sema::CheckAdditionOperands(), clang::Sema::CheckAddressOfOperand(), CheckAggExprForMemSetUse(), clang::SemaPPC::checkAIXMemberAlignment(), CheckAllArgsHaveSameType(), clang::CheckAllArgsHaveSameType(), CheckAllArgTypesAreCorrect(), clang::CheckAllArgTypesAreCorrect(), CheckAnyScalarOrVector(), CheckArgTypeMatches(), checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArithmeticOrEnumeralThreeWayCompare(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), checkArraySize(), clang::SemaPseudoObject::checkAssignment(), clang::Sema::CheckAssignmentConstraints(), clang::sema::checkAssignmentLifetime(), clang::Sema::CheckAssignmentOperands(), checkAttrArgsAreCapabilityObjs(), clang::interp::CheckBitCast(), clang::Sema::CheckBitwiseOperands(), clang::checkBlockArgs(), checkBlockType(), clang::Sema::CheckBooleanCondition(), CheckBoolLikeConversion(), CheckBoolSelect(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::SemaHLSL::CheckBuiltinFunctionCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), clang::SemaOpenCL::checkBuiltinNDRangeAndBlock(), clang::SemaOpenCL::checkBuiltinRWPipe(), checkBuiltinVectorMathArgTypes(), clang::Sema::checkCall(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckCastAlign(), checkCastFunctionType(), clang::SemaOpenACC::CheckCollapseLoopCount(), clang::checkCollectionLiteralElement(), CheckCommaOperand(), CheckCommaOperands(), clang::Sema::CheckCompareOperands(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), CheckConditionalOperand(), clang::Sema::CheckConditionalOperands(), CheckConditionalOperator(), checkConditionalPointerCompatibility(), clang::Sema::CheckConstraintExpression(), clang::SemaAMDGPU::checkCoopAtomicFunctionCall(), clang::Sema::CheckCountedByAttrOnField(), CheckCXX98CompatAccessibleCopy(), checkDeducedTemplateArguments(), clang::interp::CheckDivRem(), CheckedIntArithmetic(), checkElementNonNil(), clang::Sema::CheckEnumConstant(), checkEnumTypesInSwitchStmt(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::checkExceptionSpecification(), clang::sema::checkExprLifetimeImpl(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckFloatComparison(), checkFormatStringExpr(), CheckForModifiableLvalue(), clang::Sema::CheckFunctionCall(), clang::checkGenericCastToPtr(), CheckICE(), CheckImplicitArgumentConversions(), clang::Sema::CheckImplicitConversion(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), checkIntToPointerCast(), CheckLiteralType(), clang::interp::CheckLiteralType(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), clang::Sema::CheckLValueToRValueConversionOperand(), checkMapConflicts(), CheckMaskedBuiltinArgs(), clang::Sema::CheckMatrixElementwiseOperands(), clang::Sema::CheckMatrixMultiplyOperands(), clang::Sema::CheckMemberOperatorAccess(), clang::SemaAMDGPU::checkMovDPPFunctionCall(), CheckMoveOnConstruction(), clang::Sema::CheckMultiplyDivideOperands(), clang::SemaARM::CheckNeonBuiltinFunctionCall(), CheckNonNullArguments(), CheckNonNullExpr(), CheckObjCCollectionLiteralElement(), clang::SemaObjC::CheckObjCForCollectionOperand(), checkObjCPointerIntrospection(), clang::checkOpenCLEnqueueIntType(), clang::checkOpenCLEnqueueVariadicArgs(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), checkOpenMPLoop(), clang::checkPipeArg(), clang::checkPipePacketType(), clang::Sema::CheckPlaceholderExpr(), checkPlaceholderForOverload(), checkPointerAuthValue(), clang::Sema::CheckPointerConversion(), checkPointerIntegerMismatch(), clang::Sema::CheckPointerToMemberOperands(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::SemaPPC::CheckPPCBuiltinFunctionCall(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::SemaOpenACC::CheckReductionVar(), clang::Sema::CheckRemainderOperands(), clang::SemaHLSL::CheckResourceBinOp(), CheckResourceHandle(), CheckScalarOrVector(), clang::interp::CheckShift(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSizelessVectorCompareOperands(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), checkSizelessVectorShift(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), clang::Sema::CheckStaticArrayArgument(), CheckStringInit(), clang::SemaObjC::CheckSubscriptingKind(), clang::Sema::CheckSubtractionOperands(), CheckSufficientAllocSize(), CheckTautologicalComparison(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::SemaOpenACC::CheckTileSizeExpr(), clang::Sema::CheckTransparentUnionArgumentConstraints(), checkTupleLikeDecomposition(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), CheckUnicodeArithmeticConversions(), clang::Sema::checkUnknownAnyArg(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckUnusedVolatileAssignment(), clang::Sema::checkVariadicArgument(), clang::SemaOpenACC::CheckVarIsPointerType(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorLogicalOperands(), clang::Sema::CheckVectorOperands(), CheckVectorSelect(), checkVectorShift(), clang::CheckWasmBuiltinArgIsInteger(), clang::CheckWasmBuiltinArgIsTable(), CheckWaveActive(), clang::interp::Context::classify(), ClassifyBinaryOp(), ClassifyExprValueKind(), ClassifyInternal(), ClassifyMemberExpr(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), CollectVRQualifiers(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::SYCLUniqueStableNameExpr::ComputeName(), clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::SValBuilder::conjureSymbolVal(), clang::Sema::ConstantFoldAttrArgs(), clang::ento::ExprEngine::ConstructInitList(), convertHalfVecBinOp(), convertPointersToCompositeType(), convertVector(), clang::Sema::ConvertVectorExpr(), CopyObject(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::PackIndexingExpr::Create(), createBinOpInfoFromIncDec(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::SemaOpenACC::CreateFirstPrivateInitRecipe(), clang::ConstructionContext::createFromLayers(), CreateFunctionRefExpr(), clang::Sema::CreateGenericSelectionExpr(), clang::interp::Program::createGlobal(), clang::CodeGen::CodeGenModule::createOpenCLIntToSamplerConversion(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::SemaOpenACC::CreatePrivateInitRecipe(), clang::SemaOpenACC::CreateReductionInitRecipe(), createReferenceTemporary(), createReferenceTemporary(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::CXXRewrittenBinaryOperator::CXXRewrittenBinaryOperator(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), DeduceTemplateArguments(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::hlsl::BuiltinTypeMethodBuilder::dereference(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), clang::TypeOfExprType::desugar(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseBadCast(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), DiagnoseBinOpPrecedence(), DiagnoseCallingConvCast(), DiagnoseCastOfObjCSEL(), DiagnoseCastQual(), clang::Sema::DiagnoseConditionalForNull(), diagnoseDistinctPointerComparison(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseFloatingImpCast(), DiagnoseForRangeReferenceVariableCopies(), diagnoseFunctionPointerToVoidComparison(), DiagnoseImpCast(), DiagnoseIntInBoolContext(), DiagnoseMixedUnicodeImplicitConversion(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), diagnoseMutableFields(), diagnoseNoViableConversion(), DiagnoseNullConversion(), diagnosePointerIncompatibility(), DiagnoseRecursiveConstFields(), DiagnoseReinterpretUpDownCast(), diagnoseScopedEnums(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), clang::Sema::DiagnoseStaticAssertDetails(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), diagnoseTautologicalComparison(), clang::Sema::diagnoseZeroToNullptrConversion(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::EmbedExpr::EmbedExpr(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::CodeGenFunction::EmitAggExprToLValue(), clang::CIRGen::CIRGenFunction::emitAggExprToLValue(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CIRGen::CIRGenFunction::emitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExprToExn(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CIRGen::CIRGenFunction::emitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(), clang::CIRGen::CIRGenFunction::emitAnyExprToTemp(), clang::CodeGen::CodeGenFunction::EmitARCExtendBlockObject(), clang::CodeGen::CodeGenFunction::EmitARCReclaimReturnedObject(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr(), clang::CodeGen::CodeGenFunction::EmitARCRetainScalarExpr(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMMVEBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), emitAtomicCmpXchg(), emitAtomicCmpXchg(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), EmitAtomicIncrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicInit(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), emitBadConversionNotes(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CIRGen::CIRGenFunction::emitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), emitBuiltinBitOp(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CIRGen::CIRGenFunction::emitCallee(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::CIRGen::CIRGenFunction::emitCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallExprLValue(), clang::CIRGen::CIRGenFunction::emitCallExprLValue(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CIRGen::CIRGenFunction::emitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitComplexExpr(), clang::CIRGen::CIRGenFunction::emitComplexExpr(), clang::CodeGen::CodeGenFunction::EmitComplexExprIntoLValue(), clang::CIRGen::CIRGenFunction::emitComplexExprIntoLValue(), clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CIRGen::CIRGenFunction::emitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(), clang::CodeGen::CodeGenFunction::EmitCoreturnStmt(), clang::CodeGen::CodeGenFunction::EmitCXXBindTemporaryLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CIRGen::CIRGenFunction::emitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructLValue(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidLValue(), clang::CodeGen::CodeGenFunction::EmitCXXUuidofExpr(), clang::CodeGen::CodeGenFunction::EmitCXXUuidofLValue(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), emitDispatchForLoopBounds(), emitDistributeParallelForDispatchBounds(), EmitDoacrossOrdered(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), clang::CIRGen::CIRGenModule::emitExplicitCastExprType(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), emitFrexpBuiltin(), EmitFunctionDeclLValue(), emitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), emitGlobalVarDeclLValue(), clang::CIRGen::CIRGenModule::emitGlobalVarDefinition(), clang::CodeGen::CodeGenFunction::EmitHexagonBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitHLSLOutArgLValues(), clang::CodeGen::CodeGenFunction::EmitIgnoredConditionalOperator(), EmitISOVolatileLoad(), EmitISOVolatileStore(), emitLibraryCall(), emitLibraryCall(), clang::CIRGen::CIRGenFunction::emitLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CIRGen::CIRGenFunction::emitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitMatrixIndexExpr(), clang::CodeGen::CodeGenFunction::EmitMatrixSubscriptExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CIRGen::CIRGenFunction::emitMemberExpr(), clang::CodeGen::CGCXXABI::EmitMemberPointerConversion(), clang::CodeGen::CGCXXABI::EmitMemberPointerConversion(), emitModfBuiltin(), clang::CodeGen::CodeGenFunction::EmitMSVCBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), EmitNontemporalLoad(), EmitNontemporalStore(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCEncodeExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCSelectorLValue(), emitOMPAtomicCaptureExpr(), emitOMPAtomicCompareExpr(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPScanDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), clang::CIRGen::CIRGenFunction::emitOpenACCIntExpr(), clang::CIRGen::CIRGenFunction::emitOpOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitOrigPointerRValue(), EmitOverflowCheckedAbs(), clang::CodeGen::CodeGenFunction::EmitPointerArithmetic(), emitPointerArithmetic(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerAuthQualify(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::SemaObjC::EmitRelatedResultTypeNote(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), emitRestoreIP(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CIRGen::CIRGenFunction::emitReturnStmt(), clang::CodeGen::CodeGenFunction::EmitRISCVBuiltinExpr(), emitRVVUnitStridedSegLoadFFTupleBuiltin(), emitRVVVLEFFBuiltin(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), emitScanBasedDirectiveFinals(), clang::CodeGen::CodeGenFunction::EmitSimpleCallExpr(), emitSincosBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitSingleReductionCombiner(), clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitStmtExprLValue(), emitStmtWithResult(), clang::CodeGen::CodeGenFunction::EmitStringLiteralLValue(), clang::CIRGen::CIRGenFunction::emitStringLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedLoad(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedStore(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor(), clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTaskPrivateMappingFunction(), EmitTypeidFromVTable(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitUnsupportedLValue(), clang::CodeGen::CodeGenFunction::EmitUnsupportedRValue(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CIRGen::CIRGenFunction::emitVAArg(), EmitValToTemp(), emitValToTemp(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), emitWritebackArg(), EmitX86BitTestIntrinsic(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::ento::ExprEngine::evalLoad(), Evaluate(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), EvaluateAsFixedPoint(), EvaluateAsInt(), EvaluateAsLValue(), EvaluateAsRValue(), EvaluateAtomic(), EvaluateAtomicConstraint(), clang::dataflow::evaluateBooleanEquality(), EvaluateBuiltinClassifyType(), EvaluateBuiltinConstantP(), EvaluateBuiltinStrLen(), EvaluateCallArg(), EvaluateCharRangeAsStringImpl(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), EvaluateCPlusPlus11IntegralConstantExpr(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CIRGen::CIRGenFunction::evaluateExprAsBool(), EvaluateFixedPoint(), EvaluateFixedPointOrInteger(), EvaluateFloat(), clang::SourceLocExpr::EvaluateInContext(), EvaluateInPlace(), EvaluateIntegerOrLValue(), EvaluateLValue(), evaluateLValueAsAllocSize(), EvaluateMemberPointer(), EvaluatePointer(), EvaluateRecord(), EvaluateTemporary(), EvaluateVector(), EvaluateVoid(), expandStringLiteral(), ExprLooksBoolean(), extractStringLiteralCharacter(), FastEvaluateAsRValue(), clang::Sema::FillInlineAsmIdentifierInfo(), FilterReturnExpressionLeaks(), clang::OverloadExpr::find(), clang::Sema::FindAssociatedClassesAndNamespaces(), clang::SemaObjC::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), FindConditionalOverload(), findEnumForBlockReturn(), findWeakLValue(), finishContextualImplicitConversion(), clang::Sema::FixOverloadedFunctionReference(), clang::Sema::FormatStringHasSArg(), clang::FullExpr::FullExpr(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::generateAwaitSuspendWrapper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenFunction::GenerateSEHFilterFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), getAlignmentAndOffsetFromBinAddOrSub(), GetAlignOfExpr(), clang::CXXNewExpr::getAllocatedType(), getAllocatorVal(), clang::ArrayInitLoopExpr::getArraySize(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), getBestDynamicClassType(), getBuiltinAlignArguments(), clang::ObjCMessageExpr::getCallReturnType(), getCommonTemplateArgument(), clang::Sema::getCompletedType(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), clang::CIRGen::CIRGenModule::getConstantArrayFromStringLiteral(), getConstantExprReferredType(), clang::ento::SValBuilder::getConstantVal(), clang::CodeGen::CodeGenFunction::GetCountedByFieldExprGEP(), GetCountFieldAndIndex(), getCXXRecord(), getDependentArraySubscriptType(), clang::CXXDeleteExpr::getDestroyedType(), getEnumCoercedType(), GetExplicitObjectExpr(), GetExprType(), clang::VarDecl::getFlexibleArrayInitChars(), clang::BlockExpr::getFunctionType(), clang::dataflow::getImplicitObjectLocation(), clang::LambdaExpr::getLambdaClass(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), clang::CodeGen::CodeGenModule::getMemberPointerConstant(), clang::TemplateArgument::getNonTypeTemplateArgumentType(), clang::ExtVectorElementExpr::getNumElements(), GetNumNonZeroBytesInInit(), clang::ASTContext::getObjCEncodingForBlock(), clang::CXXMemberCallExpr::getObjectType(), getObjectType(), clang::CIRGen::CIRGenFunction::getOpenACCDataOperandInfo(), clang::dataflow::CachedConstAccessorsLattice< Base >::getOrCreateConstMethodReturnValue(), clang::SubstNonTypeTemplateParmExpr::getParameterType(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), getPointerAndSize(), getPreferredTypeOfBinaryRHS(), getPresumedAlignmentOfPointer(), clang::ObjCMessageExpr::getReceiverType(), clang::ObjCPropertyRefExpr::getReceiverType(), clang::CXXMemberCallExpr::getRecordDecl(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), clang::ASTContext::getReferenceQualifiedType(), clang::dataflow::Environment::getResultObjectLocation(), GetReturnType(), getSimpleArrayDecayOperand(), clang::ento::CallEventManager::getSimpleCall(), clang::dataflow::DataflowAnalysisContext::getStableStorageLocation(), clang::dataflow::Environment::getStorageLocation(), clang::CastExpr::getTargetUnionField(), clang::APValue::LValueBase::getType(), GetTypeBeforeIntegralPromotion(), clang::UnaryExprOrTypeTraitExpr::getTypeOfArgument(), clang::ASTContext::getTypeOfExprType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), clang::CXXConstructExpr::getUnusedResultAttr(), getUnwidenedIntegerType(), clang::dataflow::Environment::getValue(), clang::AtomicExpr::getValueType(), GetVTablePointer(), handleAsDoubleBuiltin(), HandleBaseToDerivedCast(), HandleDynamicCast(), clang::Sema::HandleExprEvaluationContextForTypeof(), clang::interp::handleFixedPointOverflow(), handleHlslClip(), handleHlslSplitdouble(), handleIntIntBinOp(), clang::ento::ExprEngine::handleLValueBitCast(), HandleMemberPointerAccess(), HandleOperatorNewCall(), clang::interp::handleOverflow(), handleTrivialCopy(), clang::SemaHLSL::handleVectorBinOpConversion(), handleVectorVectorBinOp(), hasArrayType(), hasBPFPreserveStaticOffset(), clang::Sema::hasCStrMethod(), HasEnumType(), clang::VarDecl::hasFlexibleArrayInit(), hasIsEqualMethod(), hasPlaceholderType(), hasPlaceholderType(), hasPointerType(), HasSideEffects(), libc_func_matchers::hasUnsafeFormatOrSArg(), libc_func_matchers::hasUnsafeSnprintfBuffer(), IgnoreCommaOperand(), clang::Sema::IgnoredValueConversions(), IgnoreParenNoopCasts(), ignorePointerCastsAndParens(), clang::Sema::ImpCastExprToType(), clang::interp::IncDecHelper(), clang::BadConversionSequence::init(), clang::interp::interp__builtin_atomic_lock_free(), clang::interp::interp__builtin_classify_type(), clang::Sema::InvalidLogicalVectorOperands(), clang::Sema::InvalidOperands(), clang::CXXDynamicCastExpr::isAlwaysNull(), isArithmeticArgumentPromotion(), clang::ObjCSubscriptRefExpr::isArraySubscriptRefExpr(), clang::ExtVectorElementExpr::isArrow(), clang::isBlockPointer(), isCapabilityExpr(), isConstantInitializer(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), isFlexibleArrayMemberLike(), IsImplicitBoolFloatConversion(), isIntOrBool(), isInvalidICRSource(), isKnownToHaveBooleanValue(), isKnownToHaveUnsignedValue(), IsModifiable(), isNonNegativeIntegerExpr(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isNullPointerConstant(), isNullPointerConstantForConversion(), isNullPointerValueTemplateArgument(), clang::CodeGen::CodeGenFunction::isPointerKnownNonNull(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), clang::ASTContext::isPromotableBitField(), isPtrBufferSafe(), isReadIfDiscardedInCPlusPlus11(), isReferenceToNonConstCapture(), isRvalueByValueRecord(), isRvalueByValueRecordWithSmartPtr(), isSafeArraySubscript(), clang::ASTContext::isSentinelNullExpr(), isSimpleArrayDecayOperand(), isSimpleZero(), IsStandardConversion(), isStdBasicOstream(), clang::ento::smartptr::isStdSmartPtr(), isStdSmartPtr(), clang::InitListExpr::isStringLiteralInit(), isSwiftAsyncCallee(), isTautologicalBoundsCheck(), isTemporaryObject(), clang::InitListExpr::isTransparent(), IsTransparentUnionStandardConversion(), isUnusedResultAWarning(), clang::MaterializeTemporaryExpr::isUsableInConstantExpressions(), IsUserDefinedConversion(), isValidInteropVariable(), clang::isValidPreserveEnumValueArg(), clang::isValidPreserveFieldInfoArg(), clang::isValidPreserveTypeInfoArg(), clang::AtomicExpr::isVolatile(), clang::Sema::LookupInlineAsmVarDeclField(), LookupMemberExpr(), LookupMethodInReceiverType(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::ento::SValBuilder::makeBoolVal(), clang::ento::SValBuilder::makeIntVal(), maybeAdjustInterfaceForSubscriptingCheck(), clang::Sema::MaybeBindToTemporary(), maybeDiagnoseAssignmentToFunction(), clang::Sema::maybeExtendBlockObject(), MayBeFunctionType(), MaybeHandleUnionActiveMemberChange(), maybeTailCall(), mustVisitNullValue(), needsConversionOfHalfVec(), clang::interp::Neg(), clang::Sema::NoteAllOverloadCandidates(), clang::ObjCBridgedCastExpr::ObjCBridgedCastExpr(), ObjCEnumerationCollection(), objectifyExpr(), OpenCLArithmeticConversions(), OpenCLCheckVectorConditional(), clang::PackExpansionExpr::PackExpansionExpr(), clang::ParenExpr::ParenExpr(), clang::SemaObjC::ParseObjCStringLiteral(), clang::ento::ConditionBRVisitor::patternMatch(), peelOffPointerArithmetic(), clang::InitializationSequence::Perform(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformContextuallyConvertToBool(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitObjectArgumentInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PerformQualificationConversion(), clang::interp::popToAPSInt(), precomputeExpr(), clang::Sema::PrepareBuiltinElementwiseMathOneArgCall(), clang::SemaObjC::PrepareCastToObjCObjectPointer(), clang::Sema::PrepareScalarCast(), clang::Sema::prepareVectorSplat(), print_elem(), PrintFloatingLiteral(), printIndicesOfElementsToConstructJson(), printPendingInitLoopJson(), clang::ento::ConditionBRVisitor::printValue(), processArgument(), processImplicitMapsWithDefaultMappers(), clang::ento::retaincountchecker::RetainCountChecker::processObjCLiterals(), clang::ento::ExprEngine::processSwitch(), clang::ento::ExprEngine::ProcessTemporaryDtor(), clang::SemaCodeCompletion::ProduceCallSignatureHelp(), clang::dataflow::propagateValue(), pushTemporaryCleanup(), pushTemporaryCleanup(), clang::TreeTransform< AdjustConstraintDepth >::RebuildCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), clang::TreeTransform< AdjustConstraintDepth >::RebuildObjCIsaExpr(), clang::TreeTransform< AdjustConstraintDepth >::RebuildObjCIvarRefExpr(), clang::TreeTransform< AdjustConstraintDepth >::RebuildObjCMessageExpr(), clang::TreeTransform< AdjustConstraintDepth >::RebuildObjCPropertyRefExpr(), rebuildPotentialResultsAsNonOdrUsed(), clang::SemaPseudoObject::recreateSyntacticForm(), clang::Sema::RefersToMemberWithReducedAlignment(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), clang::hlsl::BuiltinTypeMethodBuilder::returnValue(), clang::InitializationSequence::RewrapReferenceInitList(), rewriteBuiltinFunctionDecl(), rewriteToNumberLiteral(), rewriteToNumericBoxedExpression(), clang::SemaOpenACC::OpenACCParsedClause::setConditionDetails(), clang::DeclRefExpr::setDecl(), SetElementTypeAsReturnType(), clang::BadConversionSequence::setFromExpr(), clang::hlsl::BuiltinTypeMethodBuilder::setHandleFieldOnResource(), clang::MemberExpr::setMemberDecl(), setObjCGCLValueClass(), clang::dataflow::Environment::setStorageLocation(), clang::dataflow::Environment::setValue(), sharedGetConstructorDestructorAttrExpr(), clang::interp::ShiftFixedPoint(), shouldAddReversedEqEq(), shouldEmitSeparateBlockRetain(), shouldExtendReceiverForInnerPointerMessage(), clang::sema::shouldRunGSLAssignmentAnalysis(), clang::sema::shouldTrackFirstArgumentForConstructor(), ShouldTryAgainWithRedefinitionType(), skipRValueSubobjectAdjustments(), clang::interp::ByteCodeEmitter::speculate(), clang::interp::EvalEmitter::speculate(), clang::SemaObjC::stripARCUnbridgedCast(), clang::Sema::TemporaryMaterializationConversion(), throwEscapes(), clang::SemaHLSL::transformInitList(), EnsureImmediateInvocationInDefaultArgs::TransformSourceLocExpr(), clang::threadSafety::SExprBuilder::translateAttrExpr(), TryAddressSpaceCast(), TryClassUnification(), TryConstCast(), TryContextuallyConvertToBool(), tryDiagnoseOverloadedCast(), tryEmitARCCopyWeakInit(), tryEmitARCRetainLoadOfScalar(), clang::CIRGen::CIRGenFunction::tryEmitAsConstant(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), clang::CIRGen::ConstantEmitter::tryEmitConstantExpr(), clang::CodeGen::ConstantEmitter::tryEmitConstantExpr(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), tryEmitSpecializedAllocInit(), clang::Sema::tryExprAsCall(), tryExtractInitializerFromList(), TryGetExprRange(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryLValueToRValueCast(), TryReferenceListInitialization(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticReferenceDowncast(), tryToConvertMemberExprToDeclRefExpr(), tryToConvertMemberExprToDeclRefExpr(), TryUserDefinedConversion(), clang::Sema::UsualArithmeticConversions(), clang::Sema::UsualUnaryConversions(), clang::Sema::UsualUnaryFPConversions(), clang::Sema::VerifyIntegerConstantExpression(), clang::interp::Compiler< Emitter >::visit(), clang::ASTNodeImporter::VisitAddrLabelExpr(), clang::interp::Compiler< Emitter >::VisitAddrLabelExpr(), clang::ASTNodeImporter::VisitArrayInitIndexExpr(), clang::ASTNodeImporter::VisitArrayInitLoopExpr(), clang::ASTNodeImporter::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::interp::Compiler< Emitter >::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitArrayTypeTraitExpr(), clang::ASTNodeImporter::VisitAtomicExpr(), clang::ASTNodeImporter::VisitBinaryConditionalOperator(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::interp::Compiler< Emitter >::visitBool(), clang::interp::Compiler< Emitter >::VisitBuiltinCallExpr(), clang::ASTNodeImporter::VisitCallExpr(), clang::ento::ExprEngine::VisitCast(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::ASTNodeImporter::VisitCharacterLiteral(), clang::ASTNodeImporter::VisitChooseExpr(), clang::interp::Compiler< Emitter >::VisitComplexBinOp(), clang::interp::Compiler< Emitter >::VisitComplexUnaryOperator(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::interp::Compiler< Emitter >::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitCompoundLiteralExpr(), clang::interp::Compiler< Emitter >::VisitCompoundLiteralExpr(), clang::interp::Compiler< Emitter >::VisitConceptSpecializationExpr(), clang::ASTNodeImporter::VisitConditionalOperator(), clang::interp::Compiler< Emitter >::VisitConstantExpr(), clang::JSONNodeDumper::VisitConstantExpr(), clang::TextNodeDumper::VisitConstantExpr(), clang::ASTNodeImporter::VisitConvertVectorExpr(), clang::interp::Compiler< Emitter >::VisitConvertVectorExpr(), clang::ASTNodeImporter::VisitCXXBoolLiteralExpr(), clang::ASTNodeImporter::VisitCXXConstructExpr(), clang::interp::Compiler< Emitter >::VisitCXXConstructExpr(), clang::lifetimes::internal::FactGenerator::VisitCXXConstructExpr(), clang::ASTNodeImporter::VisitCXXDeleteExpr(), clang::ASTNodeImporter::VisitCXXDependentScopeMemberExpr(), clang::ASTNodeImporter::VisitCXXFoldExpr(), clang::lifetimes::internal::FactGenerator::VisitCXXFunctionalCastExpr(), clang::ASTNodeImporter::VisitCXXInheritedCtorInitExpr(), clang::ASTNodeImporter::VisitCXXMemberCallExpr(), clang::lifetimes::internal::FactGenerator::VisitCXXMemberCallExpr(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitCXXNamedCastExpr(), clang::ASTNodeImporter::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), clang::ASTNodeImporter::VisitCXXNoexceptExpr(), clang::interp::Compiler< Emitter >::VisitCXXNoexceptExpr(), clang::ASTNodeImporter::VisitCXXNullPtrLiteralExpr(), clang::interp::Compiler< Emitter >::VisitCXXNullPtrLiteralExpr(), clang::dataflow::ReferencedDeclsVisitor::VisitCXXParenListInitExpr(), clang::interp::Compiler< Emitter >::VisitCXXReinterpretCastExpr(), clang::ASTNodeImporter::VisitCXXScalarValueInitExpr(), clang::interp::Compiler< Emitter >::VisitCXXScalarValueInitExpr(), clang::ASTNodeImporter::VisitCXXStdInitializerListExpr(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), clang::ASTNodeImporter::VisitCXXTemporaryObjectExpr(), clang::ASTNodeImporter::VisitCXXThisExpr(), clang::ento::ExprEngine::VisitCXXThisExpr(), clang::ASTNodeImporter::VisitCXXThrowExpr(), clang::ASTNodeImporter::VisitCXXTypeidExpr(), clang::interp::Compiler< Emitter >::VisitCXXTypeidExpr(), clang::ASTNodeImporter::VisitCXXUnresolvedConstructExpr(), clang::JSONNodeDumper::VisitCXXUnresolvedConstructExpr(), clang::interp::Compiler< Emitter >::VisitCXXUuidofExpr(), clang::interp::Compiler< Emitter >::visitDeclRef(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::lifetimes::internal::FactGenerator::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitExplicitCastExpr(), clang::interp::Compiler< Emitter >::visitExpr(), clang::ASTNodeImporter::VisitExpressionTraitExpr(), clang::interp::Compiler< Emitter >::VisitExtVectorElementExpr(), clang::interp::Compiler< Emitter >::VisitFixedPointBinOp(), clang::ASTNodeImporter::VisitFixedPointLiteral(), clang::interp::Compiler< Emitter >::VisitFixedPointLiteral(), clang::interp::Compiler< Emitter >::VisitFixedPointUnaryOperator(), clang::interp::Compiler< Emitter >::VisitFloatCompoundAssignOperator(), clang::ASTNodeImporter::VisitFloatingLiteral(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitGenericSelectionExpr(), clang::ASTNodeImporter::VisitGNUNullExpr(), clang::interp::Compiler< Emitter >::VisitGNUNullExpr(), clang::ASTNodeImporter::VisitImaginaryLiteral(), clang::interp::Compiler< Emitter >::VisitImaginaryLiteral(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ASTNodeImporter::VisitImplicitValueInitExpr(), clang::interp::Compiler< Emitter >::VisitImplicitValueInitExpr(), clang::interp::Compiler< Emitter >::visitInitializer(), clang::interp::Compiler< Emitter >::visitInitList(), clang::ASTNodeImporter::VisitInitListExpr(), clang::dataflow::ReferencedDeclsVisitor::VisitInitListExpr(), clang::ASTNodeImporter::VisitIntegerLiteral(), clang::JSONNodeDumper::VisitIntegerLiteral(), clang::TextNodeDumper::VisitIntegerLiteral(), clang::interp::Compiler< Emitter >::VisitLogicalBinOp(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ASTNodeImporter::VisitMaterializeTemporaryExpr(), clang::interp::Compiler< Emitter >::VisitMaterializeTemporaryExpr(), clang::ASTNodeImporter::VisitMemberExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::interp::Compiler< Emitter >::VisitObjCEncodeExpr(), clang::JSONNodeDumper::VisitObjCMessageExpr(), clang::ASTNodeImporter::VisitOffsetOfExpr(), clang::ento::ExprEngine::VisitOffsetOfExpr(), clang::interp::Compiler< Emitter >::VisitOffsetOfExpr(), clang::ASTNodeImporter::VisitOpaqueValueExpr(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), clang::interp::Compiler< Emitter >::VisitPointerCompoundAssignOperator(), clang::ASTNodeImporter::VisitPredefinedExpr(), clang::interp::Compiler< Emitter >::VisitRequiresExpr(), clang::ASTNodeImporter::VisitShuffleVectorExpr(), clang::interp::Compiler< Emitter >::VisitShuffleVectorExpr(), clang::ASTNodeImporter::VisitSourceLocExpr(), clang::interp::Compiler< Emitter >::VisitSourceLocExpr(), clang::ASTNodeImporter::VisitStmtExpr(), clang::ASTNodeImporter::VisitStringLiteral(), clang::interp::Compiler< Emitter >::VisitStringLiteral(), clang::ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr(), clang::ASTNodeImporter::VisitTypeTraitExpr(), clang::interp::Compiler< Emitter >::VisitTypeTraitExpr(), clang::ASTNodeImporter::VisitUnaryExprOrTypeTraitExpr(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr(), clang::ASTNodeImporter::VisitUnaryOperator(), clang::ento::ExprEngine::VisitUnaryOperator(), clang::interp::Compiler< Emitter >::VisitUnaryOperator(), clang::lifetimes::internal::FactGenerator::VisitUnaryOperator(), clang::ASTNodeImporter::VisitUnresolvedMemberExpr(), clang::ASTNodeImporter::VisitVAArgExpr(), clang::TextNodeDumper::VisitVarDecl(), clang::interp::Compiler< Emitter >::VisitVectorBinOp(), clang::interp::Compiler< Emitter >::VisitVectorUnaryOperator(), warnOnSizeofOnArrayDecay(), and widenIterationCount().

◆ getUnusedResultAttrImpl()

std::pair< const NamedDecl *, const WarnUnusedResultAttr * > Expr::getUnusedResultAttrImpl ( const Decl * Callee,
QualType ReturnType )
static

Returns the WarnUnusedResultAttr that is declared on the callee or its return type declaration, together with a NamedDecl that refers to the declaration the attribute is attached to.

Definition at line 1630 of file Expr.cpp.

References clang::TypedefType::desugar(), clang::Type::getAs(), and clang::Type::getAsTagDecl().

Referenced by clang::CallExpr::getUnusedResultAttr(), clang::CXXConstructExpr::getUnusedResultAttr(), and clang::ObjCMessageExpr::getUnusedResultAttr().

◆ getValueKind()

ExprValueKind clang::Expr::getValueKind ( ) const
inline

getValueKind - The value kind that this expression produces.

Definition at line 444 of file Expr.h.

References clang::Stmt::ExprBits.

Referenced by clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), actOnOMPReductionKindClause(), clang::CXXDefaultArgExpr::ASTReader, clang::Sema::BuildCXXTypeId(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildSynthesizedThreeWayComparison(), clang::Sema::CheckPointerToMemberOperands(), CheckTemplateArgumentPointerToMember(), clang::Sema::checkUnknownAnyCast(), ClassifyInternal(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::CXXRewrittenBinaryOperator::CXXRewrittenBinaryOperator(), clang::Sema::FixOverloadedFunctionReference(), clang::FullExpr::FullExpr(), clang::ASTContext::getReferenceQualifiedType(), isGLValue(), isLValue(), isPRValue(), isXValue(), LookupMemberExpr(), clang::MatrixSubscriptExpr::MatrixSubscriptExpr(), clang::PackExpansionExpr::PackExpansionExpr(), clang::ParenExpr::ParenExpr(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitObjectArgumentInitialization(), clang::Sema::PerformObjectMemberConversion(), removeLValueToRValueCast(), clang::SemaObjC::stripARCUnbridgedCast(), clang::SemaHLSL::transformInitList(), tryToConvertMemberExprToDeclRefExpr(), tryToConvertMemberExprToDeclRefExpr(), clang::ASTNodeImporter::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitBinaryConditionalOperator(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitCallExpr(), clang::ASTNodeImporter::VisitChooseExpr(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitCompoundLiteralExpr(), clang::ASTNodeImporter::VisitConditionalOperator(), clang::ASTNodeImporter::VisitConvertVectorExpr(), clang::ASTNodeImporter::VisitCXXMemberCallExpr(), clang::ASTNodeImporter::VisitCXXNamedCastExpr(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitExplicitCastExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ASTNodeImporter::VisitMemberExpr(), clang::ASTNodeImporter::VisitOpaqueValueExpr(), and clang::ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr().

◆ getValueKindForType()

◆ hasAnyTypeDependentArguments()

bool Expr::hasAnyTypeDependentArguments ( ArrayRef< Expr * > Exprs)
static

◆ hasNonTrivialCall()

bool Expr::hasNonTrivialCall ( const ASTContext & Ctx) const

Determine whether this expression involves a call to any function that is not trivial.

Definition at line 4030 of file Expr.cpp.

Referenced by isTrivial().

◆ hasPlaceholderType() [1/2]

◆ hasPlaceholderType() [2/2]

bool clang::Expr::hasPlaceholderType ( BuiltinType::Kind K) const
inline

Returns whether this expression has a specific placeholder type.

Definition at line 528 of file Expr.h.

References getType(), and clang::BuiltinType::isPlaceholderTypeKind().

◆ HasSideEffects()

bool Expr::HasSideEffects ( const ASTContext & Ctx,
bool IncludePossibleEffects = true ) const

HasSideEffects - This routine returns true for all those expressions which have any effect other than producing a value.

Example is a function call, volatile variable read, or throwing an exception. If IncludePossibleEffects is false, this call treats certain expressions with potential side effects (such as function call-like expressions, instantiation-dependent expressions, or invocations from a macro) as not having side effects.

Definition at line 3665 of file Expr.cpp.

References clang::cast(), clang::Stmt::children(), Expr(), clang::CastExpr::getCastKind(), clang::CXXConstructExpr::getConstructor(), getExprLoc(), clang::FieldDecl::getInClassInitializer(), clang::Stmt::getStmtClass(), clang::CastExpr::getSubExpr(), getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::Decl::hasAttr(), HasSideEffects(), clang::Type::isReferenceType(), clang::FunctionDecl::isTrivial(), clang::QualType::isVolatileQualified(), clang::Stmt::NoStmtClass, clang::PseudoObjectExpr::semantics_begin(), clang::PseudoObjectExpr::semantics_end(), and clang::ValueStmt::Stmt().

Referenced by clang::Sema::BuildCXXAssumeExpr(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDecltypeType(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CreateGenericSelectionExpr(), clang::CodeGen::CodeGenFunction::EmitAttributedStmt(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::GetCountedByFieldExprGEP(), clang::VarDecl::hasInitWithSideEffects(), HasSideEffects(), isBuiltinAssumeWithSideEffects(), isSimpleZero(), isTrivial(), clang::interp::EvalEmitter::speculate(), clang::SemaHLSL::transformInitList(), and clang::interp::Compiler< Emitter >::visitAttributedStmt().

◆ IgnoreCasts() [1/2]

const Expr * clang::Expr::IgnoreCasts ( ) const
inline

Definition at line 882 of file Expr.h.

References Expr(), and IgnoreCasts().

◆ IgnoreCasts() [2/2]

Expr * Expr::IgnoreCasts ( )

Skip past any casts which might surround this expression until reaching a fixed point.

Skips:

Definition at line 3069 of file Expr.cpp.

References Expr(), clang::IgnoreCastsSingleStep(), and clang::IgnoreExprNodes().

Referenced by getBlockExpr(), IgnoreCasts(), and isConfigurationValue().

◆ IgnoreConversionOperatorSingleStep() [1/2]

const Expr * clang::Expr::IgnoreConversionOperatorSingleStep ( ) const
inline

Definition at line 944 of file Expr.h.

References Expr(), and IgnoreConversionOperatorSingleStep().

◆ IgnoreConversionOperatorSingleStep() [2/2]

Expr * Expr::IgnoreConversionOperatorSingleStep ( )

Skip conversion operators.

If this Expr is a call to a conversion operator, return the argument.

Definition at line 3094 of file Expr.cpp.

References Expr().

Referenced by IgnoreConversionOperatorSingleStep(), and IsArithmeticBinaryExpr().

◆ IgnoreImpCasts() [1/2]

const Expr * clang::Expr::IgnoreImpCasts ( ) const
inline

Definition at line 871 of file Expr.h.

References Expr(), and IgnoreImpCasts().

◆ IgnoreImpCasts() [2/2]

Expr * Expr::IgnoreImpCasts ( )

Skip past any implicit casts which might surround this expression until reaching a fixed point.

Skips:

Definition at line 3065 of file Expr.cpp.

References Expr(), clang::IgnoreExprNodes(), and clang::IgnoreImplicitCastsSingleStep().

Referenced by addFixitForObjCARCConversion(), buildCaptureDecl(), clang::Sema::BuildMemberReferenceExpr(), BuiltinCallWithStaticChain(), castOperatorNeedsParens(), CheckFoldOperand(), CheckIdentityFieldAssignment(), CheckMoveOnConstruction(), clang::SemaObjC::CheckObjCCircularContainer(), checkOpenMPLoop(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseForRangeReferenceVariableCopies(), diagnoseLogicalNotOnLHSofCheck(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCountedByBoundsChecking(), emitOMPAtomicCaptureExpr(), emitOMPAtomicUpdateExpr(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), getAllocatorKind(), getReferencedDeclOfCallee(), getSValForVar(), getUnwidenedIntegerType(), IgnoreImpCasts(), clang::Sema::InvalidLogicalVectorOperands(), IsArithmeticBinaryExpr(), IsPreserveAIArrayBase(), clang::ASTContext::isSameDefaultTemplateArgument(), lookThroughImplicitCasts(), DerefSimplePtrArithFixableGadget::matches(), UPCPreIncrementGadget::matches(), UUCAddAssignGadget::matches(), requiresParensToAddCast(), rewriteToNumericBoxedExpression(), subscriptOperatorNeedsParens(), clang::ConversionFixItGenerator::tryToFixConversion(), and ValidDuplicateEnum().

◆ IgnoreImplicit() [1/2]

const Expr * clang::Expr::IgnoreImplicit ( ) const
inline

Definition at line 892 of file Expr.h.

References Expr(), and IgnoreImplicit().

◆ IgnoreImplicit() [2/2]

Expr * Expr::IgnoreImplicit ( )

◆ IgnoreImplicitAsWritten() [1/2]

const Expr * clang::Expr::IgnoreImplicitAsWritten ( ) const
inline

Definition at line 902 of file Expr.h.

References Expr(), and IgnoreImplicitAsWritten().

◆ IgnoreImplicitAsWritten() [2/2]

Expr * Expr::IgnoreImplicitAsWritten ( )

Skip past any implicit AST nodes which might surround this expression until reaching a fixed point.

Same as IgnoreImplicit, except that it also skips over implicit calls to constructors and conversion functions.

FIXME: Should IgnoreImplicit do this?

Definition at line 3077 of file Expr.cpp.

References Expr(), clang::IgnoreExprNodes(), and clang::IgnoreImplicitAsWrittenSingleStep().

Referenced by clang::tooling::buildAccess(), emitOMPAtomicCompareExpr(), and IgnoreImplicitAsWritten().

◆ IgnoreParenBaseCasts() [1/2]

const Expr * clang::Expr::IgnoreParenBaseCasts ( ) const
inline

Definition at line 978 of file Expr.h.

References Expr(), and IgnoreParenBaseCasts().

◆ IgnoreParenBaseCasts() [2/2]

Expr * Expr::IgnoreParenBaseCasts ( )

Skip past any parentheses and derived-to-base casts until reaching a fixed point.

Skips:

  • What IgnoreParens() skips
  • CastExpr which represent a derived-to-base cast (CK_DerivedToBase, CK_UncheckedDerivedToBase and CK_NoOp)

Definition at line 3107 of file Expr.cpp.

References Expr(), clang::IgnoreBaseCastsSingleStep(), clang::IgnoreExprNodes(), and clang::IgnoreParensSingleStep().

Referenced by getBestDynamicClassTypeExpr(), and IgnoreParenBaseCasts().

◆ IgnoreParenCasts() [1/2]

const Expr * clang::Expr::IgnoreParenCasts ( ) const
inline

Definition at line 937 of file Expr.h.

References Expr(), and IgnoreParenCasts().

◆ IgnoreParenCasts() [2/2]

Expr * Expr::IgnoreParenCasts ( )

Skip past any parentheses and casts which might surround this expression until reaching a fixed point.

Skips:

Definition at line 3090 of file Expr.cpp.

References Expr(), clang::IgnoreCastsSingleStep(), clang::IgnoreExprNodes(), and clang::IgnoreParensSingleStep().

Referenced by clang::Sema::ActOnFinishSwitchStmt(), clang::SemaOpenMP::ActOnOpenMPDispatchDirective(), clang::Sema::BuildCallToMemberFunction(), BuiltinAnnotation(), clang::Sema::BuiltinConstantArg(), BuiltinSEHScopeCheck(), clang::Sema::CheckAdditionOperands(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::Sema::CheckAssignmentOperands(), clang::SemaRISCV::CheckBuiltinFunctionCall(), checkFormatStringExpr(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckForNullPointerDereference(), CheckICE(), CheckIndirectionOperand(), checkObjCPointerIntrospection(), clang::SemaObjC::CheckObjCString(), clang::SemaOpenACC::CheckReductionVar(), clang::Sema::CheckStaticArrayArgument(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::CheckSubtractionOperands(), CheckSufficientAllocSize(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::SemaCodeCompletion::CodeCompleteCase(), clang::analyze_os_log::computeOSLogBufferLayout(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DiagnoseAssignmentAsCondition(), diagnoseTautologicalComparison(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::emitBuiltinOSLogFormat(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CodeGenFunction::EmitRISCVCpuIs(), clang::CodeGen::CodeGenFunction::EmitRISCVCpuSupports(), EmitSpecialRegisterBuiltin(), clang::findCapturingExpr(), FindTypeTagExpr(), getDeclFromThisExpr(), getDirectCallExpr(), getNSArrayObjects(), getObjCProperty(), getStrlenExprArg(), ignoreLiteralAdditions(), IgnoreParenCasts(), isCalleeArrow(), isCapturedBy(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isReferenceToNoReturn(), clang::ASTContext::isSentinelNullExpr(), IsStandardConversion(), isTrivialExpression(), LookThroughTransitiveAssignmentsAndCommaOperators(), LookupMemberExpr(), clang::sema::FunctionScopeInfo::markSafeWeakUse(), maybeAdjustInterfaceForSubscriptingCheck(), clang::ento::ConditionBRVisitor::patternMatch(), peelOffOuterExpr(), REGISTER_MAP_WITH_PROGRAMSTATE(), RemoveSelectorFromWarningCache(), tryEmitSpecializedAllocInit(), TryEvaluateBuiltinNaN(), clang::tryToFindPtrOrigin(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::ento::ConditionBRVisitor::VisitTrueTest(), and clang::ento::ConditionBRVisitor::VisitTrueTest().

◆ IgnoreParenImpCasts() [1/2]

const Expr * clang::Expr::IgnoreParenImpCasts ( ) const
inline

Definition at line 928 of file Expr.h.

References Expr(), and IgnoreParenImpCasts().

◆ IgnoreParenImpCasts() [2/2]

Expr * Expr::IgnoreParenImpCasts ( )

Skip past any parentheses and implicit casts which might surround this expression until reaching a fixed point.

FIXME: IgnoreParenImpCasts really ought to be equivalent to IgnoreParens() + IgnoreImpCasts() until reaching a fixed point. However this is currently not the case. Instead IgnoreParenImpCasts() skips:

Definition at line 3085 of file Expr.cpp.

References Expr(), clang::IgnoreExprNodes(), clang::IgnoreImplicitCastsExtraSingleStep(), and clang::IgnoreParensSingleStep().

Referenced by clang::SemaOpenACC::ActOnCacheVar(), clang::SemaOpenMP::ActOnOpenMPAtomicDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareVariantDirective(), clang::SemaOpenMP::ActOnOpenMPDetachClause(), clang::SemaOpenMP::ActOnOpenMPExecutableDirective(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::SemaOpenACC::ActOnRoutineName(), clang::SemaOpenACC::ActOnVar(), AnalyzeAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), areEqualIntegers(), clang::ast_matchers::AST_MATCHER_P(), clang::ast_matchers::AST_MATCHER_P(), clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P2(), buildAccessForPointer(), buildAccessForValue(), clang::Sema::BuildArrayType(), clang::SemaARM::BuiltinARMSpecialReg(), BuiltinCpu(), calculateConstraintSatisfaction(), clang::Sema::canCalleeThrow(), checkArithmeticNull(), checkArithmeticOrEnumeralThreeWayCompare(), CheckBoolLikeConversion(), CheckCommaOperand(), CheckConditionalOperand(), CheckConditionalOperator(), clang::Sema::CheckConstraintExpression(), clang::SemaObjC::CheckConversionToObjCLiteral(), clang::SemaAMDGPU::checkCoopAtomicFunctionCall(), clang::SemaOpenACC::CheckDeclareClause(), clang::Sema::CheckFloatComparison(), checkForLiteralCreation(), CheckForReference(), CheckICE(), CheckImplicitArgumentConversions(), clang::Sema::CheckImplicitConversion(), clang::SemaObjC::CheckLiteralKind(), checkMapConflicts(), CheckMoveOnConstruction(), CheckObjCDictionaryLiteralDuplicateKeys(), checkOMPArraySectionConstantForReduction(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckPlaceholderExpr(), checkPreviousOMPAllocateAttribute(), clang::SemaHLSL::CheckResourceBinOp(), clang::Sema::CheckShadowingDeclModification(), clang::SemaObjC::CheckSubscriptingKind(), CheckTautologicalComparison(), clang::Sema::CheckTemplateArgument(), checkUnsafeAssignLiteral(), clang::Sema::CheckUnusedVolatileAssignment(), clang::SemaOpenACC::CheckVarIsPointerType(), ClassifyMemberExpr(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseBadShiftValues(), DiagnoseCallingConvCast(), clang::Sema::DiagnoseConditionalForNull(), DiagnoseConstAssignment(), clang::SemaObjC::DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseFloatingImpCast(), DiagnoseIntInBoolContext(), DiagnoseNullConversion(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), diagnoseTautologicalComparison(), clang::Sema::DiagnoseTypeTraitDetails(), diagnoseUnknownAnyExpr(), diagnoseWellFormedUnsatisfiedConstraintExpr(), clang::Sema::diagnoseZeroToNullptrConversion(), doesExprLikelyComputeSize(), clang::CodeGen::CodeGenFunction::EmitArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitInitWithReductionInitializer(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::SemaObjC::EmitRelatedResultTypeNote(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::SemaOpenMP::EndOpenMPDSABlock(), ExprLooksBoolean(), clang::Sema::findFailedBooleanCondition(), FindTypeTagExpr(), getAllocatorKind(), getBaseDecl(), getEnumConstantDecl(), clang::SemaObjC::getMessageSendResultType(), clang::CIRGen::CIRGenFunction::getOpenACCDataOperandInfo(), getOverflowPatternBinOp(), getPointerAndSize(), getPrivateItem(), getReferencedDeclOfCallee(), handleFormatMatchesAttr(), hasRecursiveCallInPath(), libc_func_matchers::hasUnsafeFormatOrSArg(), IgnoreParenImpCasts(), IgnoreUnlessSpelledInSource(), isEnumConstant(), IsEnumConstOrFromMacro(), IsImplicitBoolFloatConversion(), isKnownToHaveUnsignedValue(), libc_func_matchers::isNullTermPointer(), isObjCObjectLiteral(), isObjCSelfExpr(), isPtrBufferSafe(), IsReadonlyMessage(), isSafeArraySubscript(), isSafeSpanTwoParamConstruct(), isSameComparisonOperand(), isSameWidthConstantConversion(), isSubstitutedTemplateArgument(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), lookThroughRangesV3Condition(), LookupMemberExpr(), maybeDiagnoseAssignmentToFunction(), processImplicitMapsWithDefaultMappers(), ProcessOpenMPDoacrossClauseCommon(), clang::ento::ExprEngine::processSwitch(), refersToGlobalRegisterVar(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToNumberLiteral(), ShouldDiagnoseSwitchCaseNotInEnum(), stripCastsAndSugar(), tryTransformToLiteralConstant(), and UsefulToPrintExpr().

◆ IgnoreParenLValueCasts() [1/2]

const Expr * clang::Expr::IgnoreParenLValueCasts ( ) const
inline

Definition at line 957 of file Expr.h.

References Expr(), and IgnoreParenLValueCasts().

◆ IgnoreParenLValueCasts() [2/2]

Expr * Expr::IgnoreParenLValueCasts ( )

Skip past any parentheses and lvalue casts which might surround this expression until reaching a fixed point.

Skips:

  • What IgnoreParens() skips
  • What IgnoreCasts() skips, except that only lvalue-to-rvalue casts are skipped FIXME: This is intended purely as a temporary workaround for code that hasn't yet been rewritten to do the right thing about those casts, and may disappear along with the last internal use.

Definition at line 3102 of file Expr.cpp.

References Expr(), clang::IgnoreExprNodes(), clang::IgnoreLValueCastsSingleStep(), and clang::IgnoreParensSingleStep().

Referenced by IgnoreParenLValueCasts(), and clang::SemaObjC::isSelfExpr().

◆ IgnoreParenNoopCasts() [1/2]

const Expr * clang::Expr::IgnoreParenNoopCasts ( const ASTContext & Ctx) const
inline

Definition at line 968 of file Expr.h.

References Expr(), and IgnoreParenNoopCasts().

◆ IgnoreParenNoopCasts() [2/2]

◆ IgnoreParens() [1/2]

const Expr * clang::Expr::IgnoreParens ( ) const
inline

Definition at line 914 of file Expr.h.

References Expr(), and IgnoreParens().

◆ IgnoreParens() [2/2]

Expr * Expr::IgnoreParens ( )

Skip past any parentheses which might surround this expression until reaching a fixed point.

Skips:

Definition at line 3081 of file Expr.cpp.

References Expr(), clang::IgnoreExprNodes(), and clang::IgnoreParensSingleStep().

Referenced by clang::Sema::ActOnCXXThrow(), actOnOMPReductionKindClause(), clang::Sema::AddInitializerToDecl(), clang::ast_matchers::AST_MATCHER_P_OVERLOAD(), clang::Sema::BoundsSafetyCheckUseOfCountAttrPtr(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXMemberCallExpr(), clang::SemaObjC::BuildObjCBoxedExpr(), clang::canExprResolveTo(), clang::Sema::canThrow(), clang::Sema::CheckAddressOfOperand(), clang::SemaPPC::checkAIXMemberAlignment(), CheckAlignOfExpr(), clang::SemaPseudoObject::checkAssignment(), clang::Sema::CheckFloatComparison(), clang::SemaPseudoObject::checkIncDec(), CheckIndirectionOperand(), checkMapClauseExpressionBase(), CheckMoveOnConstruction(), clang::Sema::CheckPlaceholderExpr(), checkPointerAuthValue(), clang::Sema::CheckPointerToMemberOperands(), clang::SemaHLSL::CheckResourceBinOp(), clang::SemaPseudoObject::checkRValue(), CheckStringInit(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckUseOfCXXMethodAsAddressOfOperand(), clang::Sema::CheckVecStepExpr(), ClassifyMemberExpr(), clang::Sema::completeExprArrayBound(), clang::computeDependence(), clang::Sema::CreateBuiltinBinOp(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::DiagnoseAlwaysNonNullPointer(), clang::SemaObjC::diagnoseARCUnbridgedCast(), DiagnoseBadConversion(), DiagnoseDivisionSizeofPointerOrArray(), clang::Sema::DiagnoseEqualityWithExtraParens(), clang::Sema::DiscardMisalignedMemberAddress(), DoMarkPotentialCapture(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAttributedStmt(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CIRGen::CIRGenFunction::emitCallee(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CIRGen::CIRGenFunction::emitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenPGO::emitMCDCCondBitmapReset(), clang::CodeGen::CodeGenPGO::emitMCDCTestVectorBitmapUpdate(), clang::CIRGen::CIRGenFunction::emitOpOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitOrigPointerRValue(), EmitPointerWithAlignment(), EvaluateLValue(), clang::OverloadExpr::find(), findEnumForBlockReturn(), clang::findRetainCycleOwner(), findWeakLValue(), GetAlignOfExpr(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), clang::ento::SValBuilder::getConstantVal(), clang::Sema::getDecltypeForExpr(), getExprAsWritten(), clang::CXXMemberCallExpr::getImplicitObjectArgument(), clang::CXXMemberCallExpr::getMethodDecl(), clang::Sema::getNamedReturnInfo(), getPrivateItem(), getReferencedDeclOfCallee(), getSourceBitField(), getSyntacticFromForPseudoObjectExpr(), clang::CFGBlock::getTerminatorCondition(), clang::dataflow::ignoreCFGOmittedNodes(), IgnoreCommaOperand(), IgnoreParens(), ignorePointerCastsAndParens(), ignoreTransparentExprs(), clang::CodeGen::CodeGenFunction::isBinaryLogicalOp(), isBlockVarRef(), isCheapEnoughToEvaluateUnconditionally(), isCheapEnoughToEvaluateUnconditionally(), isFlexibleArrayMemberLike(), isGLValueFromPointerDeref(), isInvalidICRSource(), isKnownToHaveBooleanValue(), IsLiteralConstantExpr(), isLValueKnownNonNull(), IsModifiable(), isOBJCGCCandidate(), isParenthesizedADLCallee(), clang::CodeGen::CodeGenFunction::isPointerKnownNonNull(), isReadIfDiscardedInCPlusPlus11(), isReferenceToNonConstCapture(), isSameComparisonOperand(), isSimpleZero(), IsStandardConversion(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), clang::CodeGen::CodeGenFunction::isUnderlyingBasePointerConstantNull(), isUnusedResultAWarning(), clang::isValidPreserveEnumValueArg(), clang::isValidPreserveFieldInfoArg(), clang::isValidPreserveTypeInfoArg(), LookThroughExpr(), DerefSimplePtrArithFixableGadget::matches(), maybeGetUnaryAddrOfOperand(), clang::InitializationSequence::Perform(), refersToVectorElement(), shouldEmitSeparateBlockRetain(), shouldExtendReceiverForInnerPointerMessage(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::CIRGen::CIRGenFunction::shouldNullCheckClassCastValue(), skipRValueSubobjectAdjustments(), skipTemporaryBindingsNoOpCastsAndParens(), tryEmitARCCopyWeakInit(), tryEmitARCRetainLoadOfScalar(), clang::Sema::tryExprAsCall(), TryGetExprRange(), tryTransformToLiteralConstant(), UnpackConstruction(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitGuardedExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().

◆ IgnoreUnlessSpelledInSource() [1/2]

◆ IgnoreUnlessSpelledInSource() [2/2]

const Expr * clang::Expr::IgnoreUnlessSpelledInSource ( ) const
inline

Definition at line 862 of file Expr.h.

References Expr(), and IgnoreUnlessSpelledInSource().

◆ isBoundMemberFunction()

bool Expr::isBoundMemberFunction ( ASTContext & Ctx) const

Returns true if this expression is a bound member function.

Definition at line 3035 of file Expr.cpp.

References ClassifyLValue(), isTypeDependent(), and LV_MemberFunction.

◆ isConstantInitializer()

bool Expr::isConstantInitializer ( ASTContext & Ctx,
bool ForRef,
const Expr ** Culprit = nullptr ) const

◆ isCXX11ConstantExpr()

bool Expr::isCXX11ConstantExpr ( const ASTContext & Ctx,
APValue * Result = nullptr ) const

isCXX11ConstantExpr - Return true if this expression is a constant expression in C++11.

Can only be used in C++.

Note: This does not perform the implicit conversions required by C++11 [expr.const]p5.

Definition at line 18586 of file ExprConstant.cpp.

References clang::ConstantExpression, EvaluateAsRValue(), FastEvaluateAsRValue(), clang::ASTContext::getLangOpts(), clang::APValue::hasValue(), isValueDependent(), and clang::Result.

Referenced by EvaluateCPlusPlus11IntegralConstantExpr().

◆ isCXX98IntegralConstantExpr()

bool Expr::isCXX98IntegralConstantExpr ( const ASTContext & Ctx) const

isCXX98IntegralConstantExpr - Return true if this expression is an integral constant expression in C++98.

Can only be used in C++.

Definition at line 18579 of file ExprConstant.cpp.

References CheckICE(), and isValueDependent().

Referenced by isNullPointerConstant().

◆ isDefaultArgument()

bool Expr::isDefaultArgument ( ) const

Determine whether this expression is a default function argument.

Default arguments are implicitly generated in the abstract syntax tree by semantic analysis for function calls, object constructions, etc. in C++. Default arguments are represented by CXXDefaultArgExpr nodes; this routine also looks through any implicit casts to determine whether the expression is a default argument.

Definition at line 3209 of file Expr.cpp.

References Expr(), and clang::isa().

Referenced by clang::TreeTransform< AdjustConstraintDepth >::DropCallArgument(), and clang::CXXConstructExpr::getEndLoc().

◆ isEvaluatable()

bool Expr::isEvaluatable ( const ASTContext & Ctx,
SideEffectsKind AllowSideEffects = SE_NoSideEffects ) const

isEvaluatable - Call EvaluateAsRValue to see if this expression can be constant folded without side-effects, but discard the result.

isEvaluatable - Call EvaluateAsRValue to see if this expression can be constant folded, but discard the result.

Definition at line 17978 of file ExprConstant.cpp.

References EvaluateAsRValue(), hasUnacceptableSideEffect(), isValueDependent(), and clang::Result.

Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), isCheapEnoughToEvaluateUnconditionally(), isCheapEnoughToEvaluateUnconditionally(), isConstantInitializer(), and isTrivial().

◆ isFlexibleArrayMemberLike()

bool Expr::isFlexibleArrayMemberLike ( const ASTContext & Context,
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
bool IgnoreTemplateOrMacroSubstitution = false ) const

Check whether this array fits the idiom of a flexible array member, depending on the value of -fstrict-flex-array.

When IgnoreTemplateOrMacroSubstitution is set, it doesn't consider sizes resulting from the substitution of a macro or a template as special sizes.

Definition at line 202 of file Expr.cpp.

References Expr(), getType(), IgnoreParens(), and clang::Decl::isFlexibleArrayMemberLike().

◆ isGLValue()

bool clang::Expr::isGLValue ( ) const
inline

Definition at line 287 of file Expr.h.

References getValueKind(), and clang::VK_PRValue.

Referenced by clang::Sema::ActOnConditionalOp(), buildCapture(), buildCaptureDecl(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildSynthesizedThreeWayComparison(), clang::interp::Context::canClassify(), clang::CastExpr::changesVolatileQualification(), clang::interp::Context::classify(), clang::ento::SValBuilder::conjureSymbolVal(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultLvalueConversion(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CIRGen::CIRGenFunction::emitCallArg(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredConditionalOperator(), clang::CodeGen::CodeGenFunction::EmitInitListLValue(), Evaluate(), EvaluateAsRValue(), clang::interp::Context::evaluateAsRValue(), EvaluateLValue(), clang::ento::SValBuilder::getConstantVal(), clang::SemaOpenMP::getOpenMPCapturedExpr(), clang::dataflow::Environment::getStorageLocation(), HandleDynamicCast(), clang::CompoundLiteralExpr::hasStaticStorage(), hasTrivialGetExpr(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), isReadIfDiscardedInCPlusPlus11(), isRvalueByValueRecord(), IsStandardConversion(), clang::InitListExpr::isTransparent(), clang::Sema::MaybeBindToTemporary(), clang::dataflow::propagateValueOrStorageLocation(), clang::dataflow::Environment::setStorageLocation(), TryClassUnification(), TryContextuallyConvertToBool(), clang::CIRGen::ConstantEmitter::tryEmitConstantExpr(), clang::CodeGen::ConstantEmitter::tryEmitConstantExpr(), tryEvaluateBuiltinObjectSize(), TryLValueToRValueCast(), TryReinterpretCast(), clang::interp::Compiler< Emitter >::visit(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::interp::Compiler< Emitter >::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitBuiltinCallExpr(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), clang::interp::Compiler< Emitter >::VisitExtVectorElementExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::interp::Compiler< Emitter >::VisitMemberExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().

◆ isImplicitCXXThis()

bool Expr::isImplicitCXXThis ( ) const

Whether this expression is an implicit reference to 'this' in C++.

Definition at line 3290 of file Expr.cpp.

References Expr(), and Paren.

Referenced by clang::tooling::buildAccess(), clang::tooling::buildAddressOf(), clang::MemberExpr::isImplicitAccess(), and clang::MSPropertyRefExpr::isImplicitAccess().

◆ isInstantiationDependent()

bool clang::Expr::isInstantiationDependent ( ) const
inline

Whether this expression is instantiation-dependent, meaning that it depends in some way on.

  • a template parameter (even if neither its type nor (constant) value can change due to the template instantiation)
  • or an error

In the following example, the expression sizeof(sizeof(T() + T())) is instantiation-dependent (since it involves a template parameter T), but is neither type- nor value-dependent, since the type of the inner sizeof is known (std::size_t) and therefore the size of the outer sizeof is known.

template<typename T>
void f(T x, T y) {
sizeof(sizeof(T() + T());
}
const FunctionProtoType * T
void func(int) {
func(); // the expression is instantiation-dependent, because it depends
// on an error.
}

Definition at line 223 of file Expr.h.

References getDependence().

Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPAllocateClause(), clang::SemaOpenMP::ActOnOpenMPAtomicDirective(), clang::SemaOpenMP::ActOnOpenMPCriticalDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPDetachClause(), clang::SemaOpenMP::ActOnOpenMPDistScheduleClause(), clang::SemaOpenMP::ActOnOpenMPInitClause(), clang::SemaOpenMP::ActOnOpenMPLinearClause(), clang::SemaOpenMP::ActOnOpenMPScheduleClause(), applyOMPAllocateAttribute(), clang::ast_matchers::AST_MATCHER(), clang::Sema::BuildBitIntType(), clang::Sema::BuildDecltypeType(), clang::Sema::BuildExprRequirement(), clang::Sema::BuildNestedRequirement(), clang::Sema::BuildPackIndexingExpr(), clang::Sema::checkAndRewriteMustTailAttr(), clang::SemaOpenACC::CheckCollapseLoopCount(), clang::SemaOpenACC::CheckGangClause(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), clang::SemaOpenACC::CheckReductionVar(), checkSimdlenSafelenSpecified(), clang::SemaOpenACC::CheckTileSizeExpr(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::computeDependence(), clang::OpenACCCollapseClause::Create(), getAllocatorKind(), clang::ASTContext::getConstantArrayType(), clang::Sema::getDecltypeForExpr(), clang::ASTContext::getDecltypeType(), clang::ASTContext::getDependentAddressSpaceType(), clang::ASTContext::getDependentBitIntType(), clang::PackIndexingExpr::getSelectedIndex(), isNonNegativeIntegerValue(), clang::SemaOpenACC::OpenACCParsedClause::setConditionDetails(), clang::SemaOpenMP::VerifyPositiveIntegerConstantInClause(), and clang::ASTNodeImporter::VisitUnresolvedLookupExpr().

◆ isIntegerConstantExpr()

◆ isKnownToHaveBooleanValue()

bool Expr::isKnownToHaveBooleanValue ( bool Semantic = true) const

isKnownToHaveBooleanValue - Return true if this is an integer expression that is known to return 0 or 1.

This happens for _Bool/bool expressions but also int expressions which are produced by things like comparisons in C.

Parameters
SemanticIf true, only return true for expressions that are known to be semantically boolean, which might not be true even for expressions that are known to evaluate to 0/1. For instance, reading an unsigned bit-field with width '1' will evaluate to 0/1, but doesn't necessarily semantically correspond to a bool.

Definition at line 133 of file Expr.cpp.

References Expr(), getSourceBitField(), getType(), IgnoreParens(), clang::isa(), clang::Type::isBooleanType(), and clang::Type::isIntegralOrEnumerationType().

Referenced by clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::CheckImplicitConversion(), and diagnoseLogicalNotOnLHSofCheck().

◆ isLValue()

bool clang::Expr::isLValue ( ) const
inline

isLValue - True if this expression is an "l-value" according to the rules of the current language.

C and C++ give somewhat different rules for this concept, but in general, the result of an l-value expression identifies a specific object whereas the result of an r-value expression is a value detached from any specific storage.

C++11 divides the concept of "r-value" into pure r-values ("pr-values") and so-called expiring values ("x-values"), which identify specific objects that can be safely cannibalized for their resources.

Definition at line 284 of file Expr.h.

References getValueKind(), isLValue(), and clang::VK_LValue.

Referenced by clang::SemaObjC::ActOnObjCForCollectionStmt(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::SemaHLSL::ActOnOutParamExpr(), clang::Sema::ActOnParenExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), CheckAsmLValue(), clang::Sema::CheckSizelessVectorOperands(), checkTupleLikeDecomposition(), clang::Sema::CheckVectorOperands(), ClassifyInternal(), clang::Sema::ConstantFoldAttrArgs(), clang::Sema::DefaultFunctionArrayConversion(), clang::InitializationSequence::Diagnose(), EvaluateExpressionTrait(), clang::CodeGen::CodeGenFunction::GetCountedByFieldExprGEP(), getObjCProperty(), clang::MaterializeTemporaryExpr::isBoundToLvalueReference(), IsGlobalLValue(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), isLValue(), isReferenceToNonConstCapture(), clang::InitializationSequence::Perform(), clang::SemaHLSL::transformInitList(), TryConstCast(), tryEmitARCCopyWeakInit(), TryLValueToRValueCast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::interp::Compiler< Emitter >::VisitComplexUnaryOperator(), clang::interp::Compiler< Emitter >::VisitCompoundLiteralExpr(), and clang::interp::Compiler< Emitter >::VisitCXXTypeidExpr().

◆ isModifiableLvalue()

Expr::isModifiableLvalueResult Expr::isModifiableLvalue ( ASTContext & Ctx,
SourceLocation * Loc = nullptr ) const

isModifiableLvalue - C99 6.3.2.1: an lvalue that does not have array type, does not have an incomplete type, does not have a const-qualified type, and if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const-qualified type.

Parameters
Loc[in,out] - A source location which may be filled in with the location of the expression making this a non-modifiable lvalue, if specified.

Definition at line 749 of file ExprClassification.cpp.

References clang::Expr::Classification::CL_AddressableVoid, clang::Expr::Classification::CL_ArrayTemporary, clang::Expr::Classification::CL_ClassTemporary, clang::Expr::Classification::CL_DuplicateVectorComponents, clang::Expr::Classification::CL_Function, clang::Expr::Classification::CL_LValue, clang::Expr::Classification::CL_MemberFunction, clang::Expr::Classification::CL_ObjCMessageRValue, clang::Expr::Classification::CL_PRValue, clang::Expr::Classification::CL_SubObjCPropertySetting, clang::Expr::Classification::CL_Void, clang::Expr::Classification::CL_XValue, ClassifyModifiable(), clang::Expr::Classification::CM_ArrayType, clang::Expr::Classification::CM_ConstAddrSpace, clang::Expr::Classification::CM_ConstQualified, clang::Expr::Classification::CM_ConstQualifiedField, clang::Expr::Classification::CM_Function, clang::Expr::Classification::CM_IncompleteType, clang::Expr::Classification::CM_LValueCast, clang::Expr::Classification::CM_Modifiable, clang::Expr::Classification::CM_NoSetterProperty, clang::Expr::Classification::CM_RValue, clang::Expr::Classification::CM_Untested, clang::Expr::Classification::getKind(), clang::Expr::Classification::getModifiable(), MLV_ArrayTemporary, MLV_ArrayType, MLV_ClassTemporary, MLV_ConstAddrSpace, MLV_ConstQualified, MLV_ConstQualifiedField, MLV_DuplicateVectorComponents, MLV_IncompleteType, MLV_IncompleteVoidType, MLV_InvalidExpression, MLV_InvalidMessageExpression, MLV_LValueCast, MLV_MemberFunction, MLV_NoSetterProperty, MLV_NotObjectType, MLV_SubObjCPropertySetting, and MLV_Valid.

Referenced by clang::Sema::ActOnGCCAsmStmt(), and CheckForModifiableLvalue().

◆ isNullPointerConstant()

Expr::NullPointerConstantKind Expr::isNullPointerConstant ( ASTContext & Ctx,
NullPointerConstantValueDependence NPC ) const

isNullPointerConstant - C99 6.3.2.3p3 - Test if this reduces down to a Null pointer constant.

isNullPointerConstant - C99 6.3.2.3p3 - Return whether this is a null pointer constant or not, as well as the specific kind of constant detected.

The return value can further distinguish the kind of NULL pointer constant that was detected.

Null pointer constants can be integer constant expressions with the value zero, casts of zero to void*, nullptr (C++0X), or __null (a GNU extension).

Definition at line 4042 of file Expr.cpp.

References containsErrors(), clang::Qualifiers::empty(), EvaluateKnownConstInt(), Expr(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getDefaultOpenCLPointeeAddrSpace(), clang::ASTContext::getLangOpts(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), getType(), clang::APIntStorage::getValue(), clang::isa(), isCXX98IntegralConstantExpr(), isIntegerConstantExpr(), isTypeDependent(), isValueDependent(), clang::Type::isVoidType(), NPC_NeverValueDependent, NPC_ValueDependentIsNotNull, NPC_ValueDependentIsNull, NPCK_CXX11_nullptr, NPCK_GNUNull, NPCK_NotNull, NPCK_ZeroExpression, NPCK_ZeroLiteral, and clang::Qualifiers::removeAddressSpace().

Referenced by clang::Sema::BuildCXXUuidof(), clang::SemaObjC::BuildInstanceMessage(), clang::Sema::CheckAdditionOperands(), clang::Sema::CheckAssignmentConstraints(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::Sema::CheckCompareOperands(), checkConditionalNullPointer(), clang::SemaObjC::CheckConversionToObjCLiteral(), checkFormatStringExpr(), checkPointerAuthValue(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckStaticArrayArgument(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::DiagnoseConditionalForNull(), diagnoseTautologicalComparison(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::Sema::FindCompositePointerType(), clang::ento::SValBuilder::getConstantVal(), isInvalidICRSource(), clang::Sema::IsMemberPointerConversion(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isNullPointerConstantForConversion(), isNullPointerValueTemplateArgument(), clang::ASTContext::isSentinelNullExpr(), clang::Sema::PerformImplicitConversion(), and clang::Sema::PrepareScalarCast().

◆ isOBJCGCCandidate()

bool Expr::isOBJCGCCandidate ( ASTContext & Ctx) const

isOBJCGCCandidate - Return true if this expression may be used in a read/ write barrier.

isOBJCGCCandidate - Check if an expression is objc gc'able.

returns true, if it is; false otherwise.

Definition at line 2996 of file Expr.cpp.

References clang::cast(), Expr(), clang::MemberExpr::getBase(), clang::ASTContext::getObjCGCAttrKind(), clang::Stmt::getStmtClass(), IgnoreParens(), isOBJCGCCandidate(), clang::T, and clang::Qualifiers::Weak.

Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), and isOBJCGCCandidate().

◆ isObjCSelfExpr()

bool Expr::isObjCSelfExpr ( ) const

Check if this expression is the ObjC 'self' implicit parameter.

Definition at line 4187 of file Expr.cpp.

References Expr(), clang::DeclRefExpr::getDecl(), clang::ObjCMethodDecl::getSelfDecl(), and IgnoreParenImpCasts().

Referenced by clang::SemaObjC::BuildInstanceMessage(), and clang::SemaObjC::getMessageSendResultType().

◆ isOrdinaryOrBitFieldObject()

bool clang::Expr::isOrdinaryOrBitFieldObject ( ) const
inline

◆ isPotentialConstantExpr()

◆ isPotentialConstantExprUnevaluated()

bool Expr::isPotentialConstantExprUnevaluated ( Expr * E,
const FunctionDecl * FD,
SmallVectorImpl< PartialDiagnosticAt > & Diags )
static

isPotentialConstantExprUnevaluated - Return true if this expression might be usable in a constant expression in C++11 in an unevaluated context, if it were in function FD marked constexpr.

Return false if the function can never produce a constant expression, along with diagnostics describing why not.

Definition at line 18749 of file ExprConstant.cpp.

References clang::ConstantExpressionUnevaluated, clang::Expr::EvalStatus::Diag, Evaluate(), Expr(), clang::Decl::getASTContext(), clang::ASTContext::getInterpContext(), clang::interp::Context::isPotentialConstantExprUnevaluated(), and isValueDependent().

Referenced by checkFunctionConditionAttr(), and instantiateDependentFunctionAttrCondition().

◆ isPRValue()

bool clang::Expr::isPRValue ( ) const
inline

Definition at line 285 of file Expr.h.

References getValueKind(), and clang::VK_PRValue.

Referenced by clang::Sema::ActOnConditionalOp(), clang::Sema::BuildArrayType(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildResolvedCoawaitExpr(), CheckICE(), checkIndirectCopyRestoreSource(), CheckLiteralType(), CheckMoveOnConstruction(), clang::Sema::CheckPointerToMemberOperands(), ClassifyInternal(), clang::ento::ExprEngine::ConstructInitList(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CIRGen::CIRGenFunction::emitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), emitPseudoObjectExpr(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), EvaluateAsBooleanCondition(), EvaluateAtomic(), EvaluateAtomicConstraint(), EvaluateBuiltinStrLen(), EvaluateComplex(), EvaluateExpressionTrait(), EvaluateFloat(), EvaluateInPlace(), EvaluateIntegerOrLValue(), EvaluateMemberPointer(), EvaluatePointer(), EvaluateRecord(), EvaluateTemporary(), EvaluateVector(), EvaluateVoid(), clang::Sema::FillInlineAsmIdentifierInfo(), clang::dataflow::Environment::getResultObjectLocation(), clang::dataflow::Environment::getValue(), clang::Sema::IgnoredValueConversions(), ignorePointerCastsAndParens(), clang::Sema::ImpCastExprToType(), clang::InitListExpr::isTransparent(), clang::Sema::maybeExtendBlockObject(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitObjectArgumentInitialization(), clang::dataflow::Environment::setValue(), clang::Sema::TemporaryMaterializationConversion(), TryConstCast(), and TryListInitialization().

◆ isReadIfDiscardedInCPlusPlus11()

bool Expr::isReadIfDiscardedInCPlusPlus11 ( ) const

Determine whether an lvalue-to-rvalue conversion should implicitly be applied to this expression if it appears as a discarded-value expression in C++11 onwards.

This applies to certain forms of volatile glvalues.

Definition at line 2560 of file Expr.cpp.

References Expr(), getType(), IgnoreParens(), clang::isa(), and isGLValue().

Referenced by clang::Sema::IgnoredValueConversions(), and isUnusedResultAWarning().

◆ isSameComparisonOperand()

bool Expr::isSameComparisonOperand ( const Expr * E1,
const Expr * E2 )
static

Checks that the two Expr's will refer to the same value as a comparison operand.

The caller must ensure that the values referenced by the Expr's are not modified between E1 and E2 or the result my be invalid.

Definition at line 4296 of file Expr.cpp.

References clang::cast(), clang::declaresSameEntity(), Expr(), clang::Stmt::getStmtClass(), IgnoreParenImpCasts(), IgnoreParens(), clang::isa(), and isSameComparisonOperand().

Referenced by diagnoseTautologicalComparison(), isSameComparisonOperand(), and isTautologicalBoundsCheck().

◆ isTemporaryObject()

bool Expr::isTemporaryObject ( ASTContext & Ctx,
const CXXRecordDecl * TempTy ) const

Determine whether the result of this expression is a temporary object of the given class type.

isTemporaryObject - Determines if this expression produces a temporary of the given class type.

Definition at line 3248 of file Expr.cpp.

References clang::C, Classify(), Expr(), getType(), clang::isa(), clang::Expr::Classification::isPRValue(), and skipTemporaryBindingsNoOpCastsAndParens().

Referenced by clang::Sema::BuildCXXConstructExpr(), CopyObject(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CIRGen::CIRGenFunction::emitCXXConstructExpr(), and clang::interp::Compiler< Emitter >::VisitCXXConstructExpr().

◆ isTypeDependent()

bool clang::Expr::isTypeDependent ( ) const
inline

Determines whether the type of this expression depends on.

  • a template parameter (C++ [temp.dep.expr], which means that its type could change from one template instantiation to the next)
  • or an error

For example, the expressions "x" and "x + y" are type-dependent in the following code, but "y" is not type-dependent:

template<typename T>
void add(T x, int y) {
x + y;
}

Definition at line 194 of file Expr.h.

References getDependence().

Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnDesignatedInitializer(), clang::Sema::ActOnEffectExpression(), clang::Sema::ActOnExplicitBoolSpecifier(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnIndirectGotoStmt(), clang::SemaOpenACC::ActOnIntExpr(), clang::Sema::ActOnNoexceptSpec(), clang::SemaObjC::ActOnObjCForCollectionStmt(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOMPIteratorExpr(), clang::SemaOpenMP::ActOnOpenMPAllocateClause(), clang::SemaOpenMP::ActOnOpenMPCriticalDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPDetachClause(), clang::SemaOpenMP::ActOnOpenMPDistScheduleClause(), clang::SemaOpenMP::ActOnOpenMPInitClause(), clang::SemaOpenMP::ActOnOpenMPLinearClause(), clang::SemaOpenMP::ActOnOpenMPScheduleClause(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::Sema::ActOnPragmaPack(), clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::ActOnStmtExprResult(), AnalyzeBitFieldAssignment(), AnalyzeImplicitConversions(), applyOMPAllocateAttribute(), clang::Sema::BuildArrayType(), clang::Sema::BuildBinOp(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildExpressionTrait(), clang::Sema::BuildExtVectorType(), clang::SemaObjC::BuildInstanceMessage(), clang::Sema::BuildMatrixType(), clang::Sema::BuildMemberReferenceExpr(), clang::SemaObjC::BuildObjCBoxedExpr(), clang::SemaObjC::BuildObjCBridgedCast(), clang::SemaObjC::BuildObjCSubscriptExpression(), clang::Sema::BuildPackIndexingType(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildStaticAssertDeclaration(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorType(), clang::SemaARM::BuiltinARMSpecialReg(), clang::Sema::BuiltinConstantArg(), clang::Sema::BuiltinConstantArgMultiple(), clang::Sema::BuiltinConstantArgPower2(), clang::Sema::BuiltinConstantArgRange(), clang::Sema::BuiltinConstantArgShiftedByte(), clang::Sema::BuiltinConstantArgShiftedByteOrXXFF(), BuiltinInvoke(), clang::Sema::BuiltinShuffleVector(), clang::canDynamicCastThrow(), clang::Sema::canThrow(), clang::Sema::CheckAddressOfOperand(), CheckAlignOfExpr(), clang::SemaARM::CheckARMCoprocessorImmediate(), CheckAsmLValue(), clang::SemaPseudoObject::checkAssignment(), checkAttrArgsAreCapabilityObjs(), clang::Sema::CheckBooleanCondition(), clang::SemaX86::CheckBuiltinGatherScatterScale(), clang::SemaX86::CheckBuiltinRoundingOrSAE(), clang::SemaX86::CheckBuiltinTileDuplicate(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckEnumConstant(), clang::Sema::checkExceptionSpecification(), checkFormatStringExpr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::SemaARM::CheckImmediateArg(), clang::Sema::CheckImplicitConversion(), clang::SemaPseudoObject::checkIncDec(), clang::SemaRISCV::CheckLMUL(), CheckObjCCollectionLiteralElement(), clang::SemaObjC::CheckObjCForCollectionOperand(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), checkSimdlenSafelenSpecified(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentPointerToMember(), clang::Sema::checkUInt32Argument(), clang::Sema::CheckVecStepExpr(), clang::computeDependence(), clang::Sema::ConstantFoldAttrArgs(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DiagnoseAssignmentEnum(), clang::Sema::DiagnoseEqualityWithExtraParens(), doRewriteToUTF8StringBoxedExpressionHelper(), EvaluateAsStringImpl(), findTemplateParameterInType(), getAllocatorKind(), clang::Sema::getDecltypeForExpr(), getDependentArraySubscriptType(), clang::ASTContext::getDependentSizedArrayType(), getPrivateItem(), clang::ASTContext::getTypeOfExprType(), clang::ArrayTypeTraitExpr::getValue(), handleSentinelAttr(), hasAnyTypeDependentArguments(), isBoundMemberFunction(), clang::ChooseExpr::isConditionDependent(), isNonNegativeIntegerValue(), isNullPointerConstant(), isNullPointerConstantForConversion(), isNullPointerValueTemplateArgument(), clang::ASTContext::isPromotableBitField(), isUnusedResultAWarning(), ObjCEnumerationCollection(), clang::OverloadExpr::OverloadExpr(), clang::Sema::PerformContextualImplicitConversion(), processImplicitMapsWithDefaultMappers(), clang::SemaCodeCompletion::ProduceCallSignatureHelp(), clang::TreeTransform< AdjustConstraintDepth >::RebuildCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), rewriteToNumericBoxedExpression(), sharedGetConstructorDestructorAttrExpr(), clang::Sema::tryExprAsCall(), clang::Sema::ValueIsRunOfOnes(), clang::Sema::VerifyBitField(), clang::SemaOpenMP::VerifyPositiveIntegerConstantInClause(), and clang::ASTNodeImporter::VisitUnresolvedLookupExpr().

◆ isUnusedResultAWarning()

bool Expr::isUnusedResultAWarning ( const Expr *& WarnE,
SourceLocation & Loc,
SourceRange & R1,
SourceRange & R2,
ASTContext & Ctx ) const

isUnusedResultAWarning - Return true if this immediate expression should be warned about if the result is unused.

If so, fill in expr, location, and ranges with expr to warn on and source locations/ranges appropriate for a warning.

If so, fill in Loc and Ranges with location to warn on and the source range[s] to report with the warning.

Definition at line 2626 of file Expr.cpp.

References clang::CompoundStmt::body_back(), clang::CompoundStmt::body_empty(), clang::cast(), Expr(), clang::CallExpr::getArg(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), clang::CallExpr::getCalleeDecl(), clang::CallExpr::getCallReturnType(), clang::ASTContext::getCanonicalType(), clang::CastExpr::getCastKind(), clang::Stmt::getEndLoc(), getExpr(), getExprLoc(), clang::ASTContext::getLangOpts(), clang::BinaryOperator::getLHS(), clang::CStyleCastExpr::getLParenLoc(), clang::ObjCMessageExpr::getMethodFamily(), clang::CallExpr::getNumArgs(), clang::BinaryOperator::getOpcode(), clang::UnaryOperator::getOpcode(), clang::CXXOperatorCallExpr::getOperator(), clang::BinaryOperator::getOperatorLoc(), clang::CXXOperatorCallExpr::getOperatorLoc(), clang::UnaryOperator::getOperatorLoc(), clang::BinaryOperator::getRHS(), clang::CXXOperatorCallExpr::getSourceRange(), clang::Stmt::getSourceRange(), clang::Stmt::getStmtClass(), clang::CastExpr::getSubExpr(), clang::UnaryOperator::getSubExpr(), getType(), clang::Decl::hasAttr(), clang::Type::hasAttr(), clang::CallExpr::hasUnusedResultAttr(), clang::ObjCMessageExpr::hasUnusedResultAttr(), IgnoreParens(), clang::isa(), clang::Type::isArrayType(), clang::BinaryOperator::isAssignmentOp(), clang::ObjCMessageExpr::isInstanceMessage(), isReadIfDiscardedInCPlusPlus11(), clang::Type::isReferenceType(), isTypeDependent(), isUnusedResultAWarning(), clang::Type::isVoidType(), clang::CanQual< T >::isVolatileQualified(), clang::QualType::isVolatileQualified(), clang::OMF_init, and clang::Result.

Referenced by isUnusedResultAWarning().

◆ isValueDependent()

bool clang::Expr::isValueDependent ( ) const
inline

Determines whether the value of this expression depends on.

  • a template parameter (C++ [temp.dep.constexpr])
  • or an error, whose resolution is unknown

For example, the array bound of "Chars" in the following example is value-dependent.

template<int Size, char (&Chars)[Size]> struct meta_string;

Definition at line 177 of file Expr.h.

References getDependence().

Referenced by clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnDesignatedInitializer(), clang::Sema::ActOnEffectExpression(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnNoexceptSpec(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPAllocateClause(), clang::SemaOpenMP::ActOnOpenMPCriticalDirective(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPDepobjClause(), clang::SemaOpenMP::ActOnOpenMPDetachClause(), clang::SemaOpenMP::ActOnOpenMPDeviceNum(), clang::SemaOpenMP::ActOnOpenMPDistScheduleClause(), clang::SemaOpenMP::ActOnOpenMPInitClause(), clang::SemaOpenMP::ActOnOpenMPLinearClause(), clang::SemaOpenMP::ActOnOpenMPScheduleClause(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAssumeAlignedAttr(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), applyOMPAllocateAttribute(), clang::Sema::BuildAddressSpaceAttr(), BuildAddressSpaceIndex(), clang::Sema::BuildArrayType(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCodeAlignAttr(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildMatrixType(), clang::Sema::BuildPackIndexingType(), clang::Sema::BuildStaticAssertDeclaration(), clang::Sema::BuildVectorType(), BuiltinAlignment(), clang::SemaARM::BuiltinARMSpecialReg(), clang::Sema::BuiltinConstantArg(), clang::Sema::BuiltinConstantArgMultiple(), clang::Sema::BuiltinConstantArgPower2(), clang::Sema::BuiltinConstantArgRange(), clang::Sema::BuiltinConstantArgShiftedByte(), clang::Sema::BuiltinConstantArgShiftedByteOrXXFF(), clang::Sema::BuiltinShuffleVector(), clang::canTypeidThrow(), clang::checkAMDGPUFlatWorkGroupSizeArguments(), clang::checkAMDGPUMaxNumWorkGroupsArguments(), clang::checkAMDGPUWavesPerEUArguments(), clang::SemaARM::CheckARMCoprocessorImmediate(), clang::SemaX86::CheckBuiltinGatherScatterScale(), clang::SemaX86::CheckBuiltinRoundingOrSAE(), clang::SemaX86::CheckBuiltinTileDuplicate(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckCXXBooleanCondition(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckForImmediateInvocation(), checkFormatStringExpr(), CheckICE(), clang::SemaARM::CheckImmediateArg(), clang::Sema::CheckImplicitConversion(), clang::SemaRISCV::CheckLMUL(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), CheckNonNullExpr(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), checkOpenMPLoop(), checkPointerAuthKey(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::ConstantFoldAttrArgs(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseIntInBoolContext(), clang::Sema::DiagnoseSentinelCalls(), diagnoseStringPlusInt(), Evaluate(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), EvaluateAsBooleanCondition(), EvaluateAsBooleanCondition(), EvaluateAsConstantExpr(), EvaluateAsFixedPoint(), EvaluateAsFixedPoint(), EvaluateAsFloat(), EvaluateAsInitializer(), EvaluateAsInt(), EvaluateAsInt(), EvaluateAsLValue(), EvaluateAsRValue(), EvaluateAsRValue(), EvaluateAsRValue(), EvaluateAsStringImpl(), EvaluateAtomic(), clang::CallExpr::evaluateBytesReturnedByAllocSizeCall(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), EvaluateDependentExpr(), EvaluateFixedPoint(), EvaluateFixedPointOrInteger(), EvaluateFloat(), EvaluateForOverflow(), EvaluateIgnoredValue(), EvaluateInPlace(), EvaluateInteger(), EvaluateIntegerOrLValue(), EvaluateKnownConstInt(), EvaluateKnownConstIntCheckOverflow(), EvaluateLValue(), EvaluateMemberPointer(), EvaluatePointer(), EvaluateRecord(), EvaluateStmt(), EvaluateSwitch(), EvaluateTemporary(), EvaluateVarDecl(), evaluateVarDeclInit(), EvaluateVoid(), EvaluateWithSubstitution(), clang::Sema::FinalizeVarWithDestructor(), getAllocatorKind(), clang::TypeTraitExpr::getAPValue(), clang::TypeTraitExpr::getBoolValue(), clang::ASTContext::getDependentSizedArrayType(), getIntegerConstantExpr(), clang::SizeOfPackExpr::getPackLength(), getPrivateItem(), clang::ConceptSpecializationExpr::getSatisfaction(), HandleAddressSpaceTypeAttribute(), handleLoopHintAttr(), handleWorkGroupSize(), clang::VarDecl::hasInitWithSideEffects(), instantiateDependentFunctionAttrCondition(), instantiateExplicitSpecifierDeferred(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::CallExpr::isBuiltinAssumeFalse(), clang::ChooseExpr::isConditionDependent(), isConstantInitializer(), isCXX11ConstantExpr(), isCXX98IntegralConstantExpr(), isEvaluatable(), isIntegerConstantExpr(), isNonNegativeIntegerValue(), isNullPointerConstant(), isNullPointerConstantForConversion(), isNullPointerValueTemplateArgument(), clang::SizeOfPackExpr::isPartiallySubstituted(), isPotentialConstantExprUnevaluated(), clang::ASTContext::isPromotableBitField(), isSafeArraySubscript(), clang::ConceptSpecializationExpr::isSatisfied(), clang::RequiresExpr::isSatisfied(), clang::FieldDecl::isZeroLengthBitField(), makeAttributeArgExpr(), makeLaunchBoundsArgExpr(), MustDelayAttributeArguments(), processImplicitMapsWithDefaultMappers(), clang::RequiresExpr::setSatisfied(), sharedGetConstructorDestructorAttrExpr(), templateArgumentExpressionsEqual(), clang::Sema::tryResolveExplicitSpecifier(), clang::Sema::ValueIsRunOfOnes(), clang::Sema::VerifyBitField(), clang::SemaOpenMP::VerifyPositiveIntegerConstantInClause(), clang::interp::Compiler< Emitter >::visitAttributedStmt(), clang::EvaluatedExprVisitorBase< Ptr, ImplClass >::VisitChooseExpr(), clang::ASTNodeImporter::VisitConceptSpecializationExpr(), clang::ASTNodeImporter::VisitCXXNoexceptExpr(), clang::interp::Compiler< Emitter >::visitDeclRef(), clang::interp::Compiler< Emitter >::VisitRequiresExpr(), clang::JSONNodeDumper::VisitRequiresExpr(), clang::TextNodeDumper::VisitRequiresExpr(), clang::ASTNodeImporter::VisitSizeOfPackExpr(), clang::ASTNodeImporter::VisitTypeTraitExpr(), and clang::TextNodeDumper::VisitVarDecl().

◆ isXValue()

bool clang::Expr::isXValue ( ) const
inline

◆ operator=() [1/2]

Expr & clang::Expr::operator= ( const Expr & )
delete

References Expr().

◆ operator=() [2/2]

Expr & clang::Expr::operator= ( Expr && )
delete

References Expr().

◆ refersToBitField()

bool clang::Expr::refersToBitField ( ) const
inline

◆ refersToGlobalRegisterVar()

bool Expr::refersToGlobalRegisterVar ( ) const

Returns whether this expression refers to a global register variable.

Definition at line 4284 of file Expr.cpp.

References Expr(), IgnoreParenImpCasts(), and clang::SC_Register.

Referenced by checkExprMemoryConstraintCompat().

◆ refersToMatrixElement()

bool clang::Expr::refersToMatrixElement ( ) const
inline

Returns whether this expression refers to a matrix element.

Definition at line 514 of file Expr.h.

References getObjectKind(), and clang::OK_MatrixComponent.

Referenced by isNonReferenceableGLValue().

◆ refersToVectorElement()

bool Expr::refersToVectorElement ( ) const

Returns whether this expression refers to a vector element.

Definition at line 4259 of file Expr.cpp.

References Expr(), IgnoreParens(), clang::isa(), and refersToVectorElement().

Referenced by checkExprMemoryConstraintCompat(), clang::Sema::CXXCheckConditionalOperands(), isNonReferenceableGLValue(), and refersToVectorElement().

◆ setDependence()

void clang::Expr::setDependence ( ExprDependence Deps)
inlineprotected

Each concrete expr subclass is expected to compute its dependence and call this in the constructor.

Definition at line 137 of file Expr.h.

References clang::Stmt::ExprBits.

Referenced by clang::AddrLabelExpr::AddrLabelExpr(), clang::ArrayInitIndexExpr::ArrayInitIndexExpr(), clang::ArrayInitLoopExpr::ArrayInitLoopExpr(), clang::ArraySectionExpr::ArraySectionExpr(), clang::ArraySectionExpr::ArraySectionExpr(), clang::ArraySubscriptExpr::ArraySubscriptExpr(), clang::ArrayTypeTraitExpr::ArrayTypeTraitExpr(), clang::AsTypeExpr::AsTypeExpr(), clang::AtomicExpr::AtomicExpr(), clang::BinaryConditionalOperator::BinaryConditionalOperator(), clang::BinaryOperator::BinaryOperator(), clang::BinaryOperator::BinaryOperator(), clang::BlockExpr::BlockExpr(), clang::CharacterLiteral::CharacterLiteral(), clang::ChooseExpr::ChooseExpr(), clang::CompoundLiteralExpr::CompoundLiteralExpr(), clang::CallExpr::computeDependence(), clang::ConditionalOperator::ConditionalOperator(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::CXXBoolLiteralExpr::CXXBoolLiteralExpr(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXDeleteExpr::CXXDeleteExpr(), clang::CXXFoldExpr::CXXFoldExpr(), clang::CXXInheritedCtorInitExpr::CXXInheritedCtorInitExpr(), clang::CXXNoexceptExpr::CXXNoexceptExpr(), clang::CXXNullPtrLiteralExpr::CXXNullPtrLiteralExpr(), clang::CXXPseudoDestructorExpr::CXXPseudoDestructorExpr(), clang::CXXRewrittenBinaryOperator::CXXRewrittenBinaryOperator(), clang::CXXScalarValueInitExpr::CXXScalarValueInitExpr(), clang::CXXStdInitializerListExpr::CXXStdInitializerListExpr(), clang::CXXThrowExpr::CXXThrowExpr(), clang::CXXTypeidExpr::CXXTypeidExpr(), clang::CXXTypeidExpr::CXXTypeidExpr(), clang::CXXUuidofExpr::CXXUuidofExpr(), clang::CXXUuidofExpr::CXXUuidofExpr(), clang::DeclRefExpr::DeclRefExpr(), clang::DependentCoawaitExpr::DependentCoawaitExpr(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), clang::EmbedExpr::EmbedExpr(), clang::ExplicitCastExpr::ExplicitCastExpr(), clang::ExpressionTraitExpr::ExpressionTraitExpr(), clang::ExtVectorElementExpr::ExtVectorElementExpr(), clang::FixedPointLiteral::FixedPointLiteral(), clang::FullExpr::FullExpr(), clang::GNUNullExpr::GNUNullExpr(), clang::ImaginaryLiteral::ImaginaryLiteral(), clang::ImplicitValueInitExpr::ImplicitValueInitExpr(), clang::InitListExpr::InitListExpr(), clang::IntegerLiteral::IntegerLiteral(), clang::CallExpr::markDependentForPostponedNameLookup(), clang::InitListExpr::markError(), clang::MaterializeTemporaryExpr::MaterializeTemporaryExpr(), clang::MatrixSubscriptExpr::MatrixSubscriptExpr(), clang::MSPropertyRefExpr::MSPropertyRefExpr(), clang::MSPropertySubscriptExpr::MSPropertySubscriptExpr(), clang::NoInitExpr::NoInitExpr(), clang::ObjCAvailabilityCheckExpr::ObjCAvailabilityCheckExpr(), clang::ObjCBoolLiteralExpr::ObjCBoolLiteralExpr(), clang::ObjCBoxedExpr::ObjCBoxedExpr(), clang::ObjCEncodeExpr::ObjCEncodeExpr(), clang::ObjCIndirectCopyRestoreExpr::ObjCIndirectCopyRestoreExpr(), clang::ObjCIsaExpr::ObjCIsaExpr(), clang::ObjCIvarRefExpr::ObjCIvarRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), clang::ObjCProtocolExpr::ObjCProtocolExpr(), clang::ObjCSelectorExpr::ObjCSelectorExpr(), clang::ObjCStringLiteral::ObjCStringLiteral(), clang::ObjCSubscriptRefExpr::ObjCSubscriptRefExpr(), clang::OpaqueValueExpr::OpaqueValueExpr(), clang::OverloadExpr::OverloadExpr(), clang::PackExpansionExpr::PackExpansionExpr(), clang::ParenExpr::ParenExpr(), clang::CXXThisExpr::setCapturedByCopyInLambdaWithExplicitObjectParameter(), clang::DeclRefExpr::setCapturedByCopyInLambdaWithExplicitObjectParameter(), clang::DeclRefExpr::setDecl(), clang::InitListExpr::setInit(), clang::MemberExpr::setMemberDecl(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), clang::SourceLocExpr::SourceLocExpr(), clang::StmtExpr::StmtExpr(), clang::SubstNonTypeTemplateParmExpr::SubstNonTypeTemplateParmExpr(), clang::SubstNonTypeTemplateParmPackExpr::SubstNonTypeTemplateParmPackExpr(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::UnaryOperator::UnaryOperator(), clang::CXXParenListInitExpr::updateDependence(), and clang::VAArgExpr::VAArgExpr().

◆ setObjectKind()

void clang::Expr::setObjectKind ( ExprObjectKind Cat)
inline

setObjectKind - Set the object kind produced by this expression.

Definition at line 464 of file Expr.h.

References clang::Stmt::ExprBits.

Referenced by clang::Sema::BuildDeclRefExpr(), and BuiltinCallWithStaticChain().

◆ setType()

void clang::Expr::setType ( QualType t)
inline

Definition at line 145 of file Expr.h.

References clang::QualType::isNull(), and clang::Type::isReferenceType().

Referenced by clang::Sema::BuildDeclRefExpr(), BuildExpressionFromNonTypeTemplateArgumentValue(), clang::Sema::BuildInitList(), clang::Sema::BuildMemberExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildTemplateIdExpr(), clang::Sema::BuildVectorLiteral(), BuiltinAddressof(), BuiltinAlignment(), builtinAllocaAddrSpace(), BuiltinAnnotation(), clang::SemaARM::BuiltinARMMemoryTaggingCall(), BuiltinCallWithStaticChain(), clang::Sema::BuiltinElementwiseTernaryMath(), BuiltinIsWithinLifetime(), BuiltinLaunder(), BuiltinMaskedGather(), BuiltinMaskedLoad(), BuiltinMaskedScatter(), BuiltinMaskedStore(), clang::SemaPPC::BuiltinPPCMMACall(), BuiltinPreserveAI(), BuiltinTriviallyRelocate(), clang::Sema::BuiltinVectorToScalarMath(), clang::SemaPPC::BuiltinVSX(), clang::SemaWasm::BuiltinWasmRefNullExtern(), clang::SemaWasm::BuiltinWasmRefNullFunc(), clang::SemaWasm::BuiltinWasmTableGet(), clang::SemaWasm::BuiltinWasmTestFunctionPointerSignature(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), CheckBoolSelect(), clang::SemaBPF::CheckBPFBuiltinFunctionCall(), clang::SemaHLSL::CheckBuiltinFunctionCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), CheckVectorSelect(), clang::Sema::completeExprArrayBound(), clang::SemaOpenACC::CreateFirstPrivateInitRecipe(), CreateFunctionRefExpr(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), Expr(), clang::OverloadExpr::OverloadExpr(), clang::InitializationSequence::Perform(), clang::Sema::PrepareBuiltinElementwiseMathOneArgCall(), clang::DeclRefExpr::setDecl(), SetElementTypeAsReturnType(), clang::MemberExpr::setMemberDecl(), TryListConversion(), updateStringLiteralType(), and clang::ASTNodeImporter::VisitInitListExpr().

◆ setValueKind()

void clang::Expr::setValueKind ( ExprValueKind Cat)
inline

◆ skipRValueSubobjectAdjustments() [1/2]

const Expr * clang::Expr::skipRValueSubobjectAdjustments ( ) const
inline

Definition at line 1020 of file Expr.h.

References Expr(), and skipRValueSubobjectAdjustments().

Referenced by skipRValueSubobjectAdjustments().

◆ skipRValueSubobjectAdjustments() [2/2]

const Expr * Expr::skipRValueSubobjectAdjustments ( SmallVectorImpl< const Expr * > & CommaLHS,
SmallVectorImpl< SubobjectAdjustment > & Adjustments ) const

Walk outwards from an expression we want to bind a reference to and find the expression whose lifetime needs to be extended.

Record the LHSs of comma expressions and adjustments needed along the path.

Definition at line 80 of file Expr.cpp.

References clang::Type::castAsCXXRecordDecl(), Expr(), clang::Type::getAs(), getType(), IgnoreParens(), and clang::Type::isRecordType().

Referenced by clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CIRGen::CIRGenFunction::emitMaterializeTemporaryExpr(), clang::APValue::LValueBase::getType(), and clang::interp::Compiler< Emitter >::VisitMaterializeTemporaryExpr().

◆ tryEvaluateObjectSize()

bool Expr::tryEvaluateObjectSize ( uint64_t & Result,
ASTContext & Ctx,
unsigned Type ) const

If the current Expr is a pointer, this will try to statically determine the number of bytes available where the pointer is pointing.

Returns true if all of the above holds and we were able to figure out the size, false otherwise.

Parameters
Type- How to evaluate the size of the Expr, as defined by the "type" parameter of __builtin_object_size

Definition at line 18778 of file ExprConstant.cpp.

References clang::ConstantFold, getType(), clang::Result, and tryEvaluateBuiltinObjectSize().

◆ tryEvaluateString()

std::optional< std::string > Expr::tryEvaluateString ( ASTContext & Ctx) const

If the current Expr can be evaluated to a pointer to a null-terminated constant string, return the constant string (without the terminating null).

Definition at line 18840 of file ExprConstant.cpp.

References clang::ConstantFold, EvaluateBuiltinStrLen(), and clang::Result.

Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().

◆ tryEvaluateStrLen()

bool Expr::tryEvaluateStrLen ( uint64_t & Result,
ASTContext & Ctx ) const

If the current Expr is a pointer, this will try to statically determine the strlen of the string pointed to.

Returns true if all of the above holds and we were able to figure out the strlen, false otherwise.

Definition at line 18923 of file ExprConstant.cpp.

References clang::ConstantFold, EvaluateBuiltinStrLen(), clang::interp::Context::evaluateStrlen(), clang::ASTContext::getInterpContext(), and clang::Result.

◆ ASTImporter

friend class ASTImporter
friend

Definition at line 140 of file Expr.h.

References ASTImporter.

Referenced by ASTImporter.

◆ ASTStmtReader

friend class ASTStmtReader
friend

Definition at line 141 of file Expr.h.

References ASTStmtReader.

Referenced by ASTStmtReader.


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