clang API Documentation
#include <Expr.h>
Inherits clang::Stmt.
Inherited by clang::AbstractConditionalOperator, clang::AddrLabelExpr, clang::ArraySubscriptExpr, clang::ArrayTypeTraitExpr, clang::AsTypeExpr, clang::AtomicExpr, clang::BinaryOperator, clang::BinaryTypeTraitExpr, clang::BlockDeclRefExpr, clang::BlockExpr, clang::CallExpr, clang::CastExpr, clang::CharacterLiteral, clang::ChooseExpr, clang::CompoundLiteralExpr, clang::CXXBindTemporaryExpr, clang::CXXBoolLiteralExpr, clang::CXXConstructExpr, clang::CXXDefaultArgExpr, clang::CXXDeleteExpr, clang::CXXDependentScopeMemberExpr, clang::CXXNewExpr, clang::CXXNoexceptExpr, clang::CXXNullPtrLiteralExpr, clang::CXXPseudoDestructorExpr, clang::CXXScalarValueInitExpr, clang::CXXThisExpr, clang::CXXThrowExpr, clang::CXXTypeidExpr, clang::CXXUnresolvedConstructExpr, clang::CXXUuidofExpr, clang::DeclRefExpr, clang::DependentScopeDeclRefExpr, clang::DesignatedInitExpr, clang::ExpressionTraitExpr, clang::ExprWithCleanups, clang::ExtVectorElementExpr, clang::FloatingLiteral, clang::GenericSelectionExpr, clang::GNUNullExpr, clang::ImaginaryLiteral, clang::ImplicitValueInitExpr, clang::InitListExpr, clang::IntegerLiteral, clang::LambdaExpr, clang::MaterializeTemporaryExpr, clang::MemberExpr, clang::ObjCEncodeExpr, clang::ObjCIndirectCopyRestoreExpr, clang::ObjCIsaExpr, clang::ObjCIvarRefExpr, clang::ObjCMessageExpr, clang::ObjCPropertyRefExpr, clang::ObjCProtocolExpr, clang::ObjCSelectorExpr, clang::ObjCStringLiteral, clang::OffsetOfExpr, clang::OpaqueValueExpr, clang::OverloadExpr, clang::PackExpansionExpr, clang::ParenExpr, clang::ParenListExpr, clang::PredefinedExpr, clang::PseudoObjectExpr, clang::ShuffleVectorExpr, clang::SizeOfPackExpr, clang::StmtExpr, clang::StringLiteral, clang::SubstNonTypeTemplateParmExpr, clang::SubstNonTypeTemplateParmPackExpr, clang::UnaryExprOrTypeTraitExpr, clang::UnaryOperator, clang::UnaryTypeTraitExpr, and clang::VAArgExpr.

