clang
10.0.0svn
|
This represents one expression. More...
#include "clang/AST/Expr.h"
Inherits clang::ValueStmt.
Inherited by clang::AbstractConditionalOperator, clang::AddrLabelExpr, clang::ArrayInitIndexExpr, clang::ArrayInitLoopExpr, clang::ArraySubscriptExpr, clang::ArrayTypeTraitExpr, clang::AsTypeExpr, clang::AtomicExpr, clang::BinaryOperator, clang::BlockExpr, clang::CallExpr, clang::CastExpr, clang::CharacterLiteral, clang::ChooseExpr, clang::CompoundLiteralExpr, clang::ConceptSpecializationExpr, clang::ConvertVectorExpr, clang::CoroutineSuspendExpr, 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::CXXPseudoDestructorExpr, clang::CXXRewrittenBinaryOperator, clang::CXXScalarValueInitExpr, clang::CXXStdInitializerListExpr, clang::CXXThisExpr, clang::CXXThrowExpr, clang::CXXTypeidExpr, clang::CXXUnresolvedConstructExpr, clang::CXXUuidofExpr, clang::DeclRefExpr, clang::DependentCoawaitExpr, clang::DependentScopeDeclRefExpr, clang::DesignatedInitExpr, clang::DesignatedInitUpdateExpr, clang::ExpressionTraitExpr, clang::ExtVectorElementExpr, clang::FixedPointLiteral, clang::FloatingLiteral, clang::FullExpr, clang::FunctionParmPackExpr, clang::GenericSelectionExpr, clang::GNUNullExpr, clang::ImaginaryLiteral, clang::ImplicitValueInitExpr, clang::InitListExpr, clang::IntegerLiteral, clang::LambdaExpr, clang::MaterializeTemporaryExpr, clang::MemberExpr, clang::MSPropertyRefExpr, clang::MSPropertySubscriptExpr, clang::NoInitExpr, 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::OMPArraySectionExpr, clang::OpaqueValueExpr, clang::OverloadExpr, clang::PackExpansionExpr, clang::ParenExpr, clang::ParenListExpr, clang::PredefinedExpr, clang::PseudoObjectExpr, clang::ShuffleVectorExpr, clang::SizeOfPackExpr, clang::SourceLocExpr, clang::StmtExpr, clang::StringLiteral, clang::SubstNonTypeTemplateParmExpr, clang::SubstNonTypeTemplateParmPackExpr, clang::TypeTraitExpr, clang::TypoExpr, 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 Member Functions | |
Expr ()=delete | |
Expr (const Expr &)=delete | |
Expr (Expr &&)=delete | |
Expr & | operator= (const Expr &)=delete |
Expr & | operator= (Expr &&)=delete |
QualType | getType () const |
void | setType (QualType t) |
bool | isValueDependent () const |
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]). More... | |
void | setValueDependent (bool VD) |
Set whether this expression is value-dependent or not. More... | |
bool | isTypeDependent () const |
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next. More... | |
void | setTypeDependent (bool TD) |
Set whether this expression is type-dependent or not. More... | |
bool | isInstantiationDependent () const |
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. More... | |
void | setInstantiationDependent (bool ID) |
Set whether this expression is instantiation-dependent or not. More... | |
bool | containsUnexpandedParameterPack () const |
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates). More... | |
void | setContainsUnexpandedParameterPack (bool PP=true) |
Set the bit that describes whether this expression contains an unexpanded parameter pack. More... | |
SourceLocation | getExprLoc () const LLVM_READONLY |
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression. More... | |
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. More... | |
bool | isLValue () const |
isLValue - True if this expression is an "l-value" according to the rules of the current language. More... | |
bool | isRValue () const |
bool | isXValue () const |
bool | isGLValue () const |
LValueClassification | ClassifyLValue (ASTContext &Ctx) const |
Reasons why an expression might not be an l-value. More... | |
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. More... | |
Classification | Classify (ASTContext &Ctx) const |
Classify - Classify this expression according to the C++11 expression taxonomy. More... | |
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. More... | |
ExprValueKind | getValueKind () const |
getValueKind - The value kind that this expression produces. More... | |
ExprObjectKind | getObjectKind () const |
getObjectKind - The object kind that this expression produces. More... | |
bool | isOrdinaryOrBitFieldObject () const |
void | setValueKind (ExprValueKind Cat) |
setValueKind - Set the value kind produced by this expression. More... | |
void | setObjectKind (ExprObjectKind Cat) |
setObjectKind - Set the object kind produced by this expression. More... | |
bool | refersToBitField () const |
Returns true if this expression is a gl-value that potentially refers to a bit-field. More... | |
FieldDecl * | getSourceBitField () |
If this expression refers to a bit-field, retrieve the declaration of that bit-field. More... | |
const FieldDecl * | getSourceBitField () const |
Decl * | getReferencedDeclOfCallee () |
const Decl * | getReferencedDeclOfCallee () const |
const ObjCPropertyRefExpr * | getObjCProperty () const |
If this expression is an l-value for an Objective C property, find the underlying property reference expression. More... | |
bool | isObjCSelfExpr () const |
Check if this expression is the ObjC 'self' implicit parameter. More... | |
bool | refersToVectorElement () const |
Returns whether this expression refers to a vector element. More... | |
bool | refersToGlobalRegisterVar () const |
Returns whether this expression refers to a global register variable. More... | |
bool | hasPlaceholderType () const |
Returns whether this expression has a placeholder type. More... | |
bool | hasPlaceholderType (BuiltinType::Kind K) const |
Returns whether this expression has a specific placeholder type. More... | |
bool | isKnownToHaveBooleanValue () const |
isKnownToHaveBooleanValue - Return true if this is an integer expression that is known to return 0 or 1. More... | |
bool | isIntegerConstantExpr (llvm::APSInt &Result, const ASTContext &Ctx, SourceLocation *Loc=nullptr, bool isEvaluated=true) const |
isIntegerConstantExpr - Return true if this expression is a valid integer constant expression, and, if so, return its value in Result. More... | |
bool | isIntegerConstantExpr (const ASTContext &Ctx, SourceLocation *Loc=nullptr) const |
bool | isCXX98IntegralConstantExpr (const ASTContext &Ctx) const |
isCXX98IntegralConstantExpr - Return true if this expression is an integral constant expression in C++98. More... | |
bool | isCXX11ConstantExpr (const ASTContext &Ctx, APValue *Result=nullptr, SourceLocation *Loc=nullptr) const |
isCXX11ConstantExpr - Return true if this expression is a constant expression in C++11. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | EvaluateAsFixedPoint (EvalResult &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 fixed point value. More... | |
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. More... | |
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. More... | |
bool | hasNonTrivialCall (const ASTContext &Ctx) const |
Determine whether this expression involves a call to any function that is not trivial. More... | |
llvm::APSInt | EvaluateKnownConstInt (const ASTContext &Ctx, SmallVectorImpl< PartialDiagnosticAt > *Diag=nullptr) const |
EvaluateKnownConstInt - Call EvaluateAsRValue and return the folded integer. More... | |
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. More... | |
bool | EvaluateAsInitializer (APValue &Result, const ASTContext &Ctx, const VarDecl *VD, SmallVectorImpl< PartialDiagnosticAt > &Notes) const |
EvaluateAsInitializer - Evaluate an expression as if it were the initializer of the given declaration. More... | |
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. More... | |
bool | EvaluateAsConstantExpr (EvalResult &Result, ConstExprUsage Usage, const ASTContext &Ctx) const |
Evaluate an expression that is required to be a constant expression. More... | |
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. More... | |
NullPointerConstantKind | isNullPointerConstant (ASTContext &Ctx, NullPointerConstantValueDependence NPC) const |
isNullPointerConstant - C99 6.3.2.3p3 - Test if this reduces down to a Null pointer constant. More... | |
bool | isOBJCGCCandidate (ASTContext &Ctx) const |
isOBJCGCCandidate - Return true if this expression may be used in a read/ write barrier. More... | |
bool | isBoundMemberFunction (ASTContext &Ctx) const |
Returns true if this expression is a bound member function. More... | |
Expr * | IgnoreImpCasts () LLVM_READONLY |
Skip past any implicit casts which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreImpCasts () const |
Expr * | IgnoreCasts () LLVM_READONLY |
Skip past any casts which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreCasts () const |
Expr * | IgnoreImplicit () LLVM_READONLY |
Skip past any implicit AST nodes which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreImplicit () const |
Expr * | IgnoreParens () LLVM_READONLY |
Skip past any parentheses which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreParens () const |
Expr * | IgnoreParenImpCasts () LLVM_READONLY |
Skip past any parentheses and implicit casts which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreParenImpCasts () const |
Expr * | IgnoreParenCasts () LLVM_READONLY |
Skip past any parentheses and casts which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreParenCasts () const |
Expr * | IgnoreConversionOperator () LLVM_READONLY |
Skip conversion operators. More... | |
const Expr * | IgnoreConversionOperator () const |
Expr * | IgnoreParenLValueCasts () LLVM_READONLY |
Skip past any parentheses and lvalue casts which might surround this expression until reaching a fixed point. More... | |
const Expr * | IgnoreParenLValueCasts () const |
Expr * | IgnoreParenNoopCasts (const ASTContext &Ctx) LLVM_READONLY |
Skip past any parenthese and casts which do not change the value (including ptr->int casts of the same size) until reaching a fixed point. More... | |
const Expr * | IgnoreParenNoopCasts (const ASTContext &Ctx) const |
Expr * | ignoreParenBaseCasts () LLVM_READONLY |
Skip past any parentheses and derived-to-base casts until reaching a fixed point. More... | |
const Expr * | ignoreParenBaseCasts () const |
bool | isDefaultArgument () const |
Determine whether this expression is a default function argument. More... | |
bool | isTemporaryObject (ASTContext &Ctx, const CXXRecordDecl *TempTy) const |
Determine whether the result of this expression is a temporary object of the given class type. More... | |
bool | isImplicitCXXThis () const |
Whether this expression is an implicit reference to 'this' in C++. More... | |
const CXXRecordDecl * | 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. More... | |
const Expr * | getBestDynamicClassTypeExpr () const |
Get the inner expression that determines the best dynamic class. More... | |
const 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. More... | |
const Expr * | skipRValueSubobjectAdjustments () const |
![]() | |
const Expr * | getExprStmt () const |
Expr * | getExprStmt () |
![]() | |
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 | |
Stmt & | operator= (const Stmt &)=delete |
Stmt & | operator= (Stmt &&)=delete |
Stmt (StmtClass SC) | |
StmtClass | getStmtClass () const |
const char * | getStmtClassName () const |
bool | isOMPStructuredBlock () const |
void | setIsOMPStructuredBlock (bool IsOMPStructuredBlock) |
SourceRange | getSourceRange () const LLVM_READONLY |
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. More... | |
SourceLocation | getBeginLoc () const LLVM_READONLY |
SourceLocation | getEndLoc () const LLVM_READONLY |
void | dump () const |
Dumps the specified AST fragment and all subtrees to llvm::errs() . More... | |
void | dump (SourceManager &SM) const |
void | dump (raw_ostream &OS, SourceManager &SM) const |
void | dump (raw_ostream &OS) const |
int64_t | getID (const ASTContext &Context) const |
void | dumpColor () const |
dumpColor - same as dump(), but forces color highlighting. More... | |
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. More... | |
void | printPretty (raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, StringRef NewlineSymbol="\, const ASTContext *Context=nullptr) const |
void | printJson (raw_ostream &Out, PrinterHelper *Helper, const PrintingPolicy &Policy, bool AddQuotes) const |
Pretty-prints in JSON format. More... | |
void | viewAST () const |
viewAST - Visualize an AST rooted at this Stmt* using GraphViz. More... | |
Stmt * | IgnoreContainers (bool IgnoreCaptured=false) |
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top, if IgnoreCaptured is true. More... | |
const Stmt * | IgnoreContainers (bool IgnoreCaptured=false) const |
const Stmt * | stripLabelLikeStatements () const |
Strip off all label-like statements. More... | |
Stmt * | stripLabelLikeStatements () |
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) const |
Produce a unique representation of the given statement. More... | |
void | ProcessODRHash (llvm::FoldingSetNodeID &ID, ODRHash &Hash) const |
Calculate a unique representation for a statement that is stable across compiler invocations. More... | |
Static Public Member Functions | |
static ExprValueKind | getValueKindForType (QualType T) |
getValueKindForType - Given a formal return or parameter type, give its value kind. More... | |
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. More... | |
static bool | isPotentialConstantExprUnevaluated (Expr *E, const FunctionDecl *FD, SmallVectorImpl< PartialDiagnosticAt > &Diags) |
isPotentialConstantExprUnevaluted - 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. More... | |
static QualType | findBoundMemberType (const Expr *expr) |
Given an expression of bound-member type, find the type of the member. More... | |
static bool | hasAnyTypeDependentArguments (ArrayRef< Expr *> Exprs) |
hasAnyTypeDependentArguments - Determines if any of the expressions in Exprs is type-dependent. More... | |
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. More... | |
static bool | classof (const Stmt *T) |
![]() | |
static bool | classof (const Stmt *T) |
![]() | |
static void | addStmtClass (const StmtClass s) |
static void | EnableStatistics () |
static void | PrintStats () |
Protected Member Functions | |
Expr (StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack) | |
Expr (StmtClass SC, EmptyShell) | |
Construct an empty expression. More... | |
![]() | |
void * | operator new (size_t bytes) noexcept |
void | operator delete (void *data) noexcept |
Stmt (StmtClass SC, EmptyShell) | |
Construct an empty statement. More... | |
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.
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. |
Enumeration used to describe how isNullPointerConstant()
should cope with value-dependent expressions.
|
delete |
Referenced by clang::PseudoObjectExpr::Create(), clang::ObjCArrayLiteral::CreateEmpty(), clang::OffsetOfExpr::CreateEmpty(), clang::DeclRefExpr::DeclRefExpr(), clang::SubstNonTypeTemplateParmPackExpr::getArgumentPack(), clang::CXXScalarValueInitExpr::getBeginLoc(), clang::DeclRefExpr::getEndLoc(), clang::DesignatedInitUpdateExpr::getEndLoc(), clang::DesignatedInitExpr::Designator::getFieldName(), clang::ObjCPropertyRefExpr::getReceiverType(), clang::UserDefinedLiteral::getUDSuffix(), clang::FloatingLiteral::getValueAsApproximateDouble(), clang::OverloadExpr::OverloadExpr(), clang::ShuffleVectorExpr::setExprs(), clang::MaterializeTemporaryExpr::setExtendingDecl(), and clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr().
|
delete |
|
delete |
|
inlineprotected |
|
inlineexplicitprotected |
|
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:
Definition at line 386 of file Expr.h.
Referenced by clang::canTypeidThrow(), ClassifyLValue(), isTemporaryObject(), clang::Sema::PerformObjectArgumentInitialization(), TryReferenceInit(), and TryReferenceInitializationCore().
Expr::LValueClassification Expr::ClassifyLValue | ( | ASTContext & | Ctx | ) | const |
Reasons why an expression might not be an l-value.
Definition at line 658 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, Classify(), clang::Expr::Classification::getKind(), LV_ArrayTemporary, LV_ClassTemporary, LV_DuplicateVectorComponents, LV_IncompleteVoidType, LV_InvalidExpression, LV_InvalidMessageExpression, LV_MemberFunction, LV_NotObjectType, LV_SubObjCPropertySetting, and LV_Valid.
Referenced by isBoundMemberFunction().
|
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).
Loc | A source location that might be filled with a relevant location if the expression is not modifiable. |
Definition at line 398 of file Expr.h.
Referenced by isModifiableLvalue().
Definition at line 914 of file Expr.h.
References clang::Stmt::getStmtClass().
|
inline |
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates).
Given the following function template:
The expressions args
and static_cast<Types&&>(args)
both contain parameter packs.
Definition at line 223 of file Expr.h.
Referenced by clang::Sema::ActOnCXXFoldExpr(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPDeclareVariantDirective(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPFinalClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::AtomicExpr::AtomicExpr(), checkMappableExpressionList(), clang::Sema::CheckPackExpansion(), checkSimdlenSafelenSpecified(), clang::Sema::containsUnexpandedParameterPacks(), clang::PseudoObjectExpr::Create(), clang::OffsetOfExpr::CreateEmpty(), clang::CallExpr::CreateEmpty(), clang::CXXConstructExpr::CXXConstructExpr(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::CXXScalarValueInitExpr::getBeginLoc(), clang::CXXUnresolvedConstructExpr::getBeginLoc(), clang::DesignatedInitUpdateExpr::getEndLoc(), clang::DesignatedInitExpr::Designator::getFieldName(), getPrivateItem(), clang::ObjCPropertyRefExpr::getReceiverType(), hasOnlyNonStaticMemberFunctions(), clang::InitListExpr::InitListExpr(), clang::DependentSizedArrayType::Profile(), clang::DependentSizedExtVectorType::Profile(), clang::DependentVectorType::Profile(), clang::InitListExpr::setInit(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), clang::TemplateParameterList::TemplateParameterList(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), and clang::ASTNodeImporter::VisitLambdaExpr().
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 13500 of file ExprConstant.cpp.
References EvaluateAsRValue(), and HandleConversionToBool().
Referenced by checkFormatStringExpr(), CheckNonNullExpr(), emitNumThreadsForTargetDirective(), EvaluatesAsFalse(), EvaluatesAsTrue(), FindTypeTagExpr(), getNumThreads(), and clang::CallExpr::isBuiltinAssumeFalse().
bool Expr::EvaluateAsConstantExpr | ( | EvalResult & | Result, |
ConstExprUsage | Usage, | ||
const ASTContext & | Ctx | ||
) | const |
Evaluate an expression that is required to be a constant expression.
Definition at line 13568 of file ExprConstant.cpp.
References CheckConstantExpression(), CheckMemoryLeaks(), and Evaluate().
bool Expr::EvaluateAsFixedPoint | ( | EvalResult & | 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 fixed point value.
Definition at line 13519 of file ExprConstant.cpp.
References EvaluateAsFixedPoint().
Referenced by CheckImplicitConversion().
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 13529 of file ExprConstant.cpp.
References EvaluateAsRValue(), and hasUnacceptableSideEffect().
Referenced by DiagnoseFloatingImpCast().
bool Expr::EvaluateAsInitializer | ( | APValue & | Result, |
const ASTContext & | Ctx, | ||
const VarDecl * | VD, | ||
SmallVectorImpl< PartialDiagnosticAt > & | Notes | ||
) | 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 13588 of file ExprConstant.cpp.
References clang::interp::Bail, CheckConstantExpression(), CheckMemoryLeaks(), clang::Expr::EvalStatus::Diag, EvaluateInPlace(), clang::interp::Fail, clang::ASTContext::getLangOpts(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::Expr::EvalStatus::HasSideEffects, clang::VarDecl::isConstexpr(), isRecordType(), clang::Type::isReferenceType(), and clang::interp::Success.
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 13509 of file ExprConstant.cpp.
References EvaluateAsInt().
Referenced by AddVariableConstraints(), AnalyzeBitFieldAssignment(), checkArrayExpressionDoesNotReferToUnitySize(), checkArrayExpressionDoesNotReferToWholeSize(), checkFormatStringExpr(), CheckImplicitConversion(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), DiagnoseIntInBoolContext(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), getBytesReturnedByAllocSizeCall(), clang::ento::SValBuilder::getConstantVal(), and isConstantInitializer().
bool Expr::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.
Definition at line 13548 of file ExprConstant.cpp.
References CheckLValueConstantExpression(), EvaluateForCodeGen, EvaluateLValue(), and clang::ASTContext::getLValueReferenceType().
Referenced by isConstantInitializer(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
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 the expression is a glvalue, an lvalue-to-rvalue conversion will be applied.
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.
Definition at line 13491 of file ExprConstant.cpp.
References EvaluateAsRValue().
Referenced by AddVariableConstraints(), CheckImplicitConversion(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::Sema::FillInlineAsmIdentifierInfo(), GetExprRange(), isNullPointerValueTemplateArgument(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
void Expr::EvaluateForOverflow | ( | const ASTContext & | Ctx | ) | const |
Definition at line 13741 of file ExprConstant.cpp.
References EvaluateAsRValue(), and FastEvaluateAsRValue().
APSInt Expr::EvaluateKnownConstInt | ( | const ASTContext & | Ctx, |
SmallVectorImpl< PartialDiagnosticAt > * | Diag = nullptr |
||
) | const |
EvaluateKnownConstInt - Call EvaluateAsRValue and return the folded integer.
This must be called on an expression that constant folds to an integer.
Definition at line 13704 of file ExprConstant.cpp.
References Diag(), and EvaluateAsRValue().
Referenced by clang::Sema::ActOnOpenMPCriticalDirective(), CheckICE(), clang::CodeGen::emitDeclareSimdFunction(), EvaluateSwitch(), greaterCtxScore(), isNullPointerConstant(), IsStandardConversion(), IsZeroInitializer(), clang::ento::ExprEngine::processSwitch(), shouldAddCase(), tryEvaluateBuiltinObjectSize(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().
APSInt Expr::EvaluateKnownConstIntCheckOverflow | ( | const ASTContext & | Ctx, |
SmallVectorImpl< PartialDiagnosticAt > * | Diag = nullptr |
||
) | const |
Definition at line 13722 of file ExprConstant.cpp.
References Diag(), and EvaluateAsRValue().
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 14317 of file ExprConstant.cpp.
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 2782 of file Expr.cpp.
References clang::Type::castAs(), hasPlaceholderType(), IgnoreParens(), clang::Type::isFunctionType(), and clang::ast_matchers::type.
Referenced by clang::CallExpr::getCallReturnType().
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 62 of file Expr.cpp.
References clang::Type::castAs(), clang::Type::getAs(), getBestDynamicClassTypeExpr(), clang::RecordType::getDecl(), clang::Type::getPointeeType(), getType(), and clang::Type::isDependentType().
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), and clang::CXXMethodDecl::getDevirtualizedMethod().
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 37 of file Expr.cpp.
References ignoreParenBaseCasts().
Referenced by getBestDynamicClassType(), and clang::CXXMethodDecl::getDevirtualizedMethod().
SourceLocation Expr::getExprLoc | ( | ) | const |
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.
Definition at line 221 of file Expr.cpp.
References clang::Stmt::getStmtClass(), and clang::Stmt::NoStmtClass.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::ActOnDoStmt(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnOpenMPAllocatorClause(), clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartLinkageSpecification(), clang::Sema::AddOverloadedCallCandidates(), AddVariableConstraints(), AnalyzeBitFieldAssignment(), AnalyzeImplicitConversions(), clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), buildCapture(), buildCaptureDecl(), clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::BuildOverloadedCallExpr(), buildPostUpdate(), BuildRecoveryCallExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVectorLiteral(), clang::interp::State::CCEDiag(), checkAllocateClauses(), checkBlockType(), CheckConvertedConstantExpression(), clang::Sema::CheckCXXThrowOperand(), CheckedIntArithmetic(), CheckFoldOperand(), CheckForReference(), CheckIdentityFieldAssignment(), CheckImplicitConversion(), checkIndirectCopyRestoreSource(), CheckKeyForObjCARCConversion(), clang::Sema::CheckLoopHintExpr(), clang::Sema::CheckLValueToRValueConversionOperand(), checkMapClauseExpressionBase(), checkMapConflicts(), checkMappableExpressionList(), CheckMemaccessSize(), clang::Sema::CheckObjCConversion(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSubscriptingKind(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::completeExprArrayBound(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DiagnoseAlwaysNonNullPointer(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), DiagnoseIntInBoolContext(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), diagnoseNoViableConversion(), DiagnoseNullConversion(), diagnoseObjCARCConversion(), diagnoseRetainCycle(), diagReturnOnAllocFailure(), clang::CodeGen::ConstantEmitter::emitAbstract(), clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::emitDeclareSimdFunction(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), EmitNontemporalLoad(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::CodeGen::CodeGenFunction::emitScalarConstant(), clang::CodeGen::CodeGenFunction::EmitScalarInit(), EmitTypeidFromVTable(), EvaluateAsRValue(), EvaluateAtomic(), EvaluateComparisonBinaryOperator(), EvaluateCPlusPlus11IntegralConstantExpr(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::interp::State::FFDiag(), findSubobject(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(), clang::OMPArraySectionExpr::getExprLoc(), clang::CXXMemberCallExpr::getExprLoc(), clang::OpaqueValueExpr::getExprLoc(), getStaticBooleanValue(), GetTypeOfFunction(), HandleConstructorCall(), HandleDestructionImpl(), HandleLValueArrayAdjustment(), HandleLValueComplexElement(), HandleOperatorDeleteCall(), HandleOperatorNewCall(), HasLocalVariableExternalStorage(), HasSideEffects(), clang::Sema::IgnoredValueConversions(), clang::InitializationSequence::InitializeFrom(), isArithmeticArgumentPromotion(), isIdenticalStmt(), isKnownToHaveBooleanValue(), isLibstdcxxPointerReturnFalseHack(), isNonNegativeIntegerValue(), isNullPointerValueTemplateArgument(), isParenthesizedADLCallee(), IsTailPaddedMemberArray(), isUnusedResultAWarning(), IsUserDefinedConversion(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), clang::Sema::MakeFullDiscardedValueExpr(), clang::Sema::MakeFullExpr(), clang::Sema::MarkThisReferenced(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MaybeConvertParenListExprToParenExpr(), NoteLValueLocation(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::ProduceCallSignatureHelp(), clang::Sema::RebuildExprInCurrentInstantiation(), recordConversion(), clang::Sema::RequireCompleteExprType(), resolveBuiltinNewDeleteOverload(), rewriteToNumericBoxedExpression(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::Sema::TemporaryMaterializationConversion(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), tryEvaluateBuiltinObjectSize(), TryUserDefinedConversion(), clang::ASTNodeImporter::VisitDependentScopeDeclRefExpr(), clang::ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr(), warnInvalidLock(), and clang::Sema::WarnOnPendingNoDerefs().
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 3803 of file Expr.cpp.
References getObjectKind(), getValueKind(), IgnoreParenCasts(), clang::OK_ObjCProperty, and clang::VK_LValue.
|
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 421 of file Expr.h.
Referenced by buildCapture(), buildCaptureDecl(), CheckIncrementDecrementOperand(), ClassifyBinaryOp(), clang::PseudoObjectExpr::Create(), clang::Sema::CXXCheckConditionalOperands(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::DesignatedInitExpr::Designator::getFieldName(), getObjCProperty(), clang::InitializationSequence::InitializeFrom(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), clang::ShuffleVectorExpr::setExprs(), clang::ASTNodeImporter::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitBinaryConditionalOperator(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitChooseExpr(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitConditionalOperator(), clang::ASTNodeImporter::VisitMemberExpr(), clang::ASTNodeImporter::VisitOpaqueValueExpr(), and clang::ASTNodeImporter::VisitUnaryOperator().
Decl * Expr::getReferencedDeclOfCallee | ( | ) |
Definition at line 1440 of file Expr.cpp.
References IgnoreParenCasts(), and IgnoreParenImpCasts().
Referenced by clang::CodeGen::CodeGenFunction::EmitCallee().
|
inline |
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 3841 of file Expr.cpp.
References getSourceBitField(), IgnoreParens(), clang::FieldDecl::isBitField(), and clang::VK_RValue.
Referenced by AnalyzeAssignment(), GetExprRange(), getSourceBitField(), and clang::ASTContext::isPromotableBitField().
|
inline |
|
inline |
Definition at line 137 of file Expr.h.
Referenced by clang::Sema::ActOnAsTypeExpr(), clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnCXXNamedCast(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::ActOnStmtExprResult(), addCastTransition(), AddVariableConstraints(), AdjustFunctionParmAndArgTypesForDeduction(), clang::interp::ByteCodeExprGen< Emitter >::allocateLocal(), AnalyzeAssignment(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeCompoundAssignment(), AnalyzeImplicitConversions(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::ento::ExprEngine::bindReturnValue(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildBinOp(), clang::Sema::BuildCallToMemberFunction(), buildCapture(), buildCaptureDecl(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildCXXUuidof(), clang::Sema::BuildExpressionTrait(), buildFakeCtorCall(), clang::Sema::BuildForRangeBeginEndCall(), buildGlobalBlock(), clang::Sema::BuildInstanceMessage(), buildMemcpyForAssignmentOp(), BuildNonArrayForRange(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCNumericLiteral(), clang::Sema::BuildOverloadedArrowExpr(), BuildOverloadedBinOp(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildUnaryOp(), clang::Sema::BuildUnresolvedCoawaitExpr(), clang::Sema::CallExprUnaryConversions(), clang::canCalleeThrow(), CanThrow(), clang::canTypeidThrow(), castForMoving(), CastForMoving(), clang::Sema::CheckAdditionOperands(), CheckAggExprForMemSetUse(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticOpPointerOperand(), CheckArrow(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckBooleanCondition(), CheckBoolLikeConversion(), checkBuiltinArgument(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompareOperands(), checkCondition(), CheckConditionalOperand(), CheckConditionalOperator(), checkConditionalVoidType(), CheckConditionalWithEnumTypes(), clang::Sema::CheckConstraintExpression(), CheckConvertedConstantExpression(), CheckCXX98CompatAccessibleCopy(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), CheckedIntArithmetic(), checkElementNonNil(), checkEnumComparison(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::checkExceptionSpecification(), clang::Sema::CheckExtVectorCast(), checkFormatStringExpr(), CheckForModifiableLvalue(), CheckICE(), CheckImplicitArgumentConversions(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), checkIntToPointerCast(), CheckKeyForObjCARCConversion(), CheckLiteralType(), clang::Sema::CheckLoopHintExpr(), clang::Sema::CheckLValueToRValueConversionOperand(), checkMapClauseExpressionBase(), checkMappableExpressionList(), CheckMemaccessSize(), clang::Sema::CheckMemberOperatorAccess(), clang::Sema::CheckMemberPointerConversion(), clang::ento::mpi::MPIChecker::checkMissingWaits(), CheckMoveOnConstruction(), CheckNonNullExpr(), clang::Sema::checkNonTrivialCUnionInInitializer(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::CheckObjCBridgeRelatedCast(), CheckObjCCollectionLiteralElement(), checkObjCCollectionLiteralElement(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckObjCForCollectionOperand(), checkObjCPointerIntrospection(), checkOpenCLConditionVector(), checkOpenCLEnqueueIntType(), checkOpenCLEnqueueVariadicArgs(), checkOpenCLPipeArg(), checkOpenCLPipePacketType(), checkOpenMPLoop(), clang::Sema::CheckPlaceholderExpr(), checkPlaceholderForOverload(), clang::Sema::CheckPointerConversion(), checkPointerIntegerMismatch(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::Sema::CheckSubscriptingKind(), CheckTautologicalComparison(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTollFreeBridgeCast(), clang::Sema::CheckTollFreeBridgeStaticCast(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckUnusedVolatileAssignment(), clang::Sema::checkVariadicArgument(), clang::interp::ByteCodeExprGen< Emitter >::classify(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyExprValueKind(), ClassifyInternal(), ClassifyMemberExpr(), clang::Sema::CodeCompleteCase(), clang::Sema::CodeCompleteObjCInstanceMessage(), computeDeclRefDependence(), conjureOffsetSymbolOnLocation(), clang::ento::SymbolManager::conjureSymbol(), convertVector(), CopyObject(), clang::CXXBindTemporaryExpr::Create(), createBinOpInfoFromIncDec(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ConstructionContext::createFromLayers(), clang::interp::Program::createGlobal(), clang::CodeGen::CodeGenModule::createOpenCLIntToSamplerConversion(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::CXXCheckConditionalOperands(), decomposeTypeForEH(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), DeduceNonTypeTemplateArgument(), DeduceNullPtrTemplateArgument(), DeduceTemplateArgumentsFromCallArgument(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), clang::TypeOfExprType::desugar(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAutoDeductionFailure(), DiagnoseBinOpPrecedence(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseFloatingImpCast(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseForRangeVariableCopies(), DiagnoseImpCast(), DiagnoseIntInBoolContext(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), diagnoseMutableFields(), diagnoseObjCARCConversion(), diagnosePointerIncompatibility(), DiagnoseRecursiveConstFields(), DiagnoseReinterpretUpDownCast(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), diagnoseTautologicalComparison(), clang::Sema::diagnoseZeroToNullptrConversion(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::CodeGenFunction::EmitAggExprToLValue(), clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExprToExn(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(), clang::CodeGen::CodeGenFunction::EmitARCExtendBlockObject(), clang::CodeGen::CodeGenFunction::EmitARCReclaimReturnedObject(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr(), clang::CodeGen::CodeGenFunction::EmitARCRetainScalarExpr(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicIncrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicInit(), emitBadConversionNotes(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallExprLValue(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), EmitCheckedMixedSignMultiply(), EmitCommonNeonSISDBuiltinExpr(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitComplexExpr(), clang::CodeGen::CodeGenFunction::EmitComplexExprIntoLValue(), clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitConditionalOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitCXXBindTemporaryLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructLValue(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidLValue(), clang::CodeGen::CodeGenFunction::EmitCXXUuidofExpr(), clang::CodeGen::CodeGenFunction::EmitCXXUuidofLValue(), clang::CodeGen::emitDeclareSimdFunction(), clang::CodeGen::emitDeclareTargetVarDefinition(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), emitEmptyOrdered(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), emitFPToIntRoundBuiltin(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), EmitISOVolatileLoad(), EmitISOVolatileStore(), emitLibraryCall(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CodeGen::CGCXXABI::EmitMemberPointerConversion(), clang::CodeGen::CodeGenFunction::EmitMSVCBuiltinExpr(), EmitNontemporalLoad(), EmitNontemporalStore(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCEncodeExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCSelectorLValue(), clang::CodeGen::CodeGenFunction::EmitObjCStringLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCThrowOperand(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), emitOMPAtomicCaptureExpr(), emitOMPAtomicReadExpr(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitSimpleCallExpr(), clang::CodeGen::emitSingleReductionCombiner(), clang::CodeGen::CodeGenFunction::EmitStmtExprLValue(), clang::CodeGen::CodeGenFunction::EmitStringLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor(), clang::CodeGen::emitTaskInit(), emitTaskPrivateMappingFunction(), EmitTypeidFromVTable(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitVAArg(), EmitValToTemp(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), emitWritebackArg(), EmitX86BitTestIntrinsic(), EmitX86CvtBF16ToFloatExpr(), EvalAndBitcastToAPInt(), clang::ento::StoreManager::evalDerivedToBase(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), clang::ento::ExprEngine::evalLoad(), Evaluate(), EvaluateArray(), EvaluateArrayNewInitList(), EvaluateAsFixedPoint(), EvaluateAsInt(), EvaluateAsRValue(), EvaluateAtomic(), EvaluateBuiltinClassifyType(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), EvaluateCPlusPlus11IntegralConstantExpr(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), EvaluateFixedPoint(), EvaluateFixedPointOrInteger(), EvaluateFloat(), EvaluateInPlace(), EvaluateIntegerOrLValue(), EvaluateLValue(), evaluateLValueAsAllocSize(), EvaluateMemberPointer(), EvaluateObjectArgument(), EvaluatePointer(), EvaluateRecord(), EvaluateTemporary(), EvaluateVector(), EvaluateVoid(), evenFlexibleArraySize(), ExprLooksBoolean(), FastEvaluateAsRValue(), clang::Sema::FillInlineAsmIdentifierInfo(), clang::OverloadExpr::find(), clang::Sema::FindAssociatedClassesAndNamespaces(), clang::Sema::FindCompositePointerType(), findEnumForBlockReturn(), findPeephole(), findWeakLValue(), finishContextualImplicitConversion(), FinishForRangeVarDecl(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), GetAlignOfExpr(), clang::CXXNewExpr::getAllocatedType(), getArrayIndexingBound(), getAsInt32(), clang::OMPArraySectionExpr::getBaseOriginalType(), getBestDynamicClassType(), clang::ObjCMessageExpr::getCallReturnType(), clang::CallExpr::getCallReturnType(), clang::ento::SValBuilder::getConjuredHeapSymbolVal(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), clang::ento::SValBuilder::getConstantVal(), getCXXRecord(), getDecltypeForExpr(), clang::CXXDeleteExpr::getDestroyedType(), clang::CXXMethodDecl::getDevirtualizedMethod(), clang::MemberExpr::getEndLoc(), getExpressionTraitName(), GetExprType(), clang::CXXInstanceCall::getExtraInvalidatedValues(), getFreeWhenDoneArg(), clang::BlockExpr::getFunctionType(), getIncrementedVar(), clang::ento::ExprEngine::getInitialState(), GetIntrinsic(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), clang::CodeGen::CodeGenModule::getMemberPointerConstant(), clang::StandardConversionSequence::getNarrowingKind(), getNonNullAttrs(), clang::TemplateArgument::getNonTypeTemplateArgumentType(), clang::ExtVectorElementExpr::getNumElements(), GetNumNonZeroBytesInInit(), getObjectType(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CXXMemberCallExpr::getRecordDecl(), getReferenceInitTemporaryType(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), clang::ento::SValBuilder::getRegionValueSymbolVal(), clang::ento::CallEvent::getResultType(), GetReturnType(), getReturnTypeForMethod(), clang::CallEventManager::getSimpleCall(), getStrlenExprArg(), getThrowFn(), GetTypeBeforeIntegralPromotion(), clang::ASTContext::getTypeOfExprType(), clang::ento::StringRegion::getValueType(), clang::ento::ObjCStringRegion::getValueType(), clang::ento::CompoundLiteralRegion::getValueType(), clang::ento::CXXTempObjectRegion::getValueType(), clang::AtomicExpr::getValueType(), clang::Sema::getVariadicCallType(), HandleBaseToDerivedCast(), HandleDynamicCast(), clang::Sema::HandleExprEvaluationContextForTypeof(), handleIntIntBinOp(), clang::ento::ExprEngine::handleLValueBitCast(), handleLValueToRValueConversion(), clang::ento::ExprEngine::handleLVectorSplat(), HandleMemberPointerAccess(), HandleOperatorNewCall(), hasDefinition(), HasEnumType(), hasIsEqualMethod(), IgnoreCommaOperand(), clang::Sema::IgnoredValueConversions(), IgnoreNoopCastsSingleStep(), ignorePointerCastsAndParens(), clang::Sema::ImpCastExprToType(), clang::BadConversionSequence::init(), clang::InitializationSequence::InitializeFrom(), clang::Sema::InvalidLogicalVectorOperands(), clang::CXXDynamicCastExpr::isAlwaysNull(), isArithmeticArgumentPromotion(), isBlockPointer(), isBlockVarRef(), isCheapEnoughToEvaluateUnconditionally(), isConstantInitializer(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), isFlexibleArrayMemberExpr(), IsImplicitBoolFloatConversion(), isImplicitThis(), isInvalidICRSource(), isKnownToHaveBooleanValue(), isKnownToHaveUnsignedValue(), isLeftShiftResultUnrepresentable(), IsModifiable(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isNullPointerConstant(), isNullPointerValueTemplateArgument(), isOnePastTheEndOfCompleteObject(), isParenthesizedADLCallee(), isPointerToConst(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), clang::ASTContext::isPromotableBitField(), isReferenceToNonConstCapture(), clang::ASTContext::isSentinelNullExpr(), isShiftOverflow(), isSimpleArrayDecayOperand(), isSimpleZero(), IsStandardConversion(), IsStdFunction(), clang::ConstructionContextLayer::isStrictlyMoreSpecificThan(), clang::InitListExpr::isStringLiteralInit(), IsTailPaddedMemberArray(), isTemporaryObject(), clang::InitListExpr::isTransparent(), IsTransparentUnionStandardConversion(), isTrivialFiller(), isUnusedResultAWarning(), IsUserDefinedConversion(), LazyInitialize(), clang::Sema::LookupInlineAsmVarDeclField(), LookupMethodInReceiverType(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::ento::SValBuilder::makeIntVal(), mangleAArch64VectorBase(), mangleThunkThisAdjustment(), maybeAdjustInterfaceForSubscriptingCheck(), clang::Sema::MaybeBindToTemporary(), MaybeElementDependentArrayFiller(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), clang::Sema::NoteAllOverloadCandidates(), noteMemberDeclaredHere(), ObjCEnumerationCollection(), objectifyExpr(), peelOffPointerArithmetic(), clang::InitializationSequence::Perform(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformMemberExprBaseConversion(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PerformQualificationConversion(), clang::Sema::prepareVectorSplat(), print_elem(), printExprAsWritten(), PrintFloatingLiteral(), clang::ento::ExprEngine::ProcessInitializer(), clang::ento::retaincountchecker::RetainCountChecker::processObjCLiterals(), clang::ento::ExprEngine::processSwitch(), clang::ento::ExprEngine::ProcessTemporaryDtor(), pushTemporaryCleanup(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), clang::TreeTransform< Derived >::RebuildExtVectorElementExpr(), clang::TreeTransform< Derived >::RebuildObjCIvarRefExpr(), clang::TreeTransform< Derived >::RebuildObjCMessageExpr(), clang::TreeTransform< Derived >::RebuildObjCPropertyRefExpr(), recordFixedType(), clang::Sema::RefersToMemberWithReducedAlignment(), refersToVectorElement(), clang::interp::InterpState::reportOverflow(), clang::Sema::RequireCompleteExprType(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::Sema::resolveAndFixAddressOfOnlyViableOverloadCandidate(), ResolveConstructorOverload(), rewriteToNumberLiteral(), rewriteToNumericBoxedExpression(), scanToNextArgument(), SemaBuiltinCommitRWPipe(), SemaBuiltinLaunder(), SemaBuiltinPipePackets(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), clang::Sema::SemaBuiltinShuffleVector(), clang::Sema::SemaConvertVectorExpr(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), clang::ShuffleVectorExpr::setExprs(), clang::MaterializeTemporaryExpr::setExtendingDecl(), clang::BadConversionSequence::setFromExpr(), setObjCGCLValueClass(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue(), shouldEmitSeparateBlockRetain(), shouldExtendReceiverForInnerPointerMessage(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), skipRValueSubobjectAdjustments(), sumOffsets(), suppressReport(), clang::Sema::TemporaryMaterializationConversion(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformDependentScopeDeclRefExpr(), clang::interp::Trunc(), TryClassUnification(), tryEmitARCCopyWeakInit(), tryEmitARCRetainLoadOfScalar(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), tryEmitFMulAdd(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), tryEmitSpecializedAllocInit(), tryEvaluateBuiltinObjectSize(), clang::Sema::tryExprAsCall(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryLValueToRValueCast(), tryObjCWritebackConversion(), TryOCLSamplerInitialization(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryStaticReferenceDowncast(), tryToConvertMemberExprToDeclRefExpr(), TryUserDefinedConversion(), clang::Sema::UsualUnaryConversions(), clang::ASTNodeImporter::VisitAddrLabelExpr(), clang::ASTNodeImporter::VisitArrayInitIndexExpr(), clang::ASTNodeImporter::VisitArrayInitLoopExpr(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitArrayTypeTraitExpr(), clang::ASTNodeImporter::VisitAtomicExpr(), clang::ASTNodeImporter::VisitBinaryConditionalOperator(), clang::interp::ByteCodeExprGen< Emitter >::VisitBinaryOperator(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::interp::ByteCodeExprGen< Emitter >::visitBool(), clang::ASTNodeImporter::VisitCallExpr(), clang::ento::ExprEngine::VisitCast(), clang::ASTNodeImporter::VisitCharacterLiteral(), clang::ASTNodeImporter::VisitChooseExpr(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitCompoundLiteralExpr(), clang::ASTNodeImporter::VisitConditionalOperator(), clang::JSONNodeDumper::VisitConstantExpr(), clang::ASTNodeImporter::VisitCXXBoolLiteralExpr(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ASTNodeImporter::VisitCXXConstructExpr(), clang::ASTNodeImporter::VisitCXXDeleteExpr(), clang::ASTNodeImporter::VisitCXXDependentScopeMemberExpr(), clang::ASTNodeImporter::VisitCXXInheritedCtorInitExpr(), clang::ASTNodeImporter::VisitCXXMemberCallExpr(), clang::ASTNodeImporter::VisitCXXNamedCastExpr(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ASTNodeImporter::VisitCXXNewExpr(), clang::ASTNodeImporter::VisitCXXNoexceptExpr(), clang::ASTNodeImporter::VisitCXXNullPtrLiteralExpr(), clang::ASTNodeImporter::VisitCXXScalarValueInitExpr(), clang::ASTNodeImporter::VisitCXXStdInitializerListExpr(), clang::ASTNodeImporter::VisitCXXTemporaryObjectExpr(), clang::ento::ExprEngine::VisitCXXThisExpr(), clang::ASTNodeImporter::VisitCXXThisExpr(), clang::ASTNodeImporter::VisitCXXThrowExpr(), clang::ASTNodeImporter::VisitCXXTypeidExpr(), clang::JSONNodeDumper::VisitCXXUnresolvedConstructExpr(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitExplicitCastExpr(), clang::ASTNodeImporter::VisitExpressionTraitExpr(), clang::ASTNodeImporter::VisitFloatingLiteral(), clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitGenericSelectionExpr(), clang::ASTNodeImporter::VisitGNUNullExpr(), clang::ASTNodeImporter::VisitImaginaryLiteral(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ASTNodeImporter::VisitImplicitValueInitExpr(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ASTNodeImporter::VisitInitListExpr(), clang::interp::ByteCodeExprGen< Emitter >::VisitIntegerLiteral(), clang::TextNodeDumper::VisitIntegerLiteral(), clang::JSONNodeDumper::VisitIntegerLiteral(), clang::ASTNodeImporter::VisitIntegerLiteral(), visitLocalsRetainedByInitializer(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ASTNodeImporter::VisitMaterializeTemporaryExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::ASTNodeImporter::VisitMemberExpr(), clang::JSONNodeDumper::VisitObjCMessageExpr(), clang::ASTNodeImporter::VisitOffsetOfExpr(), clang::ASTNodeImporter::VisitOpaqueValueExpr(), clang::ASTNodeImporter::VisitPackExpansionExpr(), clang::ASTNodeImporter::VisitPredefinedExpr(), clang::ASTNodeImporter::VisitStmtExpr(), clang::ASTNodeImporter::VisitStringLiteral(), clang::ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr(), clang::ASTNodeImporter::VisitTypeTraitExpr(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), clang::ASTNodeImporter::VisitUnaryExprOrTypeTraitExpr(), clang::ento::ExprEngine::VisitUnaryOperator(), clang::ASTNodeImporter::VisitUnaryOperator(), clang::ASTNodeImporter::VisitUnresolvedMemberExpr(), clang::ASTNodeImporter::VisitVAArgExpr(), widenIterationCount(), and writeShouldKill().
|
inline |
getValueKind - The value kind that this expression produces.
Definition at line 414 of file Expr.h.
Referenced by clang::Sema::ActOnConditionalOp(), CheckTemplateArgumentPointerToMember(), clang::Sema::checkUnknownAnyCast(), ClassifyInternal(), clang::Sema::CXXCheckConditionalOperands(), clang::ObjCMessageExpr::getCallReturnType(), getDecltypeForExpr(), clang::DesignatedInitExpr::Designator::getFieldName(), getObjCProperty(), clang::ento::CallEvent::getResultType(), clang::Sema::ImpCastExprToType(), clang::InitializationSequence::InitializeFrom(), clang::MaterializeTemporaryExpr::isBoundToLvalueReference(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), removeLValueToRValueCast(), clang::ShuffleVectorExpr::setExprs(), tryEmitARCCopyWeakInit(), TryReferenceInitializationCore(), 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::VisitCXXMemberCallExpr(), clang::ASTNodeImporter::VisitCXXNamedCastExpr(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitExplicitCastExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ASTNodeImporter::VisitMemberExpr(), clang::ASTNodeImporter::VisitOpaqueValueExpr(), clang::ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr(), and clang::ASTNodeImporter::VisitUnaryOperator().
|
inlinestatic |
getValueKindForType - Given a formal return or parameter type, give its value kind.
Definition at line 404 of file Expr.h.
References clang::Type::getAs(), clang::VK_LValue, clang::VK_RValue, and clang::VK_XValue.
Referenced by EvaluateBinaryTypeTrait(), evaluateTypeTrait(), fixOverloadedReinterpretCastExpr(), clang::MemberExpr::getEndLoc(), clang::ASTContext::getInjectedTemplateArg(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
hasAnyTypeDependentArguments - Determines if any of the expressions in Exprs is type-dependent.
Definition at line 3124 of file Expr.cpp.
References isTypeDependent().
Referenced by clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::InitializationSequence::InitializeFrom(), and clang::Sema::ProduceCallSignatureHelp().
bool Expr::hasNonTrivialCall | ( | const ASTContext & | Ctx | ) | const |
Determine whether this expression involves a call to any function that is not trivial.
Definition at line 3672 of file Expr.cpp.
Referenced by isTrivial().
|
inline |
Returns whether this expression has a placeholder type.
Definition at line 481 of file Expr.h.
Referenced by clang::Sema::ActOnConditionalOp(), clang::Sema::BuildDecltypeType(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildTypeofExprType(), CheckArrow(), clang::Sema::CheckAssignmentOperands(), CheckForModifiableLvalue(), clang::Sema::checkUnknownAnyArg(), ClassifyBinaryOp(), clang::OverloadCandidateSet::clear(), clang::Sema::diagnoseARCUnbridgedCast(), findBoundMemberType(), clang::Sema::IgnoredValueConversions(), clang::Sema::PerformContextualImplicitConversion(), and clang::Sema::stripARCUnbridgedCast().
|
inline |
Returns whether this expression has a specific placeholder type.
Definition at line 486 of file Expr.h.
References clang::BuiltinType::isPlaceholderTypeKind(), and clang::Result.
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 3343 of file Expr.cpp.
References getExprLoc(), clang::Stmt::getStmtClass(), clang::Decl::hasAttr(), isInstantiationDependent(), and clang::Stmt::NoStmtClass.
Referenced by clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildDecltypeType(), clang::Sema::CaptureHasSideEffects(), getDefaultBuiltinObjectSizeResult(), clang::arcmt::trans::hasSideEffects(), clang::InitializationSequence::InitializeFrom(), isBlockVarRef(), clang::CallExpr::isBuiltinAssumeFalse(), isIdenticalStmt(), isSimpleZero(), isTrivial(), and tryEvaluateBuiltinObjectSize().
Expr * Expr::IgnoreCasts | ( | ) |
Skip past any casts which might surround this expression until reaching a fixed point.
Skips:
Definition at line 2954 of file Expr.cpp.
References IgnoreCastsSingleStep(), and IgnoreExprNodes().
Referenced by getBlockExpr().
Expr * Expr::IgnoreConversionOperator | ( | ) |
Skip conversion operators.
If this Expr is a call to a conversion operator, return the argument.
Definition at line 2975 of file Expr.cpp.
Referenced by IsArithmeticBinaryExpr().
|
inline |
Expr * Expr::IgnoreImpCasts | ( | ) |
Skip past any implicit casts which might surround this expression until reaching a fixed point.
Skips:
Definition at line 2950 of file Expr.cpp.
References IgnoreExprNodes(), and IgnoreImpCastsSingleStep().
Referenced by addFixitForObjCARCConversion(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), buildCaptureDecl(), clang::Sema::BuildMemberReferenceExpr(), castOperatorNeedsParens(), CheckFoldOperand(), CheckIdentityFieldAssignment(), CheckMemaccessSize(), CheckMoveOnConstruction(), checkOpenMPLoop(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseForRangeReferenceVariableCopies(), diagnoseLogicalNotOnLHSofCheck(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), emitOMPAtomicCaptureExpr(), emitOMPAtomicUpdateExpr(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), extractRegisterName(), GetNSSetArgumentIndex(), getSValForVar(), clang::Sema::InvalidLogicalVectorOperands(), IsArithmeticBinaryExpr(), isImplicitSelf(), requiresParensToAddCast(), rewriteToNumericBoxedExpression(), subscriptOperatorNeedsParens(), tryEvaluateBuiltinObjectSize(), and ValidDuplicateEnum().
Expr * Expr::IgnoreImplicit | ( | ) |
Skip past any implicit AST nodes which might surround this expression until reaching a fixed point.
Skips:
Definition at line 2958 of file Expr.cpp.
References IgnoreExprNodes(), and IgnoreImplicitSingleStep().
Referenced by CheckMoveOnConstruction(), CheckNonNullExpr(), clang::Sema::CodeCompleteCase(), DiagnoseConstAssignment(), clang::CXXRewrittenBinaryOperator::getDecomposedForm(), clang::BindingDecl::getHoldingVar(), getStaticBooleanValue(), clang::CXXConstructorDecl::getTargetConstructor(), IsCallableWithAppend(), clang::InitListExpr::isIdiomaticZeroInitializer(), IsReadonlyMessage(), clang::ento::ExprEngine::ProcessInitializer(), clang::tooling::reallyIgnoreImplicit(), and clang::consumed::ConsumedStmtVisitor::VisitVarDecl().
Expr * Expr::ignoreParenBaseCasts | ( | ) |
Skip past any parentheses and derived-to-base casts until reaching a fixed point.
Skips:
Definition at line 2988 of file Expr.cpp.
References IgnoreBaseCastsSingleStep(), IgnoreExprNodes(), and IgnoreParensSingleStep().
Referenced by getBestDynamicClassTypeExpr(), and clang::CXXInstanceCall::getExtraInvalidatedValues().
|
inline |
Expr * Expr::IgnoreParenCasts | ( | ) |
Skip past any parentheses and casts which might surround this expression until reaching a fixed point.
Skips:
Definition at line 2971 of file Expr.cpp.
References IgnoreCastsSingleStep(), IgnoreExprNodes(), and IgnoreParensSingleStep().
Referenced by clang::Sema::CheckAdditionOperands(), checkBuiltinArgument(), checkFormatStringExpr(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckICE(), CheckIndirectionOperand(), checkMappableExpressionList(), checkObjCPointerIntrospection(), clang::Sema::checkStringLiteralArgumentAttr(), CheckTemplateArgumentAddressOfObjectOrFunction(), checkVAStartIsInVariadicFunction(), clang::Sema::CodeCompleteCase(), clang::Sema::DefaultFunctionArrayConversion(), diagnoseObjCLiteralComparison(), diagnoseTautologicalComparison(), EmitX86AddSubSatExpr(), findCapturingExpr(), FindTypeTagExpr(), getArgumentValueString(), getAsPointeeSymbol(), getBestPropertyDecl(), getIncrementedVar(), getLocationRegionIfReference(), getNSArrayObjects(), getObjCProperty(), getReferencedDeclOfCallee(), getStaticBooleanValue(), getStrlenExprArg(), clang::arcmt::trans::hasSideEffects(), ignoreLiteralAdditions(), isCalleeArrow(), isCapturedBy(), isEnableIf(), clang::arcmt::trans::isGlobalVar(), isLeftShiftResultUnrepresentable(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::arcmt::trans::isPlusOne(), clang::ASTContext::isSentinelNullExpr(), IsStandardConversion(), IsTailPaddedMemberArray(), isTrivialExpression(), isValidOrderingForOp(), LookThroughTransitiveAssignmentsAndCommaOperators(), LookupMemberExpr(), clang::sema::FunctionScopeInfo::markSafeWeakUse(), maybeAdjustInterfaceForSubscriptingCheck(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), REGISTER_MAP_WITH_PROGRAMSTATE(), RemoveSelectorFromWarningCache(), showBRDefaultDiagnostics(), tryEmitSpecializedAllocInit(), and UseNSOptionsMacro().
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 2966 of file Expr.cpp.
References IgnoreExprNodes(), IgnoreImpCastsExtraSingleStep(), and IgnoreParensSingleStep().
Referenced by clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), AnalyzeAssignment(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), clang::Sema::CalculateConstraintSatisfaction(), clang::canCalleeThrow(), CheckBoolLikeConversion(), CheckConditionalOperand(), CheckConditionalOperator(), CheckConditionalWithEnumTypes(), clang::Sema::CheckConstraintExpression(), checkEnumComparison(), clang::Sema::CheckFloatComparison(), checkForLiteralCreation(), CheckForReference(), CheckICE(), CheckImplicitArgumentConversions(), CheckImplicitConversion(), clang::Sema::CheckLiteralKind(), checkMapClauseExpressionBase(), checkMapConflicts(), checkMappableExpressionList(), CheckMemaccessSize(), CheckMoveOnConstruction(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckShadowingDeclModification(), clang::Sema::CheckSubscriptingKind(), CheckTautologicalComparison(), checkUnsafeAssignLiteral(), clang::Sema::CheckUnusedVolatileAssignment(), ClassifyConditional(), ClassifyMemberExpr(), collectConjunctionTerms(), clang::Sema::ConversionToObjCStringLiteralCheck(), DiagnoseCallingConvCast(), DiagnoseConstAssignment(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseFloatingImpCast(), DiagnoseIntInBoolContext(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), diagnoseTautologicalComparison(), clang::Sema::diagnoseZeroToNullptrConversion(), doesExprLikelyComputeSize(), clang::CodeGen::emitDeclareSimdFunction(), emitInitWithReductionInitializer(), emitOMPArraySectionBase(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), clang::Sema::EmitRelatedResultTypeNote(), clang::CodeGen::emitTaskInit(), ExprLooksBoolean(), clang::Sema::findFailedBooleanCondition(), FindTypeTagExpr(), getBaseDecl(), clang::OMPArraySectionExpr::getBaseOriginalType(), getBestPropertyDecl(), getDefaultBuiltinObjectSizeResult(), getNoteTag(), getPrivateItem(), getReferencedDeclOfCallee(), getSizeOfExprArg(), hasRecursiveCallInPath(), isCallToSelfClass(), isEnumConstant(), IsEnumConstOrFromMacro(), IsImplicitBoolFloatConversion(), isKnownToHaveUnsignedValue(), isObjCSelfExpr(), IsReadonlyMessage(), isSameComparisonOperand(), isSameWidthConstantConversion(), IsStdFunction(), clang::NSAPI::isSubclassOfNSClass(), IsTailPaddedMemberArray(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), lookThroughRangesV3Condition(), LookupMemberExpr(), clang::ento::ExprEngine::processSwitch(), recordFixedType(), refersToGlobalRegisterVar(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToNumberLiteral(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), stripCastsAndSugar(), and tryTransformToIntOrEnumConstant().
|
inline |
Expr * Expr::IgnoreParenLValueCasts | ( | ) |
Skip past any parentheses and lvalue casts which might surround this expression until reaching a fixed point.
Skips:
Definition at line 2983 of file Expr.cpp.
References IgnoreExprNodes(), IgnoreLValueCastsSingleStep(), and IgnoreParensSingleStep().
Referenced by checkMappableExpressionList(), getIncrementedVar(), and clang::Sema::isSelfExpr().
|
inline |
Expr * Expr::IgnoreParenNoopCasts | ( | const ASTContext & | Ctx | ) |
Skip past any parenthese and casts which do not change the value (including ptr->int casts of the same size) until reaching a fixed point.
Skips:
Definition at line 2993 of file Expr.cpp.
References IgnoreExprNodes(), IgnoreNoopCastsSingleStep(), and IgnoreParensSingleStep().
Referenced by AddVariableConstraints(), and stripCasts().
|
inline |
Expr * Expr::IgnoreParens | ( | ) |
Skip past any parentheses which might surround this expression until reaching a fixed point.
Skips:
UO_Extension
!isResultDependent()
!isConditionDependent()
Definition at line 2962 of file Expr.cpp.
References IgnoreExprNodes(), and IgnoreParensSingleStep().
Referenced by buildFakeCtorCall(), clang::Sema::canThrow(), CheckMoveOnConstruction(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::checkPseudoObjectRValue(), clang::Sema::checkUnknownAnyArg(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckVecStepExpr(), ClassifyInternal(), ClassifyMemberExpr(), clang::Sema::completeExprArrayBound(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), describeUninitializedArgumentInCall(), clang::Sema::diagnoseARCUnbridgedCast(), DiagnoseDivisionSizeofPointerOrArray(), clang::Sema::DiagnoseEqualityWithExtraParens(), clang::Sema::DiscardMisalignedMemberAddress(), DoMarkVarDeclReferenced(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), EmitLValueOrThrowExpression(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), evaluateLValueAsAllocSize(), clang::OverloadExpr::find(), findBoundMemberType(), findEnumForBlockReturn(), findPeephole(), findRetainCycleOwner(), findWeakLValue(), GetAlignOfExpr(), getArrayIndexingBound(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::CallExpr::getCallReturnType(), clang::ento::SValBuilder::getConstantVal(), clang::Sema::getCopyElisionCandidate(), getDecltypeForExpr(), getExprAsWritten(), GetExprRange(), clang::CXXMemberCallExpr::getImplicitObjectArgument(), clang::CXXMemberCallExpr::getMethodDecl(), GetNumNonZeroBytesInInit(), getPrivateItem(), getReferenceInitTemporaryType(), getSelfInitExpr(), getSourceBitField(), clang::CFGBlock::getTerminatorCondition(), clang::ento::ExprEngine::handleUOExtension(), IgnoreCommaOperand(), ignorePointerCastsAndParens(), ignoreTransparentExprs(), clang::InitializationSequence::InitializeFrom(), isBlockVarRef(), isCheapEnoughToEvaluateUnconditionally(), isFlexibleArrayMemberExpr(), isGLValueFromPointerDeref(), IsIntegerLiteralConstantExpr(), isInvalidICRSource(), isKnownToHaveBooleanValue(), IsModifiable(), isOBJCGCCandidate(), isOnePastTheEndOfCompleteObject(), isParenthesizedADLCallee(), isReferenceToNonConstCapture(), isSameComparisonOperand(), isSimpleZero(), IsSpecialDiscardedValue(), IsStandardConversion(), clang::InitListExpr::isStringLiteralInit(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), isUnusedResultAWarning(), LookupMethodInReceiverType(), MaybeElementDependentArrayFiller(), maybeGetUnaryAddrOfOperand(), refersToVectorElement(), shouldEmitSeparateBlockRetain(), shouldExtendReceiverForInnerPointerMessage(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), skipRValueSubobjectAdjustments(), skipTemporaryBindingsNoOpCastsAndParens(), tryEmitARCCopyWeakInit(), tryEmitARCRetainLoadOfScalar(), clang::Sema::tryExprAsCall(), tryTransformToIntOrEnumConstant(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), visitLocalsRetainedByInitializer(), clang::ento::ExprEngine::VisitUnaryOperator(), and writeShouldKill().
bool Expr::isBoundMemberFunction | ( | ASTContext & | Ctx | ) | const |
Returns true if this expression is a bound member function.
Definition at line 2776 of file Expr.cpp.
References ClassifyLValue(), isTypeDependent(), and LV_MemberFunction.
bool Expr::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.
If this expression is not constant and Culprit is non-null, it is used to store the address of first non constant expr.
Definition at line 3132 of file Expr.cpp.
References clang::Type::castAs(), EvaluateAsInt(), EvaluateAsLValue(), clang::RecordDecl::fields(), clang::CXXConstructExpr::getArg(), clang::DesignatedInitUpdateExpr::getBase(), clang::CastExpr::getCastKind(), clang::CXXConstructExpr::getConstructor(), clang::InitListExpr::getInit(), clang::InitListExpr::getInitializedFieldInUnion(), clang::CXXConstructExpr::getNumArgs(), clang::InitListExpr::getNumInits(), clang::UnaryOperator::getOpcode(), clang::CXXMethodDecl::getParent(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::CastExpr::getSubExpr(), getType(), clang::DesignatedInitUpdateExpr::getUpdater(), clang::Expr::EvalStatus::HasSideEffects, clang::CXXRecordDecl::hasTrivialDestructor(), clang::Type::isArrayType(), isConstantInitializer(), isEvaluatable(), clang::Type::isRecordType(), clang::InitListExpr::isSemanticForm(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), isValueDependent(), clang::Result, and SE_AllowUndefinedBehavior.
Referenced by clang::Sema::checkAllowedCUDAInitializer(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckForConstantInitializer(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::Sema::InstantiateVariableInitializer(), and isConstantInitializer().
bool Expr::isCXX11ConstantExpr | ( | const ASTContext & | Ctx, |
APValue * | Result = nullptr , |
||
SourceLocation * | Loc = 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 14284 of file ExprConstant.cpp.
References clang::ASTContext::getLangOpts().
Referenced by EvaluateCPlusPlus11IntegralConstantExpr(), and clang::StandardConversionSequence::getNarrowingKind().
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 14277 of file ExprConstant.cpp.
References CheckICE().
Referenced by isNullPointerConstant().
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 2999 of file Expr.cpp.
Referenced by clang::TreeTransform< Derived >::DropCallArgument(), and clang::CXXConstructExpr::getEndLoc().
bool Expr::isEvaluatable | ( | const ASTContext & | Ctx, |
SideEffectsKind | SEK = 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 13695 of file ExprConstant.cpp.
References EvaluateAsRValue(), hasUnacceptableSideEffect(), and clang::Result.
Referenced by isCheapEnoughToEvaluateUnconditionally(), isConstantInitializer(), and isTrivial().
|
inline |
Definition at line 261 of file Expr.h.
References clang::VK_RValue.
Referenced by clang::Sema::ActOnConditionalOp(), buildCapture(), buildCaptureDecl(), clang::Sema::BuildCXXTypeId(), clang::Sema::checkInitializerLifetime(), clang::interp::ByteCodeExprGen< Emitter >::classify(), clang::Sema::DefaultLvalueConversion(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitConditionalOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitInitListLValue(), Evaluate(), EvaluateAsRValue(), EvaluateLValue(), EvaluateObjectArgument(), EvaluatePointer(), clang::ento::SValBuilder::getConstantVal(), clang::ento::ExprEngine::getInitialState(), clang::ento::SValBuilder::getRegionValueSymbolVal(), HandleDynamicCast(), clang::ento::ExprEngine::handleLVectorSplat(), hasTrivialGetExpr(), clang::Sema::IgnoredValueConversions(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), IsStandardConversion(), clang::InitListExpr::isTransparent(), isUnusedResultAWarning(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), tryEvaluateBuiltinObjectSize(), TryLValueToRValueCast(), tryObjCWritebackConversion(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCompoundLiteralExpr(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ento::ExprEngine::VisitMemberExpr(), and clang::ento::ExprEngine::VisitUnaryOperator().
bool Expr::isImplicitCXXThis | ( | ) | const |
Whether this expression is an implicit reference to 'this' in C++.
Definition at line 3080 of file Expr.cpp.
References Paren, and clang::interp::This().
|
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.
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.
Definition at line 200 of file Expr.h.
Referenced by clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPDeclareVariantDirective(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPFinalClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::AtomicExpr::AtomicExpr(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), checkMappableExpressionList(), checkSimdlenSafelenSpecified(), clang::Sema::CorrectDelayedTyposInExpr(), clang::PseudoObjectExpr::Create(), clang::CallExpr::CreateEmpty(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXScalarValueInitExpr::getBeginLoc(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getDecltypeType(), clang::ASTContext::getDependentAddressSpaceType(), clang::DesignatedInitUpdateExpr::getEndLoc(), clang::DesignatedInitExpr::Designator::getFieldName(), clang::ObjCPropertyRefExpr::getReceiverType(), hasOnlyNonStaticMemberFunctions(), HasSideEffects(), clang::InitListExpr::InitListExpr(), clang::TemplateArgument::isInstantiationDependent(), isNonNegativeIntegerValue(), clang::DecltypeType::isSugared(), clang::ShuffleVectorExpr::setExprs(), clang::InitListExpr::setInit(), clang::ConceptSpecializationExpr::setTemplateArguments(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), and clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr().
bool Expr::isIntegerConstantExpr | ( | llvm::APSInt & | Result, |
const ASTContext & | Ctx, | ||
SourceLocation * | Loc = nullptr , |
||
bool | isEvaluated = true |
||
) | const |
isIntegerConstantExpr - Return true if this expression is a valid integer constant expression, and, if so, return its value in Result.
If not a valid i-c-e, return false and fill in Loc (if specified) with the location of the invalid expression.
Note: This does not perform the implicit conversions required by C++11 [expr.const]p5.
Definition at line 14250 of file ExprConstant.cpp.
References EvaluateCPlusPlus11IntegralConstantExpr(), and clang::ASTContext::getLangOpts().
Referenced by clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnPragmaPack(), AnalyzeComparison(), BuildAddressSpaceIndex(), clang::Sema::BuildExtVectorType(), clang::Sema::CheckCaseExpression(), CheckImplicitConversion(), checkIntToPointerCast(), EmitAArch64TblBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), fitsInto(), clang::StandardConversionSequence::getNarrowingKind(), HandleNeonVectorTypeAttr(), isNonNegativeIntegerValue(), isNullPointerConstant(), IsStandardConversion(), IsZeroInitializer(), clang::ASTContext::mergeTypes(), and TryOCLSamplerInitialization().
bool Expr::isIntegerConstantExpr | ( | const ASTContext & | Ctx, |
SourceLocation * | Loc = nullptr |
||
) | const |
Definition at line 14234 of file ExprConstant.cpp.
References CheckICE(), EvaluateCPlusPlus11IntegralConstantExpr(), and clang::ASTContext::getLangOpts().
bool Expr::isKnownToHaveBooleanValue | ( | ) | 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.
Definition at line 134 of file Expr.cpp.
References clang::ast_matchers::expr, clang::Stmt::getBeginLoc(), getExprLoc(), getType(), IgnoreParens(), clang::Type::isBooleanType(), clang::Type::isIntegralOrEnumerationType(), and v.
Referenced by clang::Sema::ActOnStartOfSwitchStmt(), CheckImplicitConversion(), CheckTautologicalComparison(), diagnoseLogicalNotOnLHSofCheck(), and isArithmeticArgumentPromotion().
|
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. This is an unfortunate abuse of terminology on the part of the C++ committee. In Clang, when we say "r-value", we generally mean a pr-value.
Definition at line 258 of file Expr.h.
References clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPAtomicDirective(), AdjustFunctionParmAndArgTypesForDeduction(), checkMappableExpressionList(), ClassifyInternal(), emitOMPAtomicCaptureExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), EvaluateExpressionTrait(), IsGlobalLValue(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), isReferenceToNonConstCapture(), TryClassUnification(), TryLValueToRValueCast(), TryStaticReferenceDowncast(), and writeShouldKill().
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.
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 678 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 CheckForModifiableLvalue().
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 3684 of file Expr.cpp.
References clang::Qualifiers::empty(), EvaluateKnownConstInt(), clang::interp::GE(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getLangOpts(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), getType(), clang::APIntStorage::getValue(), isCXX98IntegralConstantExpr(), clang::Type::isEnumeralType(), isIntegerConstantExpr(), isNullPointerConstant(), isTypeDependent(), isValueDependent(), clang::Type::isVoidType(), NPC_NeverValueDependent, NPC_ValueDependentIsNotNull, NPC_ValueDependentIsNull, NPCK_CXX11_nullptr, NPCK_GNUNull, NPCK_NotNull, NPCK_ZeroExpression, NPCK_ZeroLiteral, clang::opencl_generic, clang::opencl_private, and clang::Qualifiers::removeAddressSpace().
Referenced by clang::Sema::BuildCXXUuidof(), clang::Sema::CheckAdditionOperands(), checkFormatStringExpr(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckPointerConversion(), clang::Sema::DiagnoseConditionalForNull(), DiagnoseNullConversion(), diagnoseObjCLiteralComparison(), diagnoseTautologicalComparison(), clang::Sema::FindCompositePointerType(), getAsPointeeSymbol(), clang::ento::SValBuilder::getConstantVal(), isInvalidICRSource(), clang::Sema::IsMemberPointerConversion(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isNullPointerConstant(), isNullPointerValueTemplateArgument(), clang::ASTContext::isSentinelNullExpr(), SemaOpenCLBuiltinEnqueueKernel(), and tryEvaluateBuiltinObjectSize().
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 2737 of file Expr.cpp.
References clang::MemberExpr::getBase(), clang::ASTContext::getObjCGCAttrKind(), clang::Stmt::getStmtClass(), IgnoreParens(), isOBJCGCCandidate(), clang::Type::isPointerType(), and clang::Qualifiers::Weak.
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), and isOBJCGCCandidate().
bool Expr::isObjCSelfExpr | ( | ) | const |
Check if this expression is the ObjC 'self' implicit parameter.
Definition at line 3823 of file Expr.cpp.
References clang::DeclRefExpr::getDecl(), clang::Decl::getDeclContext(), clang::ObjCMethodDecl::getSelfDecl(), and IgnoreParenImpCasts().
Referenced by clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), getBestPropertyDecl(), clang::Sema::getMessageSendResultType(), and tryEmitSpecializedAllocInit().
|
inline |
Definition at line 425 of file Expr.h.
References clang::OK_BitField, and clang::OK_Ordinary.
Referenced by clang::Sema::ActOnConditionalOp().
|
static |
isPotentialConstantExpr - Return true if this function's definition might be usable in a constant expression in C++11, if it were marked constexpr.
Return false if the function can never produce a constant expression, along with diagnostics describing why not.
Definition at line 14360 of file ExprConstant.cpp.
References clang::DeclContext::isDependentContext().
Referenced by CheckConstexprFunctionBody().
|
static |
isPotentialConstantExprUnevaluted - 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 14414 of file ExprConstant.cpp.
References isValueDependent().
|
inline |
Definition at line 259 of file Expr.h.
References clang::VK_RValue.
Referenced by buildFakeCtorCall(), clang::Sema::BuildMemberReferenceExpr(), CheckICE(), checkIndirectCopyRestoreSource(), CheckLiteralType(), CheckMoveOnConstruction(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), emitPseudoObjectExpr(), EvaluateArray(), EvaluateArrayNewInitList(), EvaluateAsBooleanCondition(), EvaluateAtomic(), EvaluateComplex(), EvaluateExpressionTrait(), EvaluateFloat(), EvaluateInPlace(), EvaluateIntegerOrLValue(), EvaluateMemberPointer(), EvaluateObjectArgument(), EvaluatePointer(), EvaluateRecord(), EvaluateTemporary(), EvaluateVector(), EvaluateVoid(), FastEvaluateAsRValue(), clang::Sema::FillInlineAsmIdentifierInfo(), clang::CXXMethodDecl::getDevirtualizedMethod(), clang::Sema::IgnoredValueConversions(), ignorePointerCastsAndParens(), clang::Sema::ImpCastExprToType(), isOnePastTheEndOfCompleteObject(), isSameComparisonOperand(), clang::InitListExpr::isTransparent(), clang::Sema::MaybeBindToTemporary(), clang::Sema::TemporaryMaterializationConversion(), and TryListInitialization().
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 3926 of file Expr.cpp.
References clang::declaresSameEntity(), clang::ArraySubscriptExpr::getIdx(), clang::Stmt::getStmtClass(), IgnoreParenImpCasts(), IgnoreParens(), clang::ObjCIvarRefExpr::isFreeIvar(), and isRValue().
Referenced by diagnoseTautologicalComparison().
bool Expr::isTemporaryObject | ( | ASTContext & | C, |
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 3038 of file Expr.cpp.
References Classify(), getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::Classification::isPRValue(), and skipTemporaryBindingsNoOpCastsAndParens().
Referenced by CopyObject(), and clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr().
|
inline |
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
For example, the expressions "x" and "x + y" are type-dependent in the following code, but "y" is not type-dependent:
Definition at line 176 of file Expr.h.
Referenced by clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnExplicitBoolSpecifier(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPDeclareVariantDirective(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPFinalClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnPragmaPack(), clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::ActOnStmtExprResult(), AnalyzeBitFieldAssignment(), AnalyzeImplicitConversions(), clang::AtomicExpr::AtomicExpr(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBinOp(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildExpressionTrait(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCSubscriptExpression(), clang::Sema::BuildStaticAssertDeclaration(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVectorType(), clang::canDynamicCastThrow(), clang::Sema::canThrow(), clang::canTypeidThrow(), CheckArrow(), clang::Sema::CheckBooleanCondition(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckConstraintExpression(), clang::Sema::checkExceptionSpecification(), checkFormatStringExpr(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), checkMappableExpressionList(), CheckObjCCollectionLiteralElement(), clang::Sema::CheckObjCForCollectionOperand(), clang::Sema::checkPseudoObjectAssignment(), clang::Sema::checkPseudoObjectIncDec(), checkSimdlenSafelenSpecified(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckVecStepExpr(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::Sema::CorrectDelayedTyposInExpr(), clang::PseudoObjectExpr::Create(), clang::OffsetOfExpr::CreateEmpty(), clang::CallExpr::CreateEmpty(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), DecodeOperatorCall(), clang::Sema::DeduceAutoType(), clang::Sema::DiagnoseEqualityWithExtraParens(), doRewriteToUTF8StringBoxedExpressionHelper(), findTemplateParameterInType(), getDecltypeForExpr(), clang::ASTContext::getDependentSizedArrayType(), clang::DesignatedInitUpdateExpr::getEndLoc(), clang::DesignatedInitExpr::Designator::getFieldName(), getPrivateItem(), clang::ObjCPropertyRefExpr::getReceiverType(), clang::ASTContext::getTypeOfExprType(), clang::ArrayTypeTraitExpr::getValue(), HandleNeonVectorTypeAttr(), hasAnyTypeDependentArguments(), hasOnlyNonStaticMemberFunctions(), clang::InitListExpr::InitListExpr(), isBoundMemberFunction(), isNonNegativeIntegerValue(), isNullPointerConstant(), isNullPointerValueTemplateArgument(), clang::ASTContext::isPromotableBitField(), clang::TypeOfExprType::isSugared(), isUnusedResultAWarning(), ObjCEnumerationCollection(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::ProduceCallSignatureHelp(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), rewriteToNumericBoxedExpression(), SemaBuiltinCpuIs(), clang::Sema::SemaBuiltinShuffleVector(), clang::ShuffleVectorExpr::setExprs(), clang::InitListExpr::setInit(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::Sema::tryExprAsCall(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), clang::Sema::VerifyBitField(), and clang::ASTNodeImporter::VisitChooseExpr().
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 2383 of file Expr.cpp.
References clang::CompoundStmt::body_back(), clang::CompoundStmt::body_empty(), clang::CallExpr::getArg(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), clang::InitListExpr::getBeginLoc(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), clang::CallExpr::getCallReturnType(), clang::ASTContext::getCanonicalType(), clang::CastExpr::getCastKind(), clang::DeclRefExpr::getDecl(), clang::Stmt::getEndLoc(), getExprLoc(), clang::ASTContext::getLangOpts(), clang::BinaryOperator::getLHS(), clang::CStyleCastExpr::getLParenLoc(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMessageExpr::getMethodFamily(), clang::CallExpr::getNumArgs(), clang::UnaryOperator::getOpcode(), clang::BinaryOperator::getOpcode(), clang::CXXOperatorCallExpr::getOperator(), clang::CXXOperatorCallExpr::getOperatorLoc(), clang::UnaryOperator::getOperatorLoc(), clang::BinaryOperator::getOperatorLoc(), clang::BinaryOperator::getRHS(), clang::CXXOperatorCallExpr::getSourceRange(), clang::Stmt::getSourceRange(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::CastExpr::getSubExpr(), clang::PseudoObjectExpr::getSyntacticForm(), getType(), clang::Type::hasAttr(), clang::CallExpr::hasUnusedResultAttr(), IgnoreParens(), clang::BinaryOperator::isAssignmentOp(), isGLValue(), clang::ObjCMessageExpr::isInstanceMessage(), clang::Type::isReferenceType(), isTypeDependent(), isUnusedResultAWarning(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), Label, and clang::OMF_init.
Referenced by isUnusedResultAWarning().
|
inline |
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
For example, the array bound of "Chars" in the following example is value-dependent.
Definition at line 158 of file Expr.h.
Referenced by clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPDeclareVariantDirective(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPFinalClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnPragmaPack(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), clang::AtomicExpr::AtomicExpr(), clang::Sema::BuildAddressSpaceAttr(), BuildAddressSpaceIndex(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildStaticAssertDeclaration(), clang::Sema::BuildVectorType(), clang::Sema::canThrow(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckCXXBooleanCondition(), checkFormatStringExpr(), CheckICE(), CheckImplicitConversion(), clang::Sema::CheckLoopHintExpr(), checkMappableExpressionList(), CheckNonNullExpr(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::CorrectDelayedTyposInExpr(), clang::PseudoObjectExpr::Create(), clang::CallExpr::CreateEmpty(), clang::CXXConstructExpr::CXXConstructExpr(), DiagnoseIntInBoolContext(), clang::Sema::DiagnoseSentinelCalls(), EvaluateInPlace(), EvaluatesAsFalse(), EvaluatesAsTrue(), EvaluateVarDecl(), evaluateVarDeclInit(), clang::Sema::FinalizeVarWithDestructor(), clang::CXXScalarValueInitExpr::getBeginLoc(), clang::ASTContext::getDependentSizedArrayType(), clang::DesignatedInitUpdateExpr::getEndLoc(), clang::DesignatedInitExpr::Designator::getFieldName(), clang::StandardConversionSequence::getNarrowingKind(), clang::SizeOfPackExpr::getPackLength(), getPrivateItem(), clang::ObjCPropertyRefExpr::getReceiverType(), clang::TypeTraitExpr::getValue(), HandleAddressSpaceTypeAttribute(), HandleNeonVectorTypeAttr(), clang::InitListExpr::InitListExpr(), clang::CallExpr::isBuiltinAssumeFalse(), isConstantInitializer(), isNonNegativeIntegerValue(), isNullPointerConstant(), isNullPointerValueTemplateArgument(), clang::SizeOfPackExpr::isPartiallySubstituted(), isPotentialConstantExprUnevaluated(), clang::ASTContext::isPromotableBitField(), clang::ConceptSpecializationExpr::isSatisfied(), IsTailPaddedMemberArray(), SemaBuiltinCpuIs(), clang::ShuffleVectorExpr::setExprs(), clang::InitListExpr::setInit(), clang::ConceptSpecializationExpr::setTemplateArguments(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr(), VariableCanNeverBeAConstantExpression(), clang::Sema::VerifyBitField(), clang::EvaluatedExprVisitorBase< llvm::make_const_ptr, ImplClass >::VisitChooseExpr(), clang::ASTNodeImporter::VisitChooseExpr(), clang::ASTNodeImporter::VisitCXXNoexceptExpr(), clang::ASTNodeImporter::VisitSizeOfPackExpr(), and clang::ASTNodeImporter::VisitTypeTraitExpr().
|
inline |
Definition at line 260 of file Expr.h.
References clang::VK_XValue.
Referenced by TryClassUnification(), and tryEmitARCRetainLoadOfScalar().
|
inline |
Returns true if this expression is a gl-value that potentially refers to a bit-field.
In C++, whether a gl-value refers to a bitfield is essentially an aspect of the value-kind type system.
Definition at line 446 of file Expr.h.
References clang::OK_BitField.
Referenced by clang::Sema::BuildTypeofExprType(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), isNonReferenceableGLValue(), TryReferenceInitializationCore(), and clang::interp::ByteCodeExprGen< Emitter >::visitBool().
bool Expr::refersToGlobalRegisterVar | ( | ) | const |
Returns whether this expression refers to a global register variable.
Definition at line 3914 of file Expr.cpp.
References IgnoreParenImpCasts(), and clang::SC_Register.
bool Expr::refersToVectorElement | ( | ) | const |
Returns whether this expression refers to a vector element.
Definition at line 3888 of file Expr.cpp.
References getType(), IgnoreParens(), clang::Type::isVectorType(), refersToVectorElement(), and clang::VK_RValue.
Referenced by isNonReferenceableGLValue(), refersToVectorElement(), and TryReferenceInitializationCore().
Set the bit that describes whether this expression contains an unexpanded parameter pack.
Definition at line 229 of file Expr.h.
Referenced by clang::MaterializeTemporaryExpr::setExtendingDecl(), and clang::ConceptSpecializationExpr::setTemplateArguments().
|
inline |
Set whether this expression is instantiation-dependent or not.
Definition at line 205 of file Expr.h.
Referenced by clang::MaterializeTemporaryExpr::setExtendingDecl(), clang::ConceptSpecializationExpr::setTemplateArguments(), and clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr().
|
inline |
|
inline |
Definition at line 138 of file Expr.h.
References clang::QualType::isNull(), and clang::Type::isReferenceType().
Referenced by clang::Sema::completeExprArrayBound(), ConstructTransparentUnion(), clang::DesignatedInitUpdateExpr::DesignatedInitUpdateExpr(), clang::InitializationSequence::Perform(), resolveBuiltinNewDeleteOverload(), SemaBuiltinLaunder(), SemaBuiltinReserveRWPipe(), SemaOpenCLBuiltinToAddr(), updateStringLiteralType(), and clang::ASTNodeImporter::VisitInitListExpr().
|
inline |
|
inline |
Set whether this expression is value-dependent or not.
Definition at line 161 of file Expr.h.
Referenced by clang::MaterializeTemporaryExpr::setExtendingDecl(), and clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr().
|
inline |
setValueKind - Set the value kind produced by this expression.
Definition at line 431 of file Expr.h.
Referenced by clang::InitializationSequence::Perform(), removeLValueToRValueCast(), updateGNUCompoundLiteralRValue(), and updateStringLiteralType().
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 76 of file Expr.cpp.
References clang::Type::castAs(), clang::Type::getAs(), getType(), IgnoreParens(), and clang::Type::isRecordType().
Referenced by clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::ento::ExprEngine::getInitialState(), getReferenceInitTemporaryType(), visitLocalsRetainedByInitializer(), and visitLocalsRetainedByReferenceBinding().
|
inline |
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.
Type | - How to evaluate the size of the Expr, as defined by the "type" parameter of __builtin_object_size |
Definition at line 14443 of file ExprConstant.cpp.
Referenced by getDefaultBuiltinObjectSizeResult().