Classes | |
| class | Classification |
| The return type of classify(). Represents the C++0x expression taxonomy. More... | |
| struct | EvalResult |
| EvalResult is a struct with detailed info about an evaluated expression. More... | |
| struct | EvalStatus |
| EvalStatus is a struct with detailed info about an evaluation in progress. More... | |
Public Types | |
| enum | LValueClassification { LV_Valid, LV_NotObjectType, LV_IncompleteVoidType, LV_DuplicateVectorComponents, LV_InvalidExpression, LV_InvalidMessageExpression, LV_MemberFunction, LV_SubObjCPropertySetting, LV_ClassTemporary } |
| enum | isModifiableLvalueResult { MLV_Valid, MLV_NotObjectType, MLV_IncompleteVoidType, MLV_DuplicateVectorComponents, MLV_InvalidExpression, MLV_LValueCast, MLV_IncompleteType, MLV_ConstQualified, MLV_ArrayType, MLV_NotBlockQualified, MLV_ReadonlyProperty, MLV_NoSetterProperty, MLV_MemberFunction, MLV_SubObjCPropertySetting, MLV_InvalidMessageExpression, MLV_ClassTemporary } |
| enum | SideEffectsKind { SE_NoSideEffects, SE_AllowSideEffects } |
| enum | NullPointerConstantKind { NPCK_NotNull = 0, NPCK_ZeroInteger, NPCK_CXX0X_nullptr, NPCK_GNUNull } |
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant(). More... | |
| enum | NullPointerConstantValueDependence { NPC_NeverValueDependent = 0, NPC_ValueDependentIsNull, NPC_ValueDependentIsNotNull } |
Enumeration used to describe how isNullPointerConstant() should cope with value-dependent expressions. More... | |
| enum | CanThrowResult { CT_Cannot, CT_Dependent, CT_Can } |
| Result type of CanThrow(). More... | |
Public Member Functions | |
| QualType | getType () const |
| void | setType (QualType t) |
| bool | isValueDependent () const |
| void | setValueDependent (bool VD) |
| Set whether this expression is value-dependent or not. | |
| bool | isTypeDependent () const |
| void | setTypeDependent (bool TD) |
| Set whether this expression is type-dependent or not. | |
| 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. | |
| void | setInstantiationDependent (bool ID) |
| Set whether this expression is instantiation-dependent or not. | |
| bool | containsUnexpandedParameterPack () const |
| Whether this expression contains an unexpanded parameter pack (for C++0x variadic templates). | |
| void | setContainsUnexpandedParameterPack (bool PP=true) |
| Set the bit that describes whether this expression contains an unexpanded parameter pack. | |
| SourceLocation | getExprLoc () const |
| bool | isUnusedResultAWarning (SourceLocation &Loc, SourceRange &R1, SourceRange &R2, ASTContext &Ctx) const |
| bool | isLValue () const |
| bool | isRValue () const |
| bool | isXValue () const |
| bool | isGLValue () const |
| LValueClassification | ClassifyLValue (ASTContext &Ctx) const |
| Reasons why an expression might not be an l-value. | |
| isModifiableLvalueResult | isModifiableLvalue (ASTContext &Ctx, SourceLocation *Loc=0) const |
| Classification | Classify (ASTContext &Ctx) const |
| Classify - Classify this expression according to the C++0x expression taxonomy. | |
| Classification | ClassifyModifiable (ASTContext &Ctx, SourceLocation &Loc) const |
| ClassifyModifiable - Classify this expression according to the C++0x expression taxonomy, and see if it is valid on the left side of an assignment. | |
| ExprValueKind | getValueKind () const |
| getValueKind - The value kind that this expression produces. | |
| ExprObjectKind | getObjectKind () const |
| bool | isOrdinaryOrBitFieldObject () const |
| void | setValueKind (ExprValueKind Cat) |
| setValueKind - Set the value kind produced by this expression. | |
| void | setObjectKind (ExprObjectKind Cat) |
| setObjectKind - Set the object kind produced by this expression. | |
| FieldDecl * | getBitField () |
| If this expression refers to a bit-field, retrieve the declaration of that bit-field. | |
| const FieldDecl * | getBitField () const |
| const ObjCPropertyRefExpr * | getObjCProperty () const |
| If this expression is an l-value for an Objective C property, find the underlying property reference expression. | |
| bool | refersToVectorElement () const |
| Returns whether this expression refers to a vector element. | |
| bool | hasPlaceholderType () const |
| Returns whether this expression has a placeholder type. | |
| bool | hasPlaceholderType (BuiltinType::Kind K) const |
| Returns whether this expression has a specific placeholder type. | |
| bool | isKnownToHaveBooleanValue () const |
| bool | isIntegerConstantExpr (llvm::APSInt &Result, ASTContext &Ctx, SourceLocation *Loc=0, bool isEvaluated=true) const |
| bool | isIntegerConstantExpr (ASTContext &Ctx, SourceLocation *Loc=0) const |
| bool | isCXX11ConstantExpr (ASTContext &Ctx, APValue *Result=0, SourceLocation *Loc=0) const |
| bool | isConstantInitializer (ASTContext &Ctx, bool ForRef) const |
| bool | EvaluateAsRValue (EvalResult &Result, const ASTContext &Ctx) const |
| bool | EvaluateAsBooleanCondition (bool &Result, const ASTContext &Ctx) const |
| bool | EvaluateAsInt (llvm::APSInt &Result, const ASTContext &Ctx, SideEffectsKind AllowSideEffects=SE_NoSideEffects) const |
| bool | isEvaluatable (const ASTContext &Ctx) const |
| bool | HasSideEffects (const ASTContext &Ctx) const |
| llvm::APSInt | EvaluateKnownConstInt (const ASTContext &Ctx) const |
| bool | EvaluateAsLValue (EvalResult &Result, const ASTContext &Ctx) const |
| bool | EvaluateAsInitializer (APValue &Result, const ASTContext &Ctx, const VarDecl *VD, llvm::SmallVectorImpl< PartialDiagnosticAt > &Notes) const |
| NullPointerConstantKind | isNullPointerConstant (ASTContext &Ctx, NullPointerConstantValueDependence NPC) const |
| bool | isOBJCGCCandidate (ASTContext &Ctx) const |
| bool | isBoundMemberFunction (ASTContext &Ctx) const |
| Returns true if this expression is a bound member function. | |
| CanThrowResult | CanThrow (ASTContext &C) const |
| Test if this expression, if evaluated, might throw, according to the rules of C++ [expr.unary.noexcept]. | |
| Expr * | IgnoreImpCasts () |
| Expr * | IgnoreImplicit () |
| Expr * | IgnoreParens () |
| Expr * | IgnoreParenCasts () |
| Expr * | IgnoreParenImpCasts () |
| Expr * | IgnoreConversionOperator () |
| const Expr * | IgnoreConversionOperator () const |
| const Expr * | IgnoreParenImpCasts () const |
| Expr * | IgnoreParenLValueCasts () |
| const Expr * | IgnoreParenLValueCasts () const |
| Expr * | IgnoreParenNoopCasts (ASTContext &Ctx) |
| bool | isDefaultArgument () const |
| Determine whether this expression is a default function argument. | |
| bool | isTemporaryObject (ASTContext &Ctx, const CXXRecordDecl *TempTy) const |
| Determine whether the result of this expression is a temporary object of the given class type. | |
| bool | isImplicitCXXThis () const |
| Whether this expression is an implicit reference to 'this' in C++. | |
| const Expr * | IgnoreImpCasts () const |
| const Expr * | IgnoreParens () const |
| const Expr * | IgnoreParenCasts () const |
| const Expr * | IgnoreParenNoopCasts (ASTContext &Ctx) const |
Static Public Member Functions | |
| static ExprValueKind | getValueKindForType (QualType T) |
| static bool | isPotentialConstantExpr (const FunctionDecl *FD, llvm::SmallVectorImpl< PartialDiagnosticAt > &Diags) |
| static QualType | findBoundMemberType (const Expr *expr) |
| Given an expression of bound-member type, find the type of the member. Returns null if this is an *overloaded* bound member expression. | |
| static bool | hasAnyTypeDependentArguments (Expr **Exprs, unsigned NumExprs) |
| static bool | hasAnyValueDependentArguments (Expr **Exprs, unsigned NumExprs) |
| static bool | classof (const Stmt *T) |
| static bool | classof (const Expr *) |
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. | |
Expr - 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.
Result type of CanThrow().
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. |
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant().
Enumeration used to describe how isNullPointerConstant() should cope with value-dependent expressions.
| NPC_NeverValueDependent |
Specifies that the expression should never be value-dependent. |
| NPC_ValueDependentIsNull |
Specifies that a value-dependent expression of integral or dependent type should be considered a null pointer constant. |
| NPC_ValueDependentIsNotNull |
Specifies that a value-dependent expression should be considered to never be a null pointer constant. |
| clang::Expr::Expr | ( | StmtClass | SC, |
| QualType | T, | ||
| ExprValueKind | VK, | ||
| ExprObjectKind | OK, | ||
| bool | TD, | ||
| bool | VD, | ||
| bool | ID, | ||
| bool | ContainsUnexpandedParameterPack | ||
| ) | [inline, protected] |
Definition at line 59 of file Expr.h.
References clang::Stmt::ExprBits, and setType().
| clang::Expr::Expr | ( | StmtClass | SC, |
| EmptyShell | |||
| ) | [inline, explicit, protected] |
Construct an empty expression.
| Expr::CanThrowResult Expr::CanThrow | ( | ASTContext & | C | ) | const |
Test if this expression, if evaluated, might throw, according to the rules of C++ [expr.unary.noexcept].
Definition at line 1971 of file Expr.cpp.
References CanCalleeThrow(), CanDynamicCastThrow(), CanSubExprsThrow(), CanTypeidThrow(), clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_end(), CT_Can, CT_Cannot, CT_Dependent, clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), clang::CXXRecordDecl::getDestructor(), clang::Stmt::getStmtClass(), IgnoreParens(), clang::QualType::isNull(), isTypeDependent(), isValueDependent(), MergeCanThrow(), and clang::Stmt::NoStmtClass.
Referenced by clang::Sema::BuildCXXNoexceptExpr(), and clang::Sema::ImplicitExceptionSpecification::CalledExpr().
| Classification clang::Expr::Classify | ( | ASTContext & | Ctx | ) | const [inline] |
Classify - Classify this expression according to the C++0x expression taxonomy.
C++0x 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 325 of file Expr.h.
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::AddFunctionCandidates(), clang::Sema::AddMemberOperatorCandidates(), clang::Sema::AddSurrogateCandidate(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildOverloadedArrowExpr(), CanTypeidThrow(), clang::Sema::CheckPointerToMemberOperands(), ClassifyLValue(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), isTemporaryObject(), clang::Sema::PerformObjectArgumentInitialization(), clang::TryReferenceInit(), TryReferenceInitializationCore(), and clang::EvaluatedExprVisitor< ImplClass >::VisitCXXTypeidExpr().
| Expr::LValueClassification Expr::ClassifyLValue | ( | ASTContext & | Ctx | ) | const |
Reasons why an expression might not be an l-value.
Definition at line 597 of file ExprClassification.cpp.
References clang::Expr::Classification::CL_AddressableVoid, 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_ClassTemporary, LV_DuplicateVectorComponents, LV_IncompleteVoidType, LV_InvalidExpression, LV_InvalidMessageExpression, LV_MemberFunction, LV_NotObjectType, LV_SubObjCPropertySetting, and LV_Valid.
Referenced by CheckAddressOfOperand(), and isBoundMemberFunction().
| Classification clang::Expr::ClassifyModifiable | ( | ASTContext & | Ctx, |
| SourceLocation & | Loc | ||
| ) | const [inline] |
ClassifyModifiable - Classify this expression according to the C++0x 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 337 of file Expr.h.
Referenced by isModifiableLvalue().
| static bool clang::Expr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Stmt.
Reimplemented in clang::AtomicExpr, clang::PseudoObjectExpr, clang::AsTypeExpr, clang::BlockDeclRefExpr, clang::BlockExpr, clang::ExtVectorElementExpr, clang::GenericSelectionExpr, clang::ParenListExpr, clang::ImplicitValueInitExpr, clang::DesignatedInitExpr, clang::InitListExpr, clang::MaterializeTemporaryExpr, clang::VAArgExpr, clang::SubstNonTypeTemplateParmPackExpr, clang::GNUNullExpr, clang::ChooseExpr, clang::SubstNonTypeTemplateParmExpr, clang::SizeOfPackExpr, clang::ShuffleVectorExpr, clang::StmtExpr, clang::PackExpansionExpr, clang::AddrLabelExpr, clang::BinaryConditionalOperator, clang::CXXNoexceptExpr, clang::UnresolvedMemberExpr, clang::ConditionalOperator, clang::AbstractConditionalOperator, clang::CXXDependentScopeMemberExpr, clang::CompoundAssignOperator, clang::BinaryOperator, clang::CStyleCastExpr, clang::CXXUnresolvedConstructExpr, clang::ExplicitCastExpr, clang::ImplicitCastExpr, clang::CastExpr, clang::ExprWithCleanups, clang::DependentScopeDeclRefExpr, clang::CompoundLiteralExpr, clang::MemberExpr, clang::UnresolvedLookupExpr, clang::OverloadExpr, clang::CallExpr, clang::ExpressionTraitExpr, clang::ArraySubscriptExpr, clang::ArrayTypeTraitExpr, clang::UnaryExprOrTypeTraitExpr, clang::BinaryTypeTraitExpr, clang::UnaryTypeTraitExpr, clang::OffsetOfExpr, clang::CXXPseudoDestructorExpr, clang::UnaryOperator, clang::CXXDeleteExpr, clang::CXXNewExpr, clang::ParenExpr, clang::StringLiteral, clang::CXXScalarValueInitExpr, clang::ImaginaryLiteral, clang::LambdaExpr, clang::FloatingLiteral, clang::CharacterLiteral, clang::IntegerLiteral, clang::ObjCBridgedCastExpr, clang::ObjCIndirectCopyRestoreExpr, clang::PredefinedExpr, clang::DeclRefExpr, clang::ObjCIsaExpr, clang::CXXTemporaryObjectExpr, clang::CXXFunctionalCastExpr, clang::ObjCMessageExpr, clang::CXXConstructExpr, clang::CXXBindTemporaryExpr, clang::OpaqueValueExpr, clang::CXXDefaultArgExpr, clang::CXXThrowExpr, clang::CXXThisExpr, clang::CXXUuidofExpr, clang::CXXTypeidExpr, clang::ObjCPropertyRefExpr, clang::CXXNullPtrLiteralExpr, clang::CXXBoolLiteralExpr, clang::CXXConstCastExpr, clang::CXXReinterpretCastExpr, clang::CXXDynamicCastExpr, clang::CXXStaticCastExpr, clang::ObjCIvarRefExpr, clang::CXXNamedCastExpr, clang::ObjCProtocolExpr, clang::CUDAKernelCallExpr, clang::ObjCSelectorExpr, clang::CXXMemberCallExpr, clang::ObjCEncodeExpr, clang::CXXOperatorCallExpr, and clang::ObjCStringLiteral.
Definition at line 667 of file Expr.h.
References clang::Stmt::getStmtClass().
| static bool clang::Expr::classof | ( | const Expr * | ) | [inline, static] |
| bool clang::Expr::containsUnexpandedParameterPack | ( | ) | const [inline] |
Whether this expression contains an unexpanded parameter pack (for C++0x variadic templates).
Given the following function template:
template<typename F, typename ...Types> void forward(const F &f, Types &&...args) { f(static_cast<Types&&>(args)...); }
The expressions args and static_cast<Types&&>(args) both contain parameter packs.
Definition at line 167 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::AtomicExpr::AtomicExpr(), clang::CallExpr::CallExpr(), clang::Sema::CheckPackExpansion(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::CreateGenericSelectionExpr(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXNewExpr::CXXNewExpr(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::InitListExpr::InitListExpr(), clang::ParenListExpr::ParenListExpr(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), and clang::TreeTransform< Derived >::TransformExprs().
| bool Expr::EvaluateAsBooleanCondition | ( | bool & | Result, |
| const ASTContext & | Ctx | ||
| ) | const |
EvaluateAsBooleanCondition - Return true if this is a constant which we 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 5889 of file ExprConstant.cpp.
References EvaluateAsRValue(), HandleConversionToBool(), and clang::Expr::EvalResult::Val.
Referenced by EvaluatesAsFalse(), and EvaluatesAsTrue().
| bool Expr::EvaluateAsInitializer | ( | APValue & | Result, |
| const ASTContext & | Ctx, | ||
| const VarDecl * | VD, | ||
| llvm::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 5921 of file ExprConstant.cpp.
References CheckLiteralType(), clang::Expr::EvalStatus::Diag, EvaluateConstantExpression(), clang::ASTContext::getLangOptions(), getType(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::Expr::EvalStatus::HasSideEffects, isRecordType(), and isRValue().
Referenced by clang::VarDecl::evaluateValue().
| bool Expr::EvaluateAsInt | ( | llvm::APSInt & | Result, |
| const ASTContext & | Ctx, | ||
| SideEffectsKind | AllowSideEffects = SE_NoSideEffects |
||
| ) | 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 5898 of file ExprConstant.cpp.
References EvaluateAsRValue(), clang::APValue::getInt(), getType(), clang::Expr::EvalStatus::HasSideEffects, clang::APValue::isInt(), clang::isIntegralOrEnumerationType(), and clang::Expr::EvalResult::Val.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::CheckLogicalOperands(), clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), isIntegerConstantExpr(), TryToFixInvalidVariablyModifiedType(), and clang::ento::ExprEngine::VisitOffsetOfExpr().
| bool Expr::EvaluateAsLValue | ( | EvalResult & | Result, |
| const ASTContext & | Ctx | ||
| ) | 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 5912 of file ExprConstant.cpp.
References CheckLValueConstantExpression(), EvaluateLValue(), clang::Expr::EvalStatus::HasSideEffects, and clang::Expr::EvalResult::Val.
Referenced by clang::CodeGen::CodeGenModule::EmitConstantExpr(), and isConstantInitializer().
| bool Expr::EvaluateAsRValue | ( | EvalResult & | Result, |
| const ASTContext & | Ctx | ||
| ) | 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. 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.
EvaluateAsRValue - Return true if this is a constant which we can fold using any crazy technique (that has nothing to do with language standards) that we want to. If this function returns true, it returns the folded constant in Result. If this expression is a glvalue, an lvalue-to-rvalue conversion will be applied to the result.
Definition at line 5870 of file ExprConstant.cpp.
References clang::ASTContext::getLangOptions(), getType(), isRecordType(), isRValue(), and clang::Expr::EvalResult::Val.
Referenced by clang::Sema::CheckConvertedConstantExpression(), CheckEvalInICE(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenModule::EmitConstantExpr(), EvaluateAsBooleanCondition(), EvaluateAsInt(), EvaluateBuiltinConstantP(), EvaluateKnownConstInt(), isCXX11ConstantExpr(), isEvaluatable(), and clang::Sema::VerifyIntegerConstantExpression().
| APSInt Expr::EvaluateKnownConstInt | ( | const ASTContext & | Ctx | ) | 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 5968 of file ExprConstant.cpp.
References EvaluateAsRValue(), clang::APValue::getInt(), clang::APValue::isInt(), and clang::Expr::EvalResult::Val.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), CheckICE(), clang::CodeGen::CodeGenFunction::EmitCaseStmt(), clang::CodeGen::CodeGenFunction::EmitCaseStmtRange(), FindCaseStatementsForValue(), clang::FieldDecl::getBitWidthValue(), clang::ShuffleVectorExpr::getShuffleMaskIdx(), clang::ChooseExpr::isConditionTrue(), clang::ento::SubEngine::processSwitch(), and clang::Sema::VerifyIntegerConstantExpression().
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 1853 of file Expr.cpp.
References hasPlaceholderType(), and IgnoreParens().
Referenced by clang::CallExpr::getCallReturnType(), and clang::Sema::isExprCallable().
| FieldDecl * Expr::getBitField | ( | ) |
If this expression refers to a bit-field, retrieve the declaration of that bit-field.
Definition at line 2760 of file Expr.cpp.
References clang::BO_Comma, clang::CK_LValueToRValue, clang::CK_NoOp, getBitField(), IgnoreParens(), and clang::VK_RValue.
Referenced by CheckAlignOfExpr(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), getBitField(), clang::Sema::IsIntegralPromotion(), clang::ASTContext::isPromotableBitField(), clang::InitializationSequence::Perform(), and TryReferenceInitializationCore().
| const FieldDecl* clang::Expr::getBitField | ( | ) | const [inline] |
Definition at line 384 of file Expr.h.
References getBitField().
| SourceLocation Expr::getExprLoc | ( | ) | const |
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.
Reimplemented in clang::PseudoObjectExpr, clang::BinaryOperator, clang::MemberExpr, clang::ArraySubscriptExpr, clang::UnaryOperator, clang::ObjCIndirectCopyRestoreExpr, clang::ObjCIsaExpr, and clang::OpaqueValueExpr.
Definition at line 116 of file Expr.cpp.
References clang::Stmt::getStmtClass(), and clang::Stmt::NoStmtClass.
Referenced by clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::BuildOverloadedCallExpr(), clang::BuildRecoveryCallExpr(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVectorLiteral(), CheckAlignOfExpr(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckForConstantInitializer(), CheckForDanglingReferenceOrPointer(), checkIndirectCopyRestoreSource(), CheckLiteralType(), CheckLValueConstantExpression(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckObjCARCConversion(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CodeCompleteCall(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeduceAutoType(), clang::Sema::DefaultArgumentPromotion(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseConditionalForNull(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), diagnoseObjCARCConversion(), diagnoseRetainCycle(), diagnoseUnknownAnyExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EvalAndBitcastToAPInt(), Evaluate(), EvaluateCPlusPlus11IntegralConstantExpr(), EvaluateInteger(), EvaluateVarDeclInit(), ExtractSubobject(), clang::OpaqueValueExpr::getExprLoc(), clang::ObjCIndirectCopyRestoreExpr::getExprLoc(), clang::ArraySubscriptExpr::getExprLoc(), clang::PseudoObjectExpr::getExprLoc(), HandleBaseToDerivedCast(), HandleLValueToRValueConversion(), HandleOverflow(), clang::Sema::IgnoredValueConversions(), isCXX11ConstantExpr(), isUnusedResultAWarning(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MaybeConvertParenListExprToParenExpr(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::RebuildExprInCurrentInstantiation(), clang::Sema::RequireCompleteExprType(), clang::Sema::ResolveSingleFunctionTemplateSpecialization(), clang::Sema::tryToRecoverWithCall(), and clang::TryUserDefinedConversion().
| 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 2740 of file Expr.cpp.
References clang::BO_Comma, getObjectKind(), getValueKind(), IgnoreParenCasts(), clang::OK_ObjCProperty, and clang::VK_LValue.
| ExprObjectKind clang::Expr::getObjectKind | ( | ) | const [inline] |
getObjectKind - The object kind that this expression produces. Object kinds are meaningful only for expressions that yield an l-value or x-value.
Definition at line 360 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), BuildFieldReferenceExpr(), CheckAddressOfOperand(), CheckRealImagOperand(), ClassifyBinaryOp(), clang::PseudoObjectExpr::Create(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::CodeGen::CodeGenFunction::EmitCallArg(), getObjCProperty(), IsModifiable(), isOrdinaryOrBitFieldObject(), clang::Sema::PerformImplicitConversion(), TryReinterpretCast(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), and clang::ASTNodeImporter::VisitUnaryOperator().
| QualType clang::Expr::getType | ( | ) | const [inline] |
Definition at line 76 of file Expr.h.
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnAsmStmt(), clang::Sema::ActOnAsTypeExpr(), clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXNamedCast(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnInstanceMessage(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnObjCForCollectionOperand(), clang::Sema::ActOnReturnStmt(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::ActOnStmtExpr(), clang::Sema::AddConversionCandidate(), clang::Sema::AddFunctionCandidates(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddMemberOperatorCandidates(), clang::Sema::AddSurrogateCandidate(), AdjustFunctionParmAndArgTypesForDeduction(), AdjustRelatedResultType(), clang::Sema::ArgumentDependentLookup(), clang::BlockDeclRefExpr::BlockDeclRefExpr(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildArrayType(), clang::Sema::BuildBinOp(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), BuildCXXCastArgument(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildCXXUuidof(), clang::Sema::BuildExpressionTrait(), BuildFieldReferenceExpr(), buildGlobalBlock(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildOverloadedArrowExpr(), BuildOverloadedBinOp(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildUnaryOp(), clang::Sema::BuildVAArgExpr(), CanTypeidThrow(), CastForMoving(), clang::Sema::CheckAdditionOperands(), CheckAddressOfOperand(), CheckAggExprForMemSetUse(), checkArithmethicPointerOnNonFragileABI(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticNull(), checkArithmeticOpPointerOperand(), CheckArrow(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckAssignmentOperands(), checkAttrArgsAreLockableObjs(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckBooleanCondition(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckCastAlign(), CheckCommaOperands(), clang::Sema::CheckCompareOperands(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalConvertScalarsToVectors(), checkConditionalObjectPointersCompatibility(), clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), clang::Sema::CheckConvertedConstantExpression(), CheckCXX98CompatAccessibleCopy(), clang::Sema::CheckCXXThrowOperand(), CheckedIntArithmetic(), checkEnumComparison(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::CheckExtVectorCast(), CheckFallThroughForBody(), CheckForModifiableLvalue(), CheckICE(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckLiteralType(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckMemberOperatorAccess(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckObjCARCConversion(), clang::Sema::CheckPlaceholderExpr(), clang::checkPlaceholderForOverload(), clang::Sema::CheckPointerConversion(), checkPointerIntegerMismatch(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::checkPseudoObjectAssignment(), CheckRealImagOperand(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckStaticArrayArgument(), CheckStringInit(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorLogicalOperands(), clang::Sema::CheckVectorOperands(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyExprValueKind(), ClassifyInternal(), ClassifyMemberExpr(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteCase(), clang::Sema::CodeCompleteMemberReferenceExpr(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::CollectVRQualifiers(), clang::Sema::ConvertArgumentsForCall(), convertPointersToCompositeType(), clang::Sema::ConvertToIntegralOrEnumerationType(), CopyObject(), clang::CXXBindTemporaryExpr::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::TypeOfExprType::desugar(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAutoDeductionFailure(), diagnoseBadCast(), DiagnoseBadShiftValues(), clang::Sema::DiagnoseConditionalForNull(), diagnoseDistinctPointerComparison(), diagnoseFunctionPointerToVoidComparison(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), DiagnoseNarrowingInInitList(), diagnoseObjCARCConversion(), diagnosePointerIncompatibility(), DiagnoseSelfAssignment(), clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::CodeGenFunction::EmitAggExprToLValue(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), EmitAnyExprToExn(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(), clang::CodeGen::CodeGenFunction::EmitARCExtendBlockObject(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr(), clang::CodeGen::CodeGenFunction::EmitARCRetainScalarExpr(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBlockDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallExprLValue(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CodeGen::CodeGenFunction::EmitComplexExpr(), clang::CodeGen::CodeGenFunction::EmitComplexExprIntoAddr(), clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitConditionalOperatorLValue(), clang::CodeGen::CodeGenModule::EmitConstantExpr(), clang::CodeGen::CodeGenModule::EmitConstantInit(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXBindTemporaryLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructLValue(), clang::CodeGen::CodeGenFunction::EmitCXXDeleteExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidLValue(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitExprForReferenceBinding(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLambdaLValue(), emitLibraryCall(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerConversion(), clang::CodeGen::CodeGenFunction::EmitNullInitializationLValue(), clang::CodeGen::CodeGenFunction::EmitObjCEncodeExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCSelectorLValue(), clang::CodeGen::CodeGenFunction::EmitObjCStringLiteral(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(), clang::Sema::EmitRelatedResultTypeNote(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStmtExprLValue(), clang::CodeGen::CodeGenFunction::EmitStringLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitUnsupportedLValue(), clang::CodeGen::CodeGenFunction::EmitUnsupportedRValue(), EmitValToTemp(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), EvalAddr(), EvalAndBitcastToAPInt(), clang::ento::ExprEngine::evalEagerlyAssume(), Evaluate(), EvaluateArray(), EvaluateAsInitializer(), EvaluateAsInt(), EvaluateAsRValue(), EvaluateAsRValue(), EvaluateBuiltinClassifyType(), EvaluateBuiltinConstantP(), EvaluateComplex(), EvaluateConstantExpression(), EvaluateCPlusPlus11IntegralConstantExpr(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), EvaluateFloat(), EvaluateIntegerOrLValue(), EvaluateLValue(), EvaluateMemberPointer(), EvaluateObjectArgument(), EvaluatePointer(), EvaluateRecord(), EvaluateTemporary(), EvaluateVector(), EvaluateVoid(), ExprLooksBoolean(), clang::OverloadExpr::find(), clang::Sema::FindAssociatedClassesAndNamespaces(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), FindConditionalOverload(), clang::Sema::FixOverloadedFunctionReference(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), clang::CXXNewExpr::getAllocatedType(), GetAssumedMessageSendExprType(), clang::ArraySubscriptExpr::getBase(), clang::CallExpr::getCallReturnType(), clang::ento::SymbolManager::getConjuredSymbol(), clang::ento::SValBuilder::getConjuredSymbolVal(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), clang::Sema::getCopyElisionCandidate(), getDecltypeForExpr(), clang::CXXDeleteExpr::getDestroyedType(), getElementType(), clang::BlockExpr::getFunctionType(), clang::ArraySubscriptExpr::getIdx(), clang::LambdaExpr::getLambdaClass(), clang::CodeGen::CodeGenModule::getMemberPointerConstant(), getMostDerivedClassDecl(), clang::ExtVectorElementExpr::getNumElements(), GetNumNonZeroBytesInInit(), clang::ASTContext::getObjCEncodingForBlock(), GetPointeeAlignment(), clang::ObjCMessageExpr::getReceiverInterface(), clang::CXXMemberCallExpr::getRecordDecl(), clang::ento::CallOrObjCMessage::getResultType(), GetReturnType(), clang::ObjCPropertyRefExpr::getSetterArgType(), GetTypeBeforeIntegralPromotion(), clang::UnaryExprOrTypeTraitExpr::getTypeOfArgument(), clang::ASTContext::getTypeOfExprType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), clang::ento::StringRegion::getValueType(), clang::ento::CompoundLiteralRegion::getValueType(), clang::ento::CXXTempObjectRegion::getValueType(), HandleBaseToDerivedCast(), clang::Sema::HandleExprEvaluationContextForTypeof(), handleGuardedByAttr(), handleLockReturnedAttr(), HandleLValueToRValueConversion(), HandleMemberPointerAccess(), hasPlaceholderType(), clang::Sema::IgnoredValueConversions(), IgnoreParenNoopCasts(), clang::Sema::ImpCastExprToType(), clang::BadConversionSequence::init(), clang::InitializationSequence::InitializationSequence(), clang::Sema::InvalidOperands(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::ExtVectorElementExpr::isArrow(), isConstantInitializer(), clang::Sema::isExprCallable(), isIntOrBool(), isKnownToHaveBooleanValue(), IsModifiable(), isNullPointerConstant(), clang::isNullPointerConstantForConversion(), IsReadonlyProperty(), clang::ASTContext::isSentinelNullExpr(), isSimpleArrayDecayOperand(), isSimpleZero(), clang::IsStandardConversion(), isTemporaryObject(), clang::IsTransparentUnionStandardConversion(), isUnusedResultAWarning(), clang::IsUserDefinedConversion(), clang::AtomicExpr::isVolatile(), LookupMethodInReceiverType(), clang::ento::SValBuilder::makeIntVal(), clang::Sema::MaybeBindToTemporary(), maybeExtendBlockObject(), maybeRebuildARCConsumingStmt(), clang::Sema::NoteAllOverloadCandidates(), clang::ento::ConditionBRVisitor::patternMatch(), clang::InitializationSequence::Perform(), clang::Sema::PerformContextuallyConvertToBool(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformMemberExprBaseConversion(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrepareCastToObjCObjectPointer(), clang::Sema::PrepareScalarCast(), print_elem(), clang::APValue::printPretty(), clang::ento::SubEngine::processSwitch(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), clang::TreeTransform< Derived >::RebuildExtVectorElementExpr(), clang::TreeTransform< Derived >::RebuildMemberExpr(), clang::TreeTransform< Derived >::RebuildObjCIsaExpr(), clang::TreeTransform< Derived >::RebuildObjCIvarRefExpr(), clang::TreeTransform< Derived >::RebuildObjCMessageExpr(), clang::TreeTransform< Derived >::RebuildObjCPropertyRefExpr(), RecoverCastedSymbol(), clang::Sema::recreateSyntacticForm(), refersToVectorElement(), clang::Sema::RequireCompleteExprType(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), clang::InitializationSequence::RewrapReferenceInitList(), clang::Sema::SemaBuiltinShuffleVector(), clang::BadConversionSequence::setFromExpr(), setObjCGCLValueClass(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue(), shouldEmitSeparateBlockRetain(), shouldExtendReceiverForInnerPointerMessage(), ShouldTryAgainWithRedefinitionType(), TryClassUnification(), TryConstCast(), tryDiagnoseOverloadedCast(), tryEmitARCRetainLoadOfScalar(), tryEmitARCRetainScalarExpr(), clang::TryImplicitConversion(), clang::TryListConversion(), TryLValueToRValueCast(), tryObjCWritebackConversion(), clang::TryReferenceInit(), TryReferenceInitialization(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticReferenceDowncast(), clang::TryUserDefinedConversion(), TryUserDefinedConversion(), clang::Sema::UsualArithmeticConversions(), clang::Sema::UsualUnaryConversions(), clang::Sema::VerifyIntegerConstantExpression(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCast(), clang::ASTNodeImporter::VisitCharacterLiteral(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ento::ConditionBRVisitor::VisitConditionVariable(), clang::ASTNodeImporter::VisitCStyleCastExpr(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitCXXThisExpr(), clang::EvaluatedExprVisitor< ImplClass >::VisitCXXTypeidExpr(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ASTNodeImporter::VisitIntegerLiteral(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::ExprEngine::VisitLvalArraySubscriptExpr(), clang::ento::ExprEngine::VisitOffsetOfExpr(), clang::ASTNodeImporter::VisitUnaryExprOrTypeTraitExpr(), and clang::ASTNodeImporter::VisitUnaryOperator().
| ExprValueKind clang::Expr::getValueKind | ( | ) | const [inline] |
getValueKind - The value kind that this expression produces.
Definition at line 353 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::BuildCXXTypeId(), BuildFieldReferenceExpr(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkUnknownAnyCast(), ClassifyInternal(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), EvalVal(), clang::Sema::FixOverloadedFunctionReference(), getObjCProperty(), clang::MaterializeTemporaryExpr::isBoundToLvalueReference(), isGLValue(), isLValue(), isRValue(), isXValue(), maybeRebuildARCConsumingStmt(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::TreeTransform< Derived >::RebuildMemberExpr(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitCStyleCastExpr(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), and clang::ASTNodeImporter::VisitUnaryOperator().
| static ExprValueKind clang::Expr::getValueKindForType | ( | QualType | T | ) | [inline, static] |
getValueKindForType - Given a formal return or parameter type, give its value kind.
Definition at line 343 of file Expr.h.
References clang::VK_LValue, clang::VK_RValue, and clang::VK_XValue.
Referenced by clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckMessageArgumentTypes(), EvaluateBinaryTypeTrait(), GenerateInjectedTemplateArgs(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), and TryReinterpretCast().
| bool Expr::hasAnyTypeDependentArguments | ( | Expr ** | Exprs, |
| unsigned | NumExprs | ||
| ) | [static] |
hasAnyTypeDependentArguments - Determines if any of the expressions in Exprs is type-dependent.
Definition at line 2516 of file Expr.cpp.
References isTypeDependent().
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::CodeCompleteCall(), and clang::InitializationSequence::InitializationSequence().
| bool Expr::hasAnyValueDependentArguments | ( | Expr ** | Exprs, |
| unsigned | NumExprs | ||
| ) | [static] |
hasAnyValueDependentArguments - Determines if any of the expressions in Exprs is value-dependent.
Definition at line 2526 of file Expr.cpp.
References isValueDependent().
| bool clang::Expr::hasPlaceholderType | ( | ) | const [inline] |
Returns whether this expression has a placeholder type.
Definition at line 396 of file Expr.h.
References getType().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::BuildInstanceMessage(), CheckArrow(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckMessageArgumentTypes(), ClassifyBinaryOp(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::Sema::diagnoseARCUnbridgedCast(), findBoundMemberType(), clang::Sema::IgnoredValueConversions(), clang::Sema::recreateSyntacticForm(), and clang::Sema::stripARCUnbridgedCast().
| bool clang::Expr::hasPlaceholderType | ( | BuiltinType::Kind | K | ) | const [inline] |
Returns whether this expression has a specific placeholder type.
Definition at line 401 of file Expr.h.
References getType(), and clang::BuiltinType::isPlaceholderTypeKind().
| bool Expr::HasSideEffects | ( | const ASTContext & | Ctx | ) | const |
HasSideEffects - This routine returns true for all those expressions which must be evaluated each time and must not be optimized away or evaluated at compile time. Example is a function call, volatile variable read.
Definition at line 5964 of file ExprConstant.cpp.
Referenced by clang::ASTContext::DeclMustBeEmitted(), clang::arcmt::trans::hasSideEffects(), and clang::InitializationSequence::InitializationSequence().
| Expr * Expr::IgnoreConversionOperator | ( | ) |
IgnoreConversionOperator - Ignore conversion operator. If this Expr is a call to a conversion operator, return the argument.
Definition at line 2332 of file Expr.cpp.
Referenced by IgnoreConversionOperator(), and IsArithmeticBinaryExpr().
| const Expr* clang::Expr::IgnoreConversionOperator | ( | ) | const [inline] |
Definition at line 614 of file Expr.h.
References IgnoreConversionOperator().
| Expr * clang::Expr::IgnoreImpCasts | ( | ) | [inline] |
IgnoreImpCasts - Skip past any implicit casts which might surround this expression. Only skips ImplicitCastExprs.
Definition at line 2619 of file Expr.h.
Referenced by CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTemplateArgumentPointerToMember(), IgnoreImpCasts(), IsArithmeticBinaryExpr(), and clang::ConversionFixItGenerator::tryToFixConversion().
| const Expr* clang::Expr::IgnoreImpCasts | ( | ) | const [inline] |
Definition at line 651 of file Expr.h.
References IgnoreImpCasts().
| Expr* clang::Expr::IgnoreImplicit | ( | ) | [inline] |
IgnoreImplicit - Skip past any implicit AST nodes which might surround this expression.
Reimplemented from clang::Stmt.
Definition at line 594 of file Expr.h.
Referenced by clang::Sema::CodeCompleteCase(), clang::CXXConstructorDecl::getTargetConstructor(), and IsCallableWithAppend().
| Expr * Expr::IgnoreParenCasts | ( | ) |
IgnoreParenCasts - Ignore parentheses and casts. Strip off any ParenExpr or CastExprs, returning their operand.
IgnoreParenCasts - Ignore parentheses and casts. Strip off any ParenExpr or CastExprs or ImplicitCastExprs, returning their operand.
Definition at line 2219 of file Expr.cpp.
References P, and clang::UO_Extension.
Referenced by clang::Sema::BuildCallToMemberFunction(), CheckBuiltinAnnotationString(), clang::Sema::CheckCompareOperands(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckICE(), CheckIndirectionOperand(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteCase(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), findCapturingExpr(), GenerateMinimalPathDiagnostic(), clang::CallExpr::getCalleeDecl(), getIncrementedVar(), getObjCProperty(), getStrlenExprArg(), handleAliasAttr(), handleVisibilityAttr(), handleWeakRefAttr(), clang::arcmt::trans::hasSideEffects(), ignoreLiteralAdditions(), IgnoreParenCasts(), InitExprContainsUninitializedFields(), isCapturedBy(), IsControlFlowExpr(), isEnclosingFunctionParam(), clang::arcmt::trans::isGlobalVar(), clang::ASTContext::isSentinelNullExpr(), clang::Sema::LookupMemberExpr(), clang::ento::ConditionBRVisitor::patternMatch(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), scan_ivar_release(), TryEvaluateBuiltinNaN(), and clang::ConversionFixItGenerator::tryToFixConversion().
| const Expr* clang::Expr::IgnoreParenCasts | ( | ) | const [inline] |
Definition at line 657 of file Expr.h.
References IgnoreParenCasts().
| Expr * Expr::IgnoreParenImpCasts | ( | ) |
IgnoreParenImpCasts - Ignore parentheses and implicit casts. Strip off any ParenExpr or ImplicitCastExprs, returning their operand.
Definition at line 2295 of file Expr.cpp.
References P, and clang::UO_Extension.
Referenced by checkArithmeticNull(), clang::Sema::CheckCompareOperands(), checkEnumComparison(), CheckForDanglingReferenceOrPointer(), CheckICE(), clang::Sema::CheckStaticArrayArgument(), clang::Sema::CheckVectorCompareOperands(), ClassifyMemberExpr(), clang::Sema::DiagnoseConditionalForNull(), DiagnoseSelfAssignment(), diagnoseUnknownAnyExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::Sema::EmitRelatedResultTypeNote(), ExprLooksBoolean(), clang::CallExpr::getCalleeDecl(), getSizeOfExprArg(), IgnoreParenImpCasts(), IsReadonlyMessage(), clang::Sema::LookupMemberExpr(), MakeObjCStringLiteralFixItHint(), and clang::ento::SubEngine::processSwitch().
| const Expr* clang::Expr::IgnoreParenImpCasts | ( | ) | const [inline] |
Definition at line 618 of file Expr.h.
References IgnoreParenImpCasts().
| Expr * Expr::IgnoreParenLValueCasts | ( | ) |
Ignore parentheses and lvalue casts. Strip off any ParenExpr and CastExprs that represent lvalue casts, returning their operand.
IgnoreParenLValueCasts - Ignore parentheses and lvalue-to-rvalue casts. This is intended purely as a temporary workaround for code that hasn't yet been rewritten to do the right thing about those casts, and may disappear along with the last internal use.
Definition at line 2260 of file Expr.cpp.
References clang::CK_LValueToRValue, P, and clang::UO_Extension.
Referenced by IgnoreParenLValueCasts(), and clang::Sema::isSelfExpr().
| const Expr* clang::Expr::IgnoreParenLValueCasts | ( | ) | const [inline] |
Definition at line 626 of file Expr.h.
References IgnoreParenLValueCasts().
| Expr * Expr::IgnoreParenNoopCasts | ( | ASTContext & | Ctx | ) |
IgnoreParenNoopCasts - Ignore parentheses and casts that do not change the value (including ptr->int casts of the same size). Strip off any ParenExpr or CastExprs, returning their operand.
Definition at line 2343 of file Expr.cpp.
References getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), P, and clang::UO_Extension.
Referenced by CheckAsmLValue(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), IgnoreParenNoopCasts(), stripCasts(), clang::ento::ConditionBRVisitor::VisitTerminator(), and clang::ento::ConditionBRVisitor::VisitTrueTest().
| const Expr* clang::Expr::IgnoreParenNoopCasts | ( | ASTContext & | Ctx | ) | const [inline] |
Definition at line 660 of file Expr.h.
References IgnoreParenNoopCasts().
| Expr * Expr::IgnoreParens | ( | ) |
IgnoreParens - Ignore parentheses. If this Expr is a ParenExpr, return its subexpression. If that subexpression is also a ParenExpr, then this method recursively returns its subexpression, and so forth. Otherwise, the method returns the current Expr.
Definition at line 2194 of file Expr.cpp.
References P, and clang::UO_Extension.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCXXThrow(), clang::Sema::BuildCallToMemberFunction(), CanThrow(), CheckAddressOfOperand(), CheckAlignOfExpr(), CheckForDanglingReferenceOrPointer(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::checkPseudoObjectAssignment(), clang::Sema::checkPseudoObjectIncDec(), clang::Sema::checkPseudoObjectRValue(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckVecStepExpr(), ClassifyInternal(), ClassifyMemberExpr(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::diagnoseARCUnbridgedCast(), clang::Sema::DiagnoseEqualityWithExtraParens(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), EmitExprForReferenceBinding(), EmitTypeidFromVTable(), EvalAddr(), clang::ento::ExprEngine::evalCallee(), EvalVal(), clang::OverloadExpr::find(), clang::Sema::FindAssociatedClassesAndNamespaces(), findBoundMemberType(), findRetainCycleOwner(), getBitField(), clang::Sema::getCopyElisionCandidate(), getDecltypeForExpr(), clang::ento::CallOrObjCMessage::getFunctionCallee(), clang::CXXMemberCallExpr::getImplicitObjectArgument(), clang::CXXMemberCallExpr::getMethodDecl(), getMostDerivedClassDecl(), GetNumNonZeroBytesInInit(), clang::CFGBlock::getTerminatorCondition(), IgnoreParens(), clang::InitializationSequence::InitializationSequence(), isCheapEnoughToEvaluateUnconditionally(), clang::Sema::isExprCallable(), isInvalidICRSource(), isKnownToHaveBooleanValue(), IsModifiable(), isOBJCGCCandidate(), isParenthesizedADLCallee(), isSimpleZero(), clang::IsStandardConversion(), IsStringInit(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), isUnusedResultAWarning(), clang::Sema::MaybeBindToTemporary(), refersToVectorElement(), clang::Sema::RequireCompleteExprType(), shouldEmitSeparateBlockRetain(), shouldExtendReceiverForInnerPointerMessage(), skipTemporaryBindingsNoOpCastsAndParens(), stripOpaqueValuesFromPseudoObjectRef(), tryEmitARCRetainLoadOfScalar(), tryEmitARCRetainScalarExpr(), clang::Sema::UpdateMarkingForLValueToRValue(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCompoundLiteralExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitLvalArraySubscriptExpr(), clang::ento::ExprEngine::VisitMemberExpr(), and clang::ento::ConditionBRVisitor::VisitTrueTest().
| const Expr* clang::Expr::IgnoreParens | ( | ) | const [inline] |
Definition at line 654 of file Expr.h.
References IgnoreParens().
| bool Expr::isBoundMemberFunction | ( | ASTContext & | Ctx | ) | const |
Returns true if this expression is a bound member function.
Definition at line 1847 of file Expr.cpp.
References ClassifyLValue(), isTypeDependent(), and LV_MemberFunction.
| bool Expr::isConstantInitializer | ( | ASTContext & | Ctx, |
| bool | ForRef | ||
| ) | 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.
Definition at line 2534 of file Expr.cpp.
References clang::CK_AtomicToNonAtomic, clang::CK_BitCast, clang::CK_ConstructorConversion, clang::CK_LValueToRValue, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_ToUnion, EvaluateAsLValue(), clang::CXXConstructExpr::getArg(), clang::CastExpr::getCastKind(), clang::CXXConstructExpr::getConstructor(), clang::InitListExpr::getInit(), clang::CXXConstructExpr::getNumArgs(), clang::InitListExpr::getNumInits(), clang::UnaryOperator::getOpcode(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::CastExpr::getSubExpr(), getType(), clang::Expr::EvalStatus::HasSideEffects, isConstantInitializer(), clang::CXXConstructExpr::isElidable(), isEvaluatable(), clang::FunctionDecl::isTrivial(), and clang::UO_Extension.
Referenced by clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckForConstantInitializer(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), isCheapEnoughToEvaluateUnconditionally(), and isConstantInitializer().
| bool Expr::isCXX11ConstantExpr | ( | ASTContext & | Ctx, |
| APValue * | Result = 0, |
||
| SourceLocation * | Loc = 0 |
||
| ) | 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 6429 of file ExprConstant.cpp.
References clang::Expr::EvalStatus::Diag, EvaluateAsRValue(), getExprLoc(), and clang::ASTContext::getLangOptions().
Referenced by EvaluateCPlusPlus11IntegralConstantExpr(), and clang::StandardConversionSequence::getNarrowingKind().
| 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 2395 of file Expr.cpp.
Referenced by clang::TreeTransform< Derived >::DropCallArgument(), and clang::CXXConstructExpr::getSourceRange().
| bool Expr::isEvaluatable | ( | const ASTContext & | Ctx | ) | 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 5959 of file ExprConstant.cpp.
References EvaluateAsRValue(), and clang::Expr::EvalStatus::HasSideEffects.
Referenced by clang::Sema::ActOnAsmStmt(), clang::Sema::AddInitializerToDecl(), EvaluateBuiltinConstantP(), and isConstantInitializer().
| bool clang::Expr::isGLValue | ( | ) | const [inline] |
Definition at line 204 of file Expr.h.
References getValueKind(), and clang::VK_RValue.
Referenced by clang::Sema::ActOnConditionalOp(), CheckLValueConstantExpression(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultLvalueConversion(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitConditionalOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), EmitExprForReferenceBinding(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), Evaluate(), EvaluateAsRValue(), EvaluateBuiltinConstantP(), EvaluateLValue(), EvaluateObjectArgument(), hasTrivialGetExpr(), clang::IsStandardConversion(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue(), TryLValueToRValueCast(), and tryObjCWritebackConversion().
| bool Expr::isImplicitCXXThis | ( | ) | const |
Whether this expression is an implicit reference to 'this' in C++.
Definition at line 2472 of file Expr.cpp.
References clang::CK_DerivedToBase, clang::CK_LValueToRValue, clang::CK_NoOp, clang::CK_UncheckedDerivedToBase, and clang::UO_Extension.
Referenced by clang::MemberExpr::isImplicitAccess(), clang::CXXDependentScopeMemberExpr::isImplicitAccess(), and clang::UnresolvedMemberExpr::isImplicitAccess().
| bool clang::Expr::isInstantiationDependent | ( | ) | const [inline] |
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template parameter, even if neither its type nor (constant) value can change due to the template instantiation.
In the following example, the expression sizeof(sizeof(T() + T())) is instantiation-dependent (since it involves a template parameter T), but is neither type- nor value-dependent, since the type of the inner sizeof is known (std::size_t) and therefore the size of the outer sizeof is known.
template<typename T> void f(T x, T y) { sizeof(sizeof(T() + T()); }
Definition at line 144 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::AtomicExpr::AtomicExpr(), clang::CallExpr::CallExpr(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXNewExpr::CXXNewExpr(), clang::ASTContext::getDecltypeType(), clang::InitListExpr::InitListExpr(), clang::TemplateArgument::isInstantiationDependent(), clang::DecltypeType::isSugared(), clang::ParenListExpr::ParenListExpr(), and clang::ShuffleVectorExpr::ShuffleVectorExpr().
| bool Expr::isIntegerConstantExpr | ( | llvm::APSInt & | Result, |
| ASTContext & | Ctx, | ||
| SourceLocation * | Loc = 0, |
||
| 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 6417 of file ExprConstant.cpp.
References EvaluateAsInt(), EvaluateCPlusPlus11IntegralConstantExpr(), and clang::ASTContext::getLangOptions().
Referenced by clang::Sema::ActOnPragmaPack(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExtVectorType(), clang::Sema::CheckCaseExpression(), clang::VarDecl::checkInitIsICE(), clang::Sema::CheckRegparmAttr(), DiagnoseBadShiftValues(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::StandardConversionSequence::getNarrowingKind(), clang::FunctionProtoType::getNoexceptSpec(), HandleAddressSpaceTypeAttribute(), handleConstructorAttr(), handleDestructorAttr(), handleFormatArgAttr(), handleFormatAttr(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), HandleMSP430InterruptAttr(), HandleNeonVectorTypeAttr(), handleNonNullAttr(), HandleOpenCLImageAccessAttribute(), handleOwnershipAttr(), handleReqdWorkGroupSize(), handleSentinelAttr(), HandleVectorSizeAttr(), isNullPointerConstant(), clang::Sema::SemaBuiltinShuffleVector(), and clang::Sema::VerifyIntegerConstantExpression().
| bool Expr::isIntegerConstantExpr | ( | ASTContext & | Ctx, |
| SourceLocation * | Loc = 0 |
||
| ) | const |
Definition at line 6405 of file ExprConstant.cpp.
References CheckICE(), EvaluateCPlusPlus11IntegralConstantExpr(), and clang::ASTContext::getLangOptions().
| 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 39 of file Expr.cpp.
References clang::BO_And, clang::BO_Assign, clang::BO_Comma, clang::BO_EQ, clang::BO_GE, clang::BO_GT, clang::BO_LAnd, clang::BO_LE, clang::BO_LOr, clang::BO_LT, clang::BO_NE, clang::BO_Or, clang::BO_Xor, getType(), IgnoreParens(), and clang::UO_Plus.
Referenced by clang::Sema::ActOnFinishSwitchStmt().
| bool clang::Expr::isLValue | ( | ) | const [inline] |
isLValue - True if this expression is an "l-value" according to the rules of the current language. C and C++ give somewhat different rules for this concept, but in general, the result of an l-value expression identifies a specific object whereas the result of an r-value expression is a value detached from any specific storage.
C++0x 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 201 of file Expr.h.
References getValueKind(), and clang::VK_LValue.
Referenced by clang::Sema::ActOnObjCForCollectionStmt(), AdjustFunctionParmAndArgTypesForDeduction(), CheckAsmLValue(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), EvaluateExpressionTrait(), getDecltypeForExpr(), clang::ento::CallOrObjCMessage::getResultType(), HandleLValueToRValueConversion(), TryClassUnification(), TryConstCast(), TryReinterpretCast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCompoundLiteralExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitLvalArraySubscriptExpr(), and clang::ento::ExprEngine::VisitMemberExpr().
| Expr::isModifiableLvalueResult Expr::isModifiableLvalue | ( | ASTContext & | Ctx, |
| SourceLocation * | Loc = 0 |
||
| ) | const |
Definition at line 616 of file ExprClassification.cpp.
References clang::Expr::Classification::CL_AddressableVoid, 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_ConstQualified, 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_NotBlockQualified, clang::Expr::Classification::CM_RValue, clang::Expr::Classification::CM_Untested, clang::Expr::Classification::getKind(), clang::Expr::Classification::getModifiable(), MLV_ArrayType, MLV_ClassTemporary, MLV_ConstQualified, MLV_DuplicateVectorComponents, MLV_IncompleteType, MLV_IncompleteVoidType, MLV_InvalidExpression, MLV_InvalidMessageExpression, MLV_LValueCast, MLV_MemberFunction, MLV_NoSetterProperty, MLV_NotBlockQualified, 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. The return value can further distinguish the kind of NULL pointer constant that was detected.
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. 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 2660 of file Expr.cpp.
References clang::Type::getAs(), clang::ASTContext::getLangOptions(), getType(), clang::QualType::hasQualifiers(), isIntegerConstantExpr(), isNullPointerConstant(), isTypeDependent(), isValueDependent(), NPC_NeverValueDependent, NPC_ValueDependentIsNotNull, NPC_ValueDependentIsNull, NPCK_CXX0X_nullptr, NPCK_GNUNull, NPCK_NotNull, and NPCK_ZeroInteger.
Referenced by clang::Sema::BuildCXXUuidof(), clang::Sema::BuildInstanceMessage(), clang::Sema::CheckCompareOperands(), checkConditionalNullPointer(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckStaticArrayArgument(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::DiagnoseConditionalForNull(), clang::Sema::FindCompositePointerType(), isInvalidICRSource(), clang::Sema::IsMemberPointerConversion(), isNullPointerConstant(), clang::isNullPointerConstantForConversion(), clang::ASTContext::isSentinelNullExpr(), and clang::Sema::PrepareScalarCast().
| 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 1802 of file Expr.cpp.
References clang::MemberExpr::getBase(), clang::ASTContext::getObjCGCAttrKind(), clang::Stmt::getStmtClass(), IgnoreParens(), isOBJCGCCandidate(), and clang::Qualifiers::Weak.
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), and isOBJCGCCandidate().
| bool clang::Expr::isOrdinaryOrBitFieldObject | ( | ) | const [inline] |
Definition at line 364 of file Expr.h.
References getObjectKind(), clang::OK_BitField, and clang::OK_Ordinary.
Referenced by clang::Sema::ActOnConditionalOp(), and clang::Sema::CXXCheckConditionalOperands().
| bool Expr::isPotentialConstantExpr | ( | const FunctionDecl * | FD, |
| llvm::SmallVectorImpl< PartialDiagnosticAt > & | Diags | ||
| ) | [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 6454 of file ExprConstant.cpp.
References Args, clang::Expr::EvalStatus::Diag, clang::Decl::getASTContext(), clang::FunctionDecl::getBody(), clang::CXXRecordDecl::getCanonicalDecl(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), HandleConstructorCall(), HandleFunctionCall(), clang::DeclContext::isDependentContext(), and clang::CXXMethodDecl::isInstance().
Referenced by clang::Sema::CheckConstexprFunctionBody().
| bool clang::Expr::isRValue | ( | ) | const [inline] |
Definition at line 202 of file Expr.h.
References getValueKind(), and clang::VK_RValue.
Referenced by clang::Sema::BuildArrayType(), BuildMemberExpr(), checkIndirectCopyRestoreSource(), CheckLiteralType(), ClassifyInternal(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), emitPseudoObjectExpr(), EvaluateArray(), EvaluateAsBooleanCondition(), EvaluateAsInitializer(), EvaluateAsRValue(), EvaluateComplex(), EvaluateConstantExpression(), EvaluateExpressionTrait(), EvaluateFloat(), EvaluateIntegerOrLValue(), EvaluateMemberPointer(), EvaluatePointer(), EvaluateRecord(), EvaluateTemporary(), EvaluateVector(), EvaluateVoid(), EvalVal(), clang::Sema::IgnoredValueConversions(), clang::Sema::ImpCastExprToType(), clang::Sema::MaybeBindToTemporary(), and maybeExtendBlockObject().
| 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 2434 of file Expr.cpp.
References clang::CK_DerivedToBase, clang::CK_UncheckedDerivedToBase, Classify(), getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::Classification::isPRValue(), and skipTemporaryBindingsNoOpCastsAndParens().
Referenced by clang::Sema::BuildCXXConstructExpr(), CopyObject(), and clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr().
| bool clang::Expr::isTypeDependent | ( | ) | const [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:
template<typename T> void add(T x, int y) { x + y; }
Definition at line 118 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnAsmStmt(), clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCaseStmt(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXInClassMemberInitializer(), clang::Sema::ActOnDesignatedInitializer(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnObjCForCollectionOperand(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnPragmaPack(), clang::Sema::ActOnReturnStmt(), clang::Sema::ActOnStaticAssertDeclaration(), clang::Sema::ActOnStmtExpr(), clang::Sema::AddAlignedAttr(), clang::AtomicExpr::AtomicExpr(), clang::Sema::BuildArrayType(), clang::Sema::BuildBinOp(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildExpressionTrait(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVAArgExpr(), clang::CallExpr::CallExpr(), CanDynamicCastThrow(), CanThrow(), CanTypeidThrow(), CheckAddressOfOperand(), CheckAlignOfExpr(), CheckArrow(), CheckAsmLValue(), checkAttrArgsAreLockableObjs(), clang::Sema::CheckBooleanCondition(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckEnumConstant(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckNonTypeClassTemplatePartialSpecializationArgs(), clang::Sema::checkPseudoObjectAssignment(), clang::Sema::checkPseudoObjectIncDec(), CheckRealImagOperand(), clang::Sema::CheckRegparmAttr(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgumentPointerToMember(), clang::Sema::CheckVecStepExpr(), clang::Sema::CodeCompleteCall(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), DeduceNonTypeTemplateArgument(), clang::Sema::DiagnoseEqualityWithExtraParens(), EvalAddr(), EvalVal(), getDecltypeForExpr(), clang::ASTContext::getDependentSizedArrayType(), clang::ASTContext::getTypeOfExprType(), clang::BinaryTypeTraitExpr::getValue(), clang::ArrayTypeTraitExpr::getValue(), HandleAddressSpaceTypeAttribute(), handleConstructorAttr(), handleDestructorAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGuardedByAttr(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockReturnedAttr(), HandleNeonVectorTypeAttr(), handleNonNullAttr(), HandleOpenCLImageAccessAttribute(), handleOwnershipAttr(), handleReqdWorkGroupSize(), handleSentinelAttr(), HandleVectorSizeAttr(), hasAnyTypeDependentArguments(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::InitListExpr::InitListExpr(), isBoundMemberFunction(), isNullPointerConstant(), clang::isNullPointerConstantForConversion(), clang::ASTContext::isPromotableBitField(), clang::TypeOfExprType::isSugared(), clang::MultiInitializer::isTypeDependent(), isUnusedResultAWarning(), clang::OverloadExpr::OverloadExpr(), clang::ParenListExpr::ParenListExpr(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), clang::Sema::SemaBuiltinShuffleVector(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), and clang::Sema::VerifyBitField().
| bool Expr::isUnusedResultAWarning | ( | 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 Loc and Ranges with location to warn on and the source range[s] to report with the warning.
Definition at line 1532 of file Expr.cpp.
References clang::BO_Comma, clang::BO_LAnd, clang::BO_LOr, clang::CompoundStmt::body_back(), clang::CompoundStmt::body_empty(), clang::CK_ConstructorConversion, clang::CK_ToVoid, clang::CallExpr::getArg(), clang::Decl::getAttr(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), clang::ASTContext::getCanonicalType(), clang::CastExpr::getCastKind(), getExprLoc(), clang::Selector::getIdentifierInfoForSlot(), clang::ASTContext::getLangOptions(), clang::BinaryOperator::getLHS(), clang::ConditionalOperator::getLHS(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::ObjCMessageExpr::getMethodDecl(), clang::IdentifierInfo::getName(), 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::ConditionalOperator::getRHS(), clang::ObjCMessageExpr::getSelector(), clang::CXXOperatorCallExpr::getSourceRange(), clang::Stmt::getSourceRange(), clang::ObjCMessageExpr::getSourceRange(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::PseudoObjectExpr::getSyntacticForm(), getType(), IgnoreParens(), clang::BinaryOperator::isAssignmentOp(), clang::ObjCMessageExpr::isInstanceMessage(), isTypeDependent(), isUnusedResultAWarning(), clang::CanQual< T >::isVolatileQualified(), NumArgs, clang::UO_Deref, clang::UO_Extension, clang::UO_Imag, clang::UO_PostDec, clang::UO_PostInc, clang::UO_PreDec, clang::UO_PreInc, and clang::UO_Real.
Referenced by isUnusedResultAWarning().
| bool clang::Expr::isValueDependent | ( | ) | const [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.
template<int Size, char (&Chars)[Size]> struct meta_string;
Definition at line 98 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::ActOnCaseStmt(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnDesignatedInitializer(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnPragmaPack(), clang::Sema::ActOnStaticAssertDeclaration(), clang::Sema::AddAlignedAttr(), clang::Sema::AddInitializerToDecl(), clang::AtomicExpr::AtomicExpr(), clang::Sema::BuildArrayType(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExtVectorType(), clang::CallExpr::CallExpr(), CanThrow(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckEnumConstant(), CheckICE(), clang::VarDecl::checkInitIsICE(), clang::Sema::CheckLogicalOperands(), CheckNonTypeClassTemplatePartialSpecializationArgs(), clang::Sema::CheckRegparmAttr(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTemplateArgumentPointerToMember(), clang::CXXConstructExpr::CXXConstructExpr(), DeduceNonTypeTemplateArgument(), DiagnoseBadShiftValues(), DiagnoseNarrowingInInitList(), clang::Sema::DiagnoseSentinelCalls(), clang::VarDecl::evaluateValue(), EvaluateVarDeclInit(), clang::ASTContext::getDependentSizedArrayType(), clang::FunctionProtoType::getNoexceptSpec(), clang::SizeOfPackExpr::getPackLength(), HandleAddressSpaceTypeAttribute(), handleConstructorAttr(), handleDestructorAttr(), handleFormatArgAttr(), handleFormatAttr(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), HandleNeonVectorTypeAttr(), handleNonNullAttr(), HandleOpenCLImageAccessAttribute(), handleOwnershipAttr(), handleReqdWorkGroupSize(), handleSentinelAttr(), HandleVectorSizeAttr(), hasAnyValueDependentArguments(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::InitListExpr::InitListExpr(), isNullPointerConstant(), clang::isNullPointerConstantForConversion(), clang::ASTContext::isPromotableBitField(), clang::ParenListExpr::ParenListExpr(), clang::Sema::SemaBuiltinShuffleVector(), clang::ShuffleVectorExpr::ShuffleVectorExpr(), and clang::Sema::VerifyBitField().
| bool clang::Expr::isXValue | ( | ) | const [inline] |
Definition at line 203 of file Expr.h.
References getValueKind(), and clang::VK_XValue.
Referenced by tryEmitARCRetainLoadOfScalar().
| bool Expr::refersToVectorElement | ( | ) | const |
Returns whether this expression refers to a vector element.
Definition at line 2792 of file Expr.cpp.
References clang::CK_NoOp, getType(), IgnoreParens(), and clang::VK_RValue.
Referenced by clang::InitializationSequence::Perform(), and TryReferenceInitializationCore().
| void clang::Expr::setContainsUnexpandedParameterPack | ( | bool | PP = true | ) | [inline] |
Set the bit that describes whether this expression contains an unexpanded parameter pack.
Definition at line 173 of file Expr.h.
References clang::Stmt::ExprBits.
| void clang::Expr::setInstantiationDependent | ( | bool | ID | ) | [inline] |
Set whether this expression is instantiation-dependent or not.
Definition at line 149 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::MemberExpr::Create().
| void clang::Expr::setObjectKind | ( | ExprObjectKind | Cat | ) | [inline] |
setObjectKind - Set the object kind produced by this expression.
Definition at line 373 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::BuildDeclRefExpr().
| void clang::Expr::setType | ( | QualType | t | ) | [inline] |
Definition at line 77 of file Expr.h.
References clang::QualType::isNull().
Referenced by clang::Sema::ActOnInitList(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildVectorLiteral(), CheckStringInit(), ConstructTransparentUnion(), Expr(), clang::OverloadExpr::OverloadExpr(), clang::InitializationSequence::Perform(), clang::TreeTransform< Derived >::RebuildInitList(), and clang::Sema::RequireCompleteExprType().
| void clang::Expr::setTypeDependent | ( | bool | TD | ) | [inline] |
Set whether this expression is type-dependent or not.
Definition at line 121 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::BuildOverloadedCallExpr(), and clang::MemberExpr::Create().
| void clang::Expr::setValueDependent | ( | bool | VD | ) | [inline] |
Set whether this expression is value-dependent or not.
Definition at line 101 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::MemberExpr::Create().
| void clang::Expr::setValueKind | ( | ExprValueKind | Cat | ) | [inline] |
setValueKind - Set the value kind produced by this expression.
Definition at line 370 of file Expr.h.
References clang::Stmt::ExprBits.
Referenced by clang::Sema::BuildResolvedCallExpr(), and clang::InitializationSequence::Perform().