clang API Documentation
#include "clang/Sema/SemaInternal.h"#include "clang/Sema/DelayedDiagnostic.h"#include "clang/Sema/Initialization.h"#include "clang/Sema/Lookup.h"#include "clang/Sema/ScopeInfo.h"#include "clang/Sema/AnalysisBasedWarnings.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTMutationListener.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/EvaluatedExprVisitor.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/ExprObjC.h"#include "clang/AST/RecursiveASTVisitor.h"#include "clang/AST/TypeLoc.h"#include "clang/Basic/PartialDiagnostic.h"#include "clang/Basic/SourceManager.h"#include "clang/Basic/TargetInfo.h"#include "clang/Lex/LiteralSupport.h"#include "clang/Lex/Preprocessor.h"#include "clang/Sema/DeclSpec.h"#include "clang/Sema/Designator.h"#include "clang/Sema/Scope.h"#include "clang/Sema/ParsedTemplate.h"#include "clang/Sema/SemaFixItUtils.h"#include "clang/Sema/Template.h"#include "TreeTransform.h"#include "clang/AST/DeclNodes.inc"#include "clang/AST/BuiltinTypes.def"
Go to the source code of this file.
Defines | |
| #define | ABSTRACT_DECL(kind) |
| #define | VALUE(type, base) |
| #define | DECL(type, base) case Decl::type: |
| #define | BUILTIN_TYPE(Id, SingletonId) case BuiltinType::Id: |
| #define | PLACEHOLDER_TYPE(Id, SingletonId) |
Enumerations | |
| enum | |
Functions | |
| static void | CheckForNullPointerDereference (Sema &S, Expr *E) |
| static bool | handleIntegerToComplexFloatConversion (Sema &S, ExprResult &IntExpr, ExprResult &ComplexExpr, QualType IntTy, QualType ComplexTy, bool SkipCast) |
| Converts an integer to complex float type. Helper function of UsualArithmeticConversions() | |
| static QualType | handleComplexFloatToComplexFloatConverstion (Sema &S, ExprResult &LHS, ExprResult &RHS, QualType LHSType, QualType RHSType, bool IsCompAssign) |
| Takes two complex float types and converts them to the same type. Helper function of UsualArithmeticConversions() | |
| static QualType | handleOtherComplexFloatConversion (Sema &S, ExprResult &ComplexExpr, ExprResult &OtherExpr, QualType ComplexTy, QualType OtherTy, bool ConvertComplexExpr, bool ConvertOtherExpr) |
| Converts otherExpr to complex float and promotes complexExpr if necessary. Helper function of UsualArithmeticConversions() | |
| static QualType | handleComplexFloatConversion (Sema &S, ExprResult &LHS, ExprResult &RHS, QualType LHSType, QualType RHSType, bool IsCompAssign) |
| Handle arithmetic conversion with complex types. Helper function of UsualArithmeticConversions() | |
| static QualType | handleIntToFloatConversion (Sema &S, ExprResult &FloatExpr, ExprResult &IntExpr, QualType FloatTy, QualType IntTy, bool ConvertFloat, bool ConvertInt) |
| Hande arithmetic conversion from integer to float. Helper function of UsualArithmeticConversions() | |
| static QualType | handleFloatConversion (Sema &S, ExprResult &LHS, ExprResult &RHS, QualType LHSType, QualType RHSType, bool IsCompAssign) |
| Handle arithmethic conversion with floating point types. Helper function of UsualArithmeticConversions() | |
| static QualType | handleComplexIntConversion (Sema &S, ExprResult &LHS, ExprResult &RHS, QualType LHSType, QualType RHSType, bool IsCompAssign) |
| Handle conversions with GCC complex int extension. Helper function of UsualArithmeticConversions() | |
| static QualType | handleIntegerConversion (Sema &S, ExprResult &LHS, ExprResult &RHS, QualType LHSType, QualType RHSType, bool IsCompAssign) |
| Handle integer arithmetic conversions. Helper function of UsualArithmeticConversions() | |
| static bool | CheckDeclInExpr (Sema &S, SourceLocation Loc, NamedDecl *D) |
| static bool | shouldBuildBlockDeclRef (ValueDecl *D, Sema &S) |
| static bool | shouldAddConstQualToVarRef (ValueDecl *D, Sema &S) |
| static ExprResult | BuildBlockDeclRefExpr (Sema &S, ValueDecl *VD, const DeclarationNameInfo &NameInfo) |
| static bool | CheckVecStepTraitOperandType (Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange) |
| static bool | CheckExtensionTraitOperandType (Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) |
| static bool | CheckObjCTraitOperandConstraints (Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) |
| static bool | CheckAlignOfExpr (Sema &S, Expr *E) |
| static QualType | CheckRealImagOperand (Sema &S, ExprResult &V, SourceLocation Loc, bool IsReal) |
| static void | DiagnoseCalleeStaticArrayParam (Sema &S, ParmVarDecl *PVD) |
| static ExprResult | rebuildUnknownAnyFunction (Sema &S, Expr *fn) |
| static void | maybeExtendBlockObject (Sema &S, ExprResult &E) |
| Do an explicit extend of the given block pointer if we're in ARC. | |
| static bool | checkCondition (Sema &S, Expr *Cond) |
| Return false if the condition expression is valid, true otherwise. | |
| static bool | checkConditionalConvertScalarsToVectors (Sema &S, ExprResult &LHS, ExprResult &RHS, QualType CondTy) |
| Return false if the two expressions can be converted to a vector, true otherwise. | |
| static QualType | checkConditionalVoidType (Sema &S, ExprResult &LHS, ExprResult &RHS) |
| Handle when one or both operands are void type. | |
| static bool | checkConditionalNullPointer (Sema &S, ExprResult &NullExpr, QualType PointerTy) |
| Return false if the NullExpr can be promoted to PointerTy, true otherwise. | |
| static QualType | checkConditionalPointerCompatibility (Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) |
| Checks compatibility between two pointers and return the resulting type. | |
| static QualType | checkConditionalBlockPointerCompatibility (Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) |
| Return the resulting type when the operands are both block pointers. | |
| static QualType | checkConditionalObjectPointersCompatibility (Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) |
| Return the resulting type when the operands are both pointers. | |
| static bool | checkPointerIntegerMismatch (Sema &S, ExprResult &Int, Expr *PointerExpr, SourceLocation Loc, bool IsIntFirstExpr) |
| Return false if the first expression is not an integer and the second expression is not a pointer, true otherwise. | |
| static void | SuggestParentheses (Sema &Self, SourceLocation Loc, const PartialDiagnostic &Note, SourceRange ParenRange) |
| static bool | IsArithmeticOp (BinaryOperatorKind Opc) |
| static bool | IsArithmeticBinaryExpr (Expr *E, BinaryOperatorKind *Opcode, Expr **RHSExprs) |
| static bool | IsLogicOp (BinaryOperatorKind Opc) |
| static bool | ExprLooksBoolean (Expr *E) |
| static void | DiagnoseConditionalPrecedence (Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) |
| static Sema::AssignConvertType | checkPointerTypesForAssignment (Sema &S, QualType LHSType, QualType RHSType) |
| static Sema::AssignConvertType | checkBlockPointerTypesForAssignment (Sema &S, QualType LHSType, QualType RHSType) |
| static Sema::AssignConvertType | checkObjCPointerTypesForAssignment (Sema &S, QualType LHSType, QualType RHSType) |
| static void | ConstructTransparentUnion (Sema &S, ASTContext &C, ExprResult &EResult, QualType UnionType, FieldDecl *Field) |
| Constructs a transparent union from an expression that is used to initialize the transparent union. | |
| static void | checkArithmeticNull (Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompare) |
| static void | diagnoseArithmeticOnTwoVoidPointers (Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) |
| Diagnose invalid arithmetic on two void pointers. | |
| static void | diagnoseArithmeticOnVoidPointer (Sema &S, SourceLocation Loc, Expr *Pointer) |
| Diagnose invalid arithmetic on a void pointer. | |
| static void | diagnoseArithmeticOnTwoFunctionPointers (Sema &S, SourceLocation Loc, Expr *LHS, Expr *RHS) |
| Diagnose invalid arithmetic on two function pointers. | |
| static void | diagnoseArithmeticOnFunctionPointer (Sema &S, SourceLocation Loc, Expr *Pointer) |
| Diagnose invalid arithmetic on a function pointer. | |
| static bool | checkArithmeticIncompletePointerType (Sema &S, SourceLocation Loc, Expr *Operand) |
| Emit error if Operand is incomplete pointer type. | |
| static bool | checkArithmeticOpPointerOperand (Sema &S, SourceLocation Loc, Expr *Operand) |
| Check the validity of an arithmetic pointer operand. | |
| static bool | checkArithmeticBinOpPointerOperands (Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) |
| Check the validity of a binary arithmetic operation w.r.t. pointer operands. | |
| static bool | checkArithmethicPointerOnNonFragileABI (Sema &S, SourceLocation OpLoc, Expr *Op) |
| Check bad cases where we step over interface counts. | |
| static void | diagnosePointerIncompatibility (Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) |
| Emit error when two pointers are incompatible. | |
| static bool | isScopedEnumerationType (QualType T) |
| static void | DiagnoseBadShiftValues (Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc, QualType LHSType) |
| static bool | IsWithinTemplateSpecialization (Decl *D) |
| static void | checkEnumComparison (Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) |
| If two different enums are compared, raise a warning. | |
| static void | diagnoseDistinctPointerComparison (Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) |
| Diagnose bad pointer comparisons. | |
| static bool | convertPointersToCompositeType (Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) |
| Returns false if the pointers are converted to a composite type, true otherwise. | |
| static void | diagnoseFunctionPointerToVoidComparison (Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) |
| static bool | IsReadonlyProperty (Expr *E, Sema &S) |
| static bool | IsConstProperty (Expr *E, Sema &S) |
| static bool | IsReadonlyMessage (Expr *E, Sema &S) |
| static bool | CheckForModifiableLvalue (Expr *E, SourceLocation Loc, Sema &S) |
| static QualType | CheckCommaOperands (Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) |
| static QualType | CheckIncrementDecrementOperand (Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc, bool IsInc, bool IsPrefix) |
| static ValueDecl * | getPrimaryDecl (Expr *E) |
| static void | diagnoseAddressOfInvalidType (Sema &S, SourceLocation Loc, Expr *E, unsigned Type) |
| Diagnose invalid operand for address of operations. | |
| static QualType | CheckAddressOfOperand (Sema &S, ExprResult &OrigOp, SourceLocation OpLoc) |
| static QualType | CheckIndirectionOperand (Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc) |
| CheckIndirectionOperand - Type check unary indirection (prefix '*'). | |
| static BinaryOperatorKind | ConvertTokenKindToBinaryOpcode (tok::TokenKind Kind) |
| static UnaryOperatorKind | ConvertTokenKindToUnaryOpcode (tok::TokenKind Kind) |
| static void | DiagnoseSelfAssignment (Sema &S, Expr *LHSExpr, Expr *RHSExpr, SourceLocation OpLoc) |
| static void | DiagnoseBitwisePrecedence (Sema &Self, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) |
| static void | EmitDiagnosticForBitwiseAndInBitwiseOr (Sema &Self, SourceLocation OpLoc, BinaryOperator *Bop) |
| It accepts a '&' expr that is inside a '|' one. Emit a diagnostic together with a fixit hint that wraps the '&' expression in parentheses. | |
| static void | EmitDiagnosticForLogicalAndInLogicalOr (Sema &Self, SourceLocation OpLoc, BinaryOperator *Bop) |
| It accepts a '&&' expr that is inside a '||' one. Emit a diagnostic together with a fixit hint that wraps the '&&' expression in parentheses. | |
| static bool | EvaluatesAsTrue (Sema &S, Expr *E) |
| Returns true if the given expression can be evaluated as a constant 'true'. | |
| static bool | EvaluatesAsFalse (Sema &S, Expr *E) |
| Returns true if the given expression can be evaluated as a constant 'false'. | |
| static void | DiagnoseLogicalAndInLogicalOrLHS (Sema &S, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) |
| Look for '&&' in the left hand of a '||' expr. | |
| static void | DiagnoseLogicalAndInLogicalOrRHS (Sema &S, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) |
| Look for '&&' in the right hand of a '||' expr. | |
| static void | DiagnoseBitwiseAndInBitwiseOr (Sema &S, SourceLocation OpLoc, Expr *OrArg) |
| Look for '&' in the left or right hand of a '|' expr. | |
| static void | DiagnoseBinOpPrecedence (Sema &Self, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) |
| static ExprResult | BuildOverloadedBinOp (Sema &S, Scope *Sc, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHS, Expr *RHS) |
| Build an overloaded binary operator expression in the given scope. | |
| static bool | isQualifiedMemberAccess (Expr *E) |
| Determine whether the given expression is a qualified member access expression, of a form that could be turned into a pointer to member with the address-of operator. | |
| static Expr * | maybeRebuildARCConsumingStmt (Stmt *Statement) |
| static void | MakeObjCStringLiteralFixItHint (Sema &SemaRef, QualType DstType, Expr *SrcExpr, FixItHint &Hint) |
| bool | IsPotentiallyEvaluatedContext (Sema &SemaRef) |
| static void | diagnoseUncapturableValueReference (Sema &S, SourceLocation loc, VarDecl *var, DeclContext *DC) |
| static bool | shouldAddConstForScope (CapturingScopeInfo *CSI, VarDecl *VD) |
| static void | MarkVarDeclODRUsed (Sema &SemaRef, VarDecl *Var, SourceLocation Loc) |
| static void | DoMarkVarDeclReferenced (Sema &SemaRef, SourceLocation Loc, VarDecl *Var, Expr *E) |
| static void | MarkExprReferenced (Sema &SemaRef, SourceLocation Loc, Decl *D, Expr *E) |
| static ExprResult | diagnoseUnknownAnyExpr (Sema &S, Expr *E) |
| #define ABSTRACT_DECL | ( | kind | ) |
| #define BUILTIN_TYPE | ( | Id, | |
| SingletonId | |||
| ) | case BuiltinType::Id: |
| #define DECL | ( | type, | |
| base | |||
| ) | case Decl::type: |
| #define PLACEHOLDER_TYPE | ( | Id, | |
| SingletonId | |||
| ) |
| #define VALUE | ( | type, | |
| base | |||
| ) |
| anonymous enum |
Definition at line 7279 of file SemaExpr.cpp.
| static ExprResult BuildBlockDeclRefExpr | ( | Sema & | S, |
| ValueDecl * | VD, | ||
| const DeclarationNameInfo & | NameInfo | ||
| ) | [static] |
Definition at line 2123 of file SemaExpr.cpp.
References clang::Sema::Context, clang::DeclarationNameInfo::getLoc(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Sema::MarkBlockDeclRefReferenced(), clang::Sema::Owned(), and clang::VK_LValue.
Referenced by clang::Sema::BuildDeclarationNameExpr().
| static ExprResult BuildOverloadedBinOp | ( | Sema & | S, |
| Scope * | Sc, | ||
| SourceLocation | OpLoc, | ||
| BinaryOperatorKind | Opc, | ||
| Expr * | LHS, | ||
| Expr * | RHS | ||
| ) | [static] |
Build an overloaded binary operator expression in the given scope.
Definition at line 7916 of file SemaExpr.cpp.
References clang::Sema::CreateOverloadedBinOp(), clang::BinaryOperator::getOverloadedOperator(), clang::Expr::getType(), clang::Sema::LookupOverloadedOperatorName(), and clang::OO_None.
Referenced by clang::Sema::BuildBinOp().
| static QualType CheckAddressOfOperand | ( | Sema & | S, |
| ExprResult & | OrigOp, | ||
| SourceLocation | OpLoc | ||
| ) | [static] |
CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object. If it is an lvalue, the object cannot be declared with storage class register or be a bit field. Note: The usual conversions are *not* applied to the operand of the & operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue. In C++, the operand might be an overloaded function name, in which case we allow the '&' but retain the overloaded-function type.
Definition at line 7302 of file SemaExpr.cpp.
References clang::Sema::CheckPlaceholderExpr(), clang::Expr::ClassifyLValue(), clang::Sema::Context, clang::ASTContext::DependentTy, clang::Sema::Diag(), diagnoseAddressOfInvalidType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclRefExpr::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Sema::getLangOptions(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getObjectKind(), clang::DeclContext::getParent(), clang::ASTContext::getPointerType(), getPrimaryDecl(), clang::DeclRefExpr::getQualifier(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::Expr::IgnoreParens(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::DeclContext::isRecord(), clang::Sema::isSFINAEContext(), clang::Expr::isTypeDependent(), clang::Expr::LV_ClassTemporary, clang::Expr::LV_IncompleteVoidType, clang::Expr::LV_MemberFunction, clang::Expr::LV_Valid, clang::OK_BitField, clang::OK_VectorComponent, clang::ASTContext::OverloadTy, clang::SC_Register, clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::ASTContext::UnknownAnyTy, and clang::UO_Deref.
Referenced by clang::Sema::CreateBuiltinUnaryOp().
Definition at line 2748 of file SemaExpr.cpp.
References clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::Diag(), clang::Expr::getBitField(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParens(), clang::Expr::isTypeDependent(), and clang::UETT_AlignOf.
Referenced by clang::Sema::CreateUnaryExprOrTypeTraitExpr().
| static bool checkArithmethicPointerOnNonFragileABI | ( | Sema & | S, |
| SourceLocation | OpLoc, | ||
| Expr * | Op | ||
| ) | [static] |
Check bad cases where we step over interface counts.
Definition at line 5930 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::Sema::LangOpts.
Referenced by clang::Sema::CheckAdditionOperands(), CheckIncrementDecrementOperand(), and clang::Sema::CheckSubtractionOperands().
| static bool checkArithmeticBinOpPointerOperands | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
Check the validity of a binary arithmetic operation w.r.t. pointer operands.
This routine will diagnose any invalid arithmetic on pointer operands much like
Definition at line 5891 of file SemaExpr.cpp.
References checkArithmeticIncompletePointerType(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), clang::Sema::getLangOptions(), and clang::Expr::getType().
Referenced by clang::Sema::CheckSubtractionOperands().
| static bool checkArithmeticIncompletePointerType | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | Operand | ||
| ) | [static] |
Emit error if Operand is incomplete pointer type.
Definition at line 5840 of file SemaExpr.cpp.
References clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::PDiag(), and clang::Sema::RequireCompleteType().
Referenced by checkArithmeticBinOpPointerOperands(), and checkArithmeticOpPointerOperand().
| static void checkArithmeticNull | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompare | ||
| ) | [static] |
Definition at line 5692 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::Expr::IgnoreParenImpCasts().
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), and clang::Sema::CheckSubtractionOperands().
| static bool checkArithmeticOpPointerOperand | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | Operand | ||
| ) | [static] |
Check the validity of an arithmetic pointer operand.
If the operand has pointer type, this code will check for pointer types which are invalid in arithmetic operations. These will be diagnosed appropriately, including whether or not the use is supported as an extension.
Definition at line 5863 of file SemaExpr.cpp.
References checkArithmeticIncompletePointerType(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnVoidPointer(), clang::Sema::getLangOptions(), and clang::Expr::getType().
Referenced by clang::Sema::CheckAdditionOperands(), CheckIncrementDecrementOperand(), and clang::Sema::CheckSubtractionOperands().
| static Sema::AssignConvertType checkBlockPointerTypesForAssignment | ( | Sema & | S, |
| QualType | LHSType, | ||
| QualType | RHSType | ||
| ) | [static] |
checkBlockPointerTypesForAssignment - This routine determines whether two block pointer types are compatible or whether a block and normal pointer are compatible. It is more restrict than comparing two function pointer
Definition at line 5076 of file SemaExpr.cpp.
References clang::Sema::Compatible, clang::Sema::CompatiblePointerDiscardsQualifiers, clang::Sema::Context, clang::Sema::getLangOptions(), clang::Sema::IncompatibleBlockPointer, clang::QualType::isCanonical(), and clang::ASTContext::typesAreBlockPointerCompatible().
Referenced by clang::Sema::CheckAssignmentConstraints().
| static QualType CheckCommaOperands | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | Loc | ||
| ) | [static] |
Definition at line 7121 of file SemaExpr.cpp.
References clang::Sema::CheckPlaceholderExpr(), clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::Sema::DiagnoseUnusedExprResult(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getLangOptions(), clang::Expr::getType(), clang::Sema::IgnoredValueConversions(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::RequireCompleteType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CreateBuiltinBinOp().
Return false if the condition expression is valid, true otherwise.
Definition at line 4317 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOptions(), clang::Stmt::getLocStart(), and clang::Expr::getType().
Referenced by clang::Sema::CheckConditionalOperands().
| static QualType checkConditionalBlockPointerCompatibility | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | Loc | ||
| ) | [static] |
Return the resulting type when the operands are both block pointers.
Definition at line 4440 of file SemaExpr.cpp.
References checkConditionalPointerCompatibility(), clang::CK_BitCast, clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), clang::ActionResult< PtrTy, CompressInvalid >::take(), and clang::ASTContext::VoidTy.
Referenced by clang::Sema::CheckConditionalOperands().
| static bool checkConditionalConvertScalarsToVectors | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| QualType | CondTy | ||
| ) | [static] |
Return false if the two expressions can be converted to a vector, true otherwise.
Definition at line 4337 of file SemaExpr.cpp.
References clang::CK_IntegralCast, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getLocStart(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CheckConditionalOperands().
| static bool checkConditionalNullPointer | ( | Sema & | S, |
| ExprResult & | NullExpr, | ||
| QualType | PointerTy | ||
| ) | [static] |
Return false if the NullExpr can be promoted to PointerTy, true otherwise.
Definition at line 4377 of file SemaExpr.cpp.
References clang::CK_NullToPointer, clang::Sema::Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::ImpCastExprToType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNull, and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CheckConditionalOperands().
| static QualType checkConditionalObjectPointersCompatibility | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | Loc | ||
| ) | [static] |
Return the resulting type when the operands are both pointers.
Definition at line 4466 of file SemaExpr.cpp.
References checkConditionalPointerCompatibility(), clang::CK_BitCast, clang::CK_NoOp, clang::Sema::Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CheckConditionalOperands().
| static QualType checkConditionalPointerCompatibility | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | Loc | ||
| ) | [static] |
Checks compatibility between two pointers and return the resulting type.
Definition at line 4390 of file SemaExpr.cpp.
References clang::CK_BitCast, clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::Sema::ImpCastExprToType(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::ASTContext::typesAreCompatible(), and clang::ASTContext::VoidTy.
Referenced by checkConditionalBlockPointerCompatibility(), and checkConditionalObjectPointersCompatibility().
| static QualType checkConditionalVoidType | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS | ||
| ) | [static] |
Handle when one or both operands are void type.
Definition at line 4359 of file SemaExpr.cpp.
References clang::CK_ToVoid, clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getLocStart(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), clang::ActionResult< PtrTy, CompressInvalid >::take(), and clang::ASTContext::VoidTy.
Referenced by clang::Sema::CheckConditionalOperands().
| static bool CheckDeclInExpr | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| NamedDecl * | D | ||
| ) | [static] |
Diagnoses obvious problems with the use of the given declaration as an expression. This is only actually called for lookups that were not overloaded, and it doesn't promise that the declaration will in fact be used.
Definition at line 2032 of file SemaExpr.cpp.
References clang::Sema::Diag(), and clang::NamedDecl::getDeclName().
Referenced by clang::Sema::BuildDeclarationNameExpr().
| static void checkEnumComparison | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| ExprResult & | LHS, | ||
| ExprResult & | RHS | ||
| ) | [static] |
If two different enums are compared, raise a warning.
Definition at line 6228 of file SemaExpr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::EnumType::getDecl(), clang::NamedDecl::getIdentifier(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::hasSameUnqualifiedType(), and clang::Expr::IgnoreParenImpCasts().
Referenced by clang::Sema::CheckCompareOperands().
| static bool CheckExtensionTraitOperandType | ( | Sema & | S, |
| QualType | T, | ||
| SourceLocation | Loc, | ||
| SourceRange | ArgRange, | ||
| UnaryExprOrTypeTrait | TraitKind | ||
| ) | [static] |
Definition at line 2604 of file SemaExpr.cpp.
References clang::Sema::Diag(), and clang::UETT_SizeOf.
Referenced by clang::Sema::CheckUnaryExprOrTypeTraitOperand().
| static bool CheckForModifiableLvalue | ( | Expr * | E, |
| SourceLocation | Loc, | ||
| Sema & | S | ||
| ) | [static] |
CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not, emit an error and return true. If so, return false.
Definition at line 6931 of file SemaExpr.cpp.
References clang::Sema::Context, Diag(), clang::Sema::Diag(), clang::Sema::getCurMethodDecl(), clang::DeclRefExpr::getDecl(), clang::Sema::getLangOptions(), clang::ObjCMethodDecl::getSelfDecl(), clang::Stmt::getSourceRange(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Expr::IgnoreParenCasts(), clang::VarDecl::isARCPseudoStrong(), clang::ObjCMethodDecl::isClassMethod(), IsConstProperty(), clang::QualType::isConstQualified(), clang::Expr::isModifiableLvalue(), IsReadonlyMessage(), IsReadonlyProperty(), clang::Expr::MLV_ArrayType, clang::Expr::MLV_ClassTemporary, clang::Expr::MLV_ConstQualified, clang::Expr::MLV_DuplicateVectorComponents, clang::Expr::MLV_IncompleteType, clang::Expr::MLV_IncompleteVoidType, clang::Expr::MLV_InvalidExpression, clang::Expr::MLV_InvalidMessageExpression, clang::Expr::MLV_LValueCast, clang::Expr::MLV_MemberFunction, clang::Expr::MLV_NoSetterProperty, clang::Expr::MLV_NotBlockQualified, clang::Expr::MLV_NotObjectType, clang::Expr::MLV_ReadonlyProperty, clang::Expr::MLV_SubObjCPropertySetting, clang::Expr::MLV_Valid, clang::Sema::PDiag(), and clang::Sema::RequireCompleteType().
Referenced by clang::Sema::BuildVAArgExpr(), clang::Sema::CheckAssignmentOperands(), and CheckIncrementDecrementOperand().
Definition at line 320 of file SemaExpr.cpp.
References clang::Sema::Context, clang::Sema::DiagRuntimeBehavior(), clang::Expr::IgnoreParenCasts(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Sema::PDiag(), and clang::UO_Deref.
Referenced by clang::Sema::CheckAssignmentOperands(), and clang::Sema::DefaultLvalueConversion().
| static QualType CheckIncrementDecrementOperand | ( | Sema & | S, |
| Expr * | Op, | ||
| ExprValueKind & | VK, | ||
| SourceLocation | OpLoc, | ||
| bool | IsInc, | ||
| bool | IsPrefix | ||
| ) | [static] |
CheckIncrementDecrementOperand - unlike most "Check" methods, this routine doesn't need to call UsualUnaryConversions or UsualArithmeticConversions.
Definition at line 7154 of file SemaExpr.cpp.
References checkArithmethicPointerOnNonFragileABI(), checkArithmeticOpPointerOperand(), CheckForModifiableLvalue(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::Context, clang::ASTContext::DependentTy, clang::Sema::Diag(), clang::Type::getAs(), clang::Sema::getLangOptions(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::VK_LValue, and clang::VK_RValue.
Referenced by clang::Sema::CreateBuiltinUnaryOp().
| static QualType CheckIndirectionOperand | ( | Sema & | S, |
| Expr * | Op, | ||
| ExprValueKind & | VK, | ||
| SourceLocation | OpLoc | ||
| ) | [static] |
CheckIndirectionOperand - Type check unary indirection (prefix '*').
Definition at line 7461 of file SemaExpr.cpp.
References clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::Context, clang::ASTContext::DependentTy, clang::Sema::Diag(), clang::Sema::getLangOptions(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::QualType::isCForbiddenLValueType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::Sema::UsualUnaryConversions(), clang::VK_LValue, and clang::VK_RValue.
Referenced by clang::Sema::CreateBuiltinUnaryOp().
| static Sema::AssignConvertType checkObjCPointerTypesForAssignment | ( | Sema & | S, |
| QualType | LHSType, | ||
| QualType | RHSType | ||
| ) | [static] |
checkObjCPointerTypesForAssignment - Compares two objective-c pointer types for assignment compatibility.
Definition at line 5106 of file SemaExpr.cpp.
References clang::Sema::Compatible, clang::Sema::CompatiblePointerDiscardsQualifiers, clang::Sema::Context, clang::Sema::IncompatibleObjCQualifiedId, clang::Sema::IncompatiblePointer, clang::QualType::isAtLeastAsQualifiedAs(), clang::QualType::isCanonical(), and clang::ASTContext::typesAreCompatible().
Referenced by clang::Sema::CheckAssignmentConstraints().
| static bool CheckObjCTraitOperandConstraints | ( | Sema & | S, |
| QualType | T, | ||
| SourceLocation | Loc, | ||
| SourceRange | ArgRange, | ||
| UnaryExprOrTypeTrait | TraitKind | ||
| ) | [static] |
Definition at line 2625 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Sema::LangOpts, and clang::UETT_SizeOf.
Referenced by clang::Sema::CheckUnaryExprOrTypeTraitOperand().
| static bool checkPointerIntegerMismatch | ( | Sema & | S, |
| ExprResult & | Int, | ||
| Expr * | PointerExpr, | ||
| SourceLocation | Loc, | ||
| bool | IsIntFirstExpr | ||
| ) | [static] |
Return false if the first expression is not an integer and the second expression is not a pointer, true otherwise.
Definition at line 4505 of file SemaExpr.cpp.
References clang::CK_IntegralToPointer, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CheckConditionalOperands().
| static Sema::AssignConvertType checkPointerTypesForAssignment | ( | Sema & | S, |
| QualType | LHSType, | ||
| QualType | RHSType | ||
| ) | [static] |
Definition at line 4953 of file SemaExpr.cpp.
References clang::Sema::Compatible, clang::Sema::CompatiblePointerDiscardsQualifiers, clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::compatiblyIncludesObjCLifetime(), clang::Sema::Context, clang::Sema::FunctionVoidPointer, clang::Qualifiers::getAddressSpace(), clang::ASTContext::getCorrespondingUnsignedType(), clang::Sema::getLangOptions(), clang::Qualifiers::getObjCLifetime(), clang::Sema::IncompatibleNestedPointerQualifiers, clang::Sema::IncompatiblePointer, clang::Sema::IncompatiblePointerDiscardsQualifiers, clang::Sema::IncompatiblePointerSign, clang::QualType::isCanonical(), clang::Sema::IsNoReturnConversion(), clang::Qualifiers::removeObjCLifetime(), clang::ASTContext::typesAreCompatible(), clang::ASTContext::UnsignedCharTy, clang::Qualifiers::withoutObjCGCAttr(), and clang::Qualifiers::withoutObjCGLifetime().
Referenced by clang::Sema::CheckAssignmentConstraints().
| static QualType CheckRealImagOperand | ( | Sema & | S, |
| ExprResult & | V, | ||
| SourceLocation | Loc, | ||
| bool | IsReal | ||
| ) | [static] |
Definition at line 2867 of file SemaExpr.cpp.
References clang::Sema::CheckPlaceholderExpr(), clang::Sema::Context, clang::Sema::DefaultLvalueConversion(), clang::ASTContext::DependentTy, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::move(), clang::OK_Ordinary, and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CreateBuiltinUnaryOp().
| static bool CheckVecStepTraitOperandType | ( | Sema & | S, |
| QualType | T, | ||
| SourceLocation | Loc, | ||
| SourceRange | ArgRange | ||
| ) | [static] |
Definition at line 2586 of file SemaExpr.cpp.
References clang::Sema::Diag().
Referenced by clang::Sema::CheckUnaryExprOrTypeTraitOperand().
| static void ConstructTransparentUnion | ( | Sema & | S, |
| ASTContext & | C, | ||
| ExprResult & | EResult, | ||
| QualType | UnionType, | ||
| FieldDecl * | Field | ||
| ) | [static] |
Constructs a transparent union from an expression that is used to initialize the transparent union.
Definition at line 5438 of file SemaExpr.cpp.
References clang::ASTContext::getTrivialTypeSourceInfo(), clang::Sema::Owned(), clang::InitListExpr::setInitializedFieldInUnion(), clang::Expr::setType(), clang::ActionResult< PtrTy, CompressInvalid >::take(), and clang::VK_RValue.
Referenced by clang::Sema::CheckTransparentUnionArgumentConstraints().
| static bool convertPointersToCompositeType | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| ExprResult & | LHS, | ||
| ExprResult & | RHS | ||
| ) | [static] |
Returns false if the pointers are converted to a composite type, true otherwise.
Definition at line 6266 of file SemaExpr.cpp.
References clang::CK_BitCast, clang::Sema::Diag(), diagnoseDistinctPointerComparison(), clang::Sema::FindCompositePointerType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), clang::QualType::isNull(), clang::Sema::isSFINAEContext(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::CheckCompareOperands().
| static BinaryOperatorKind ConvertTokenKindToBinaryOpcode | ( | tok::TokenKind | Kind | ) | [inline, static] |
Definition at line 7511 of file SemaExpr.cpp.
References clang::BO_Add, clang::BO_AddAssign, clang::BO_And, clang::BO_AndAssign, clang::BO_Assign, clang::BO_Comma, clang::BO_Div, clang::BO_DivAssign, clang::BO_EQ, clang::BO_GE, clang::BO_GT, clang::BO_LAnd, clang::BO_LE, clang::BO_LOr, clang::BO_LT, clang::BO_Mul, clang::BO_MulAssign, clang::BO_NE, clang::BO_Or, clang::BO_OrAssign, clang::BO_PtrMemD, clang::BO_PtrMemI, clang::BO_Rem, clang::BO_RemAssign, clang::BO_Shl, clang::BO_ShlAssign, clang::BO_Shr, clang::BO_ShrAssign, clang::BO_Sub, clang::BO_SubAssign, clang::BO_Xor, and clang::BO_XorAssign.
Referenced by clang::Sema::ActOnBinOp().
| static UnaryOperatorKind ConvertTokenKindToUnaryOpcode | ( | tok::TokenKind | Kind | ) | [inline, static] |
Definition at line 7552 of file SemaExpr.cpp.
References clang::UO_AddrOf, clang::UO_Deref, clang::UO_Extension, clang::UO_Imag, clang::UO_LNot, clang::UO_Minus, clang::UO_Not, clang::UO_Plus, clang::UO_PreDec, clang::UO_PreInc, and clang::UO_Real.
Referenced by clang::Sema::ActOnUnaryOp().
| static void diagnoseAddressOfInvalidType | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | E, | ||
| unsigned | Type | ||
| ) | [static] |
Diagnose invalid operand for address of operations.
| Type | The type of operand which cannot have its address taken. |
Definition at line 7290 of file SemaExpr.cpp.
References clang::Sema::Diag(), and clang::Stmt::getSourceRange().
Referenced by CheckAddressOfOperand().
| static void diagnoseArithmeticOnFunctionPointer | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | Pointer | ||
| ) | [static] |
Diagnose invalid arithmetic on a function pointer.
Definition at line 5826 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOptions(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by checkArithmeticBinOpPointerOperands(), and checkArithmeticOpPointerOperand().
| static void diagnoseArithmeticOnTwoFunctionPointers | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | LHS, | ||
| Expr * | RHS | ||
| ) | [static] |
Diagnose invalid arithmetic on two function pointers.
Definition at line 5810 of file SemaExpr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::Sema::getLangOptions(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::ASTContext::hasSameUnqualifiedType().
Referenced by checkArithmeticBinOpPointerOperands().
| static void diagnoseArithmeticOnTwoVoidPointers | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
Diagnose invalid arithmetic on two void pointers.
Definition at line 5791 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOptions(), and clang::Stmt::getSourceRange().
Referenced by checkArithmeticBinOpPointerOperands().
| static void diagnoseArithmeticOnVoidPointer | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | Pointer | ||
| ) | [static] |
Diagnose invalid arithmetic on a void pointer.
Definition at line 5801 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOptions(), and clang::Stmt::getSourceRange().
Referenced by checkArithmeticBinOpPointerOperands(), and checkArithmeticOpPointerOperand().
| static void DiagnoseBadShiftValues | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| unsigned | Opc, | ||
| QualType | LHSType | ||
| ) | [static] |
Definition at line 6106 of file SemaExpr.cpp.
References clang::BO_Shl, clang::Sema::Context, clang::Sema::Diag(), clang::Sema::DiagRuntimeBehavior(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isValueDependent(), and clang::Sema::PDiag().
Referenced by clang::Sema::CheckShiftOperands().
| static void DiagnoseBinOpPrecedence | ( | Sema & | Self, |
| BinaryOperatorKind | Opc, | ||
| SourceLocation | OpLoc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
DiagnoseBinOpPrecedence - Emit warnings for expressions with tricky precedence.
Definition at line 7880 of file SemaExpr.cpp.
References clang::BO_LOr, clang::BO_Or, DiagnoseBitwiseAndInBitwiseOr(), DiagnoseBitwisePrecedence(), DiagnoseLogicalAndInLogicalOrLHS(), DiagnoseLogicalAndInLogicalOrRHS(), clang::BinaryOperator::isBitwiseOp(), and clang::SourceLocation::isMacroID().
Referenced by clang::Sema::ActOnBinOp().
| static void DiagnoseBitwiseAndInBitwiseOr | ( | Sema & | S, |
| SourceLocation | OpLoc, | ||
| Expr * | OrArg | ||
| ) | [static] |
Look for '&' in the left or right hand of a '|' expr.
Definition at line 7870 of file SemaExpr.cpp.
References clang::BO_And, and EmitDiagnosticForBitwiseAndInBitwiseOr().
Referenced by DiagnoseBinOpPrecedence().
| static void DiagnoseBitwisePrecedence | ( | Sema & | Self, |
| BinaryOperatorKind | Opc, | ||
| SourceLocation | OpLoc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
DiagnoseBitwisePrecedence - Emit a warning when bitwise and comparison operators are mixed in a way that suggests that the programmer forgot that comparison operators have higher precedence. The most typical example of such code is "flags & 0x0020 != 0", which is equivalent to "flags & 1".
Definition at line 7744 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::BinaryOperator::getOpcode(), clang::Stmt::getSourceRange(), clang::Sema::PDiag(), and SuggestParentheses().
Referenced by DiagnoseBinOpPrecedence().
| static void DiagnoseCalleeStaticArrayParam | ( | Sema & | S, |
| ParmVarDecl * | PVD | ||
| ) | [static] |
Definition at line 3364 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Decl::getLocation(), clang::TypeSourceInfo::getTypeLoc(), and clang::DeclaratorDecl::getTypeSourceInfo().
Referenced by clang::Sema::CheckStaticArrayArgument().
| static void DiagnoseConditionalPrecedence | ( | Sema & | Self, |
| SourceLocation | OpLoc, | ||
| Expr * | Condition, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
DiagnoseConditionalPrecedence - Emit a warning when a conditional operator and binary operator are mixed in a way that suggests the programmer assumed the conditional operator has higher precedence, for example: "int x = a + someBinaryCondition ? 1 : 2".
Definition at line 4859 of file SemaExpr.cpp.
References clang::Sema::Diag(), ExprLooksBoolean(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::BinaryOperator::getOpcodeStr(), clang::Stmt::getSourceRange(), IsArithmeticBinaryExpr(), clang::Sema::PDiag(), and SuggestParentheses().
Referenced by clang::Sema::ActOnConditionalOp().
| static void diagnoseDistinctPointerComparison | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| bool | IsError | ||
| ) | [static] |
Diagnose bad pointer comparisons.
Definition at line 6255 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by clang::Sema::CheckCompareOperands(), and convertPointersToCompositeType().
| static void diagnoseFunctionPointerToVoidComparison | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| bool | IsError | ||
| ) | [static] |
Definition at line 6311 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by clang::Sema::CheckCompareOperands().
| static void DiagnoseLogicalAndInLogicalOrLHS | ( | Sema & | S, |
| SourceLocation | OpLoc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
Look for '&&' in the left hand of a '||' expr.
Definition at line 7833 of file SemaExpr.cpp.
References clang::BO_LAnd, clang::BO_LOr, EmitDiagnosticForLogicalAndInLogicalOr(), EvaluatesAsFalse(), and EvaluatesAsTrue().
Referenced by DiagnoseBinOpPrecedence().
| static void DiagnoseLogicalAndInLogicalOrRHS | ( | Sema & | S, |
| SourceLocation | OpLoc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
Look for '&&' in the right hand of a '||' expr.
Definition at line 7855 of file SemaExpr.cpp.
References clang::BO_LAnd, EmitDiagnosticForLogicalAndInLogicalOr(), EvaluatesAsFalse(), and EvaluatesAsTrue().
Referenced by DiagnoseBinOpPrecedence().
| static void diagnosePointerIncompatibility | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr | ||
| ) | [static] |
Emit error when two pointers are incompatible.
Definition at line 5944 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by clang::Sema::CheckSubtractionOperands().
| static void DiagnoseSelfAssignment | ( | Sema & | S, |
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr, | ||
| SourceLocation | OpLoc | ||
| ) | [static] |
DiagnoseSelfAssignment - Emits a warning if a value is assigned to itself. This warning is only emitted for builtin assignment operations. It is also suppressed in the event of macro expansions.
Definition at line 7575 of file SemaExpr.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::Diag(), clang::Decl::getCanonicalDecl(), clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getLocation(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::IgnoreParenImpCasts(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isMacroID(), and clang::QualType::isVolatileQualified().
Referenced by clang::Sema::CreateBuiltinBinOp().
| static void diagnoseUncapturableValueReference | ( | Sema & | S, |
| SourceLocation | loc, | ||
| VarDecl * | var, | ||
| DeclContext * | DC | ||
| ) | [static] |
Definition at line 9464 of file SemaExpr.cpp.
References clang::Sema::CurContext, clang::Sema::Diag(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), and clang::DeclContext::isFunctionOrMethod().
Referenced by clang::Sema::TryCaptureVar().
| static ExprResult diagnoseUnknownAnyExpr | ( | Sema & | S, |
| Expr * | E | ||
| ) | [static] |
Definition at line 10463 of file SemaExpr.cpp.
References clang::Sema::Diag(), clang::ExprError(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), and clang::Expr::IgnoreParenImpCasts().
Referenced by clang::Sema::CheckPlaceholderExpr().
| static void DoMarkVarDeclReferenced | ( | Sema & | SemaRef, |
| SourceLocation | Loc, | ||
| VarDecl * | Var, | ||
| Expr * | E | ||
| ) | [static] |
Definition at line 9712 of file SemaExpr.cpp.
References clang::VarDecl::checkInitIsICE(), clang::VarDecl::getAnyInitializer(), clang::Sema::getASTMutationListener(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::VarDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::Sema::InstantiateStaticDataMemberDefinition(), clang::SourceLocation::isInvalid(), IsPotentiallyEvaluatedContext(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isUsableInConstantExpressions(), MarkVarDeclODRUsed(), clang::Sema::MaybeODRUseExprs, clang::Sema::PendingInstantiations, clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::Decl::setReferenced(), and clang::TSK_ImplicitInstantiation.
Referenced by MarkExprReferenced(), and clang::Sema::MarkVariableReferenced().
| static void EmitDiagnosticForBitwiseAndInBitwiseOr | ( | Sema & | Self, |
| SourceLocation | OpLoc, | ||
| BinaryOperator * | Bop | ||
| ) | [static] |
It accepts a '&' expr that is inside a '|' one. Emit a diagnostic together with a fixit hint that wraps the '&' expression in parentheses.
Definition at line 7794 of file SemaExpr.cpp.
References clang::BO_And, clang::Sema::Diag(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOperatorLoc(), clang::BinaryOperator::getSourceRange(), clang::Sema::PDiag(), and SuggestParentheses().
Referenced by DiagnoseBitwiseAndInBitwiseOr().
| static void EmitDiagnosticForLogicalAndInLogicalOr | ( | Sema & | Self, |
| SourceLocation | OpLoc, | ||
| BinaryOperator * | Bop | ||
| ) | [static] |
It accepts a '&&' expr that is inside a '||' one. Emit a diagnostic together with a fixit hint that wraps the '&&' expression in parentheses.
Definition at line 7808 of file SemaExpr.cpp.
References clang::BO_LAnd, clang::Sema::Diag(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOperatorLoc(), clang::BinaryOperator::getSourceRange(), clang::Sema::PDiag(), and SuggestParentheses().
Referenced by DiagnoseLogicalAndInLogicalOrLHS(), and DiagnoseLogicalAndInLogicalOrRHS().
Returns true if the given expression can be evaluated as a constant 'false'.
Definition at line 7827 of file SemaExpr.cpp.
References clang::Expr::EvaluateAsBooleanCondition(), and clang::Sema::getASTContext().
Referenced by DiagnoseLogicalAndInLogicalOrLHS(), and DiagnoseLogicalAndInLogicalOrRHS().
Returns true if the given expression can be evaluated as a constant 'true'.
Definition at line 7820 of file SemaExpr.cpp.
References clang::Expr::EvaluateAsBooleanCondition(), and clang::Sema::getASTContext().
Referenced by DiagnoseLogicalAndInLogicalOrLHS(), and DiagnoseLogicalAndInLogicalOrRHS().
| static bool ExprLooksBoolean | ( | Expr * | E | ) | [static] |
ExprLooksBoolean - Returns true if E looks boolean, i.e. it has boolean type or is a logical expression such as (x==y) which has int type, but is commonly interpreted as boolean.
Definition at line 4842 of file SemaExpr.cpp.
References clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), IsLogicOp(), and clang::UO_LNot.
Referenced by DiagnoseConditionalPrecedence().
getPrimaryDecl - Helper function for CheckAddressOfOperand(). This routine allows us to typecheck complex/recursive expressions where the declaration is needed for type checking. We only need to handle cases when the expression references a function designator or is an lvalue. Here are some examples:
Definition at line 7233 of file SemaExpr.cpp.
References clang::UnaryOperator::getOpcode(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::UO_Extension, clang::UO_Imag, and clang::UO_Real.
Referenced by CheckAddressOfOperand().
| static QualType handleComplexFloatConversion | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| QualType | LHSType, | ||
| QualType | RHSType, | ||
| bool | IsCompAssign | ||
| ) | [static] |
Handle arithmetic conversion with complex types. Helper function of UsualArithmeticConversions()
Definition at line 683 of file SemaExpr.cpp.
References handleComplexFloatToComplexFloatConverstion(), handleIntegerToComplexFloatConversion(), and handleOtherComplexFloatConversion().
Referenced by clang::Sema::UsualArithmeticConversions().
| static QualType handleComplexFloatToComplexFloatConverstion | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| QualType | LHSType, | ||
| QualType | RHSType, | ||
| bool | IsCompAssign | ||
| ) | [static] |
Takes two complex float types and converts them to the same type. Helper function of UsualArithmeticConversions()
Definition at line 622 of file SemaExpr.cpp.
References clang::CK_FloatingComplexCast, clang::Sema::Context, clang::ASTContext::getFloatingTypeOrder(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by handleComplexFloatConversion().
| static QualType handleComplexIntConversion | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| QualType | LHSType, | ||
| QualType | RHSType, | ||
| bool | IsCompAssign | ||
| ) | [static] |
Handle conversions with GCC complex int extension. Helper function of UsualArithmeticConversions()
Definition at line 796 of file SemaExpr.cpp.
References clang::CK_IntegralCast, clang::CK_IntegralComplexCast, clang::CK_IntegralRealToComplex, clang::Sema::Context, clang::ComplexType::getElementType(), clang::ASTContext::getIntegerTypeOrder(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::UsualArithmeticConversions().
| static QualType handleFloatConversion | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| QualType | LHSType, | ||
| QualType | RHSType, | ||
| bool | IsCompAssign | ||
| ) | [static] |
Handle arithmethic conversion with floating point types. Helper function of UsualArithmeticConversions()
Definition at line 761 of file SemaExpr.cpp.
References clang::CK_FloatingCast, clang::Sema::Context, clang::ASTContext::getFloatingTypeOrder(), handleIntToFloatConversion(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::UsualArithmeticConversions().
| static QualType handleIntegerConversion | ( | Sema & | S, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| QualType | LHSType, | ||
| QualType | RHSType, | ||
| bool | IsCompAssign | ||
| ) | [static] |
Handle integer arithmetic conversions. Helper function of UsualArithmeticConversions()
Definition at line 840 of file SemaExpr.cpp.
References clang::CK_IntegralCast, clang::Sema::Context, clang::ASTContext::getCorrespondingUnsignedType(), clang::ASTContext::getIntegerTypeOrder(), clang::ASTContext::getIntWidth(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::UsualArithmeticConversions().
| static bool handleIntegerToComplexFloatConversion | ( | Sema & | S, |
| ExprResult & | IntExpr, | ||
| ExprResult & | ComplexExpr, | ||
| QualType | IntTy, | ||
| QualType | ComplexTy, | ||
| bool | SkipCast | ||
| ) | [static] |
Converts an integer to complex float type. Helper function of UsualArithmeticConversions()
Definition at line 599 of file SemaExpr.cpp.
References clang::CK_FloatingRealToComplex, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralToFloating, getElementType(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by handleComplexFloatConversion().
| static QualType handleIntToFloatConversion | ( | Sema & | S, |
| ExprResult & | FloatExpr, | ||
| ExprResult & | IntExpr, | ||
| QualType | FloatTy, | ||
| QualType | IntTy, | ||
| bool | ConvertFloat, | ||
| bool | ConvertInt | ||
| ) | [static] |
Hande arithmetic conversion from integer to float. Helper function of UsualArithmeticConversions()
Definition at line 730 of file SemaExpr.cpp.
References clang::CK_FloatingRealToComplex, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralToFloating, clang::Sema::Context, clang::ASTContext::getComplexType(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by handleFloatConversion().
| static QualType handleOtherComplexFloatConversion | ( | Sema & | S, |
| ExprResult & | ComplexExpr, | ||
| ExprResult & | OtherExpr, | ||
| QualType | ComplexTy, | ||
| QualType | OtherTy, | ||
| bool | ConvertComplexExpr, | ||
| bool | ConvertOtherExpr | ||
| ) | [static] |
Converts otherExpr to complex float and promotes complexExpr if necessary. Helper function of UsualArithmeticConversions()
Definition at line 642 of file SemaExpr.cpp.
References clang::CK_FloatingCast, clang::CK_FloatingComplexCast, clang::CK_FloatingRealToComplex, clang::Sema::Context, clang::ASTContext::getComplexType(), getElementType(), clang::ASTContext::getFloatingTypeOrder(), clang::Sema::ImpCastExprToType(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by handleComplexFloatConversion().
| static bool IsArithmeticBinaryExpr | ( | Expr * | E, |
| BinaryOperatorKind * | Opcode, | ||
| Expr ** | RHSExprs | ||
| ) | [static] |
IsArithmeticBinaryExpr - Returns true if E is an arithmetic binary expression, either using a built-in or overloaded operator, and sets *OpCode to the opcode and *RHSExprs to the right-hand side expression.
Definition at line 4797 of file SemaExpr.cpp.
References clang::BinaryOperator::getOverloadedOpcode(), clang::Expr::IgnoreConversionOperator(), clang::Expr::IgnoreImpCasts(), and IsArithmeticOp().
Referenced by DiagnoseConditionalPrecedence().
| static bool IsArithmeticOp | ( | BinaryOperatorKind | Opc | ) | [static] |
Definition at line 4789 of file SemaExpr.cpp.
References clang::BO_Mul, and clang::BO_Shr.
Referenced by IsArithmeticBinaryExpr().
Definition at line 6909 of file SemaExpr.cpp.
References clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::QualType::getNonReferenceType(), clang::ObjCPropertyDecl::getType(), clang::QualType::isConstQualified(), and clang::ObjCPropertyRefExpr::isImplicitProperty().
Referenced by CheckForModifiableLvalue().
| static bool IsLogicOp | ( | BinaryOperatorKind | Opc | ) | [static] |
Definition at line 4835 of file SemaExpr.cpp.
References clang::BO_LAnd, clang::BO_LOr, clang::BO_LT, and clang::BO_NE.
Referenced by ExprLooksBoolean().
| bool IsPotentiallyEvaluatedContext | ( | Sema & | SemaRef | ) |
Definition at line 9328 of file SemaExpr.cpp.
References clang::Sema::ConstantEvaluated, clang::Sema::CurContext, clang::Sema::ExprEvalContexts, clang::DeclContext::isDependentContext(), clang::Sema::PotentiallyEvaluated, clang::Sema::PotentiallyEvaluatedIfUsed, and clang::Sema::Unevaluated.
Referenced by DoMarkVarDeclReferenced(), and clang::Sema::MarkFunctionReferenced().
| static bool isQualifiedMemberAccess | ( | Expr * | E | ) | [static] |
Determine whether the given expression is a qualified member access expression, of a form that could be turned into a pointer to member with the address-of operator.
Definition at line 8146 of file SemaExpr.cpp.
References clang::NamedDecl::isCXXClassMember().
Referenced by clang::Sema::BuildUnaryOp().
Definition at line 6919 of file SemaExpr.cpp.
References clang::MemberExpr::getBase(), clang::MemberExpr::getMemberDecl(), clang::ObjCMessageExpr::getMethodDecl(), and clang::Expr::IgnoreParenImpCasts().
Referenced by CheckForModifiableLvalue().
IsReadonlyProperty - Verify that otherwise a valid l-value expression is a read-only property; return true if so. A readonly property expression depends on various declarations and thus must be treated specially.
Definition at line 6891 of file SemaExpr.cpp.
References clang::ObjCPropertyRefExpr::getBase(), clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::ObjCPropertyRefExpr::getSuperReceiverType(), clang::Expr::getType(), clang::ObjCPropertyRefExpr::isImplicitProperty(), clang::Sema::isPropertyReadonly(), and clang::ObjCPropertyRefExpr::isSuperReceiver().
Referenced by CheckForModifiableLvalue().
| static bool isScopedEnumerationType | ( | QualType | T | ) | [static] |
Definition at line 6100 of file SemaExpr.cpp.
Referenced by clang::Sema::CheckShiftOperands().
| static bool IsWithinTemplateSpecialization | ( | Decl * | D | ) | [static] |
Definition at line 6217 of file SemaExpr.cpp.
References clang::Decl::getDeclContext().
Referenced by clang::Sema::CheckCompareOperands().
| static void MakeObjCStringLiteralFixItHint | ( | Sema & | SemaRef, |
| QualType | DstType, | ||
| Expr * | SrcExpr, | ||
| FixItHint & | Hint | ||
| ) | [static] |
Definition at line 8932 of file SemaExpr.cpp.
References clang::FixItHint::CreateInsertion(), clang::NamedDecl::getIdentifier(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::Sema::getLangOptions(), clang::Stmt::getLocStart(), clang::Expr::IgnoreParenImpCasts(), clang::StringLiteral::isAscii(), clang::ObjCObjectPointerType::isObjCIdType(), and clang::IdentifierInfo::isStr().
Referenced by clang::Sema::DiagnoseAssignmentResult().
| static void MarkExprReferenced | ( | Sema & | SemaRef, |
| SourceLocation | Loc, | ||
| Decl * | D, | ||
| Expr * | E | ||
| ) | [static] |
Definition at line 9762 of file SemaExpr.cpp.
References DoMarkVarDeclReferenced(), and clang::Sema::MarkAnyDeclReferenced().
Referenced by clang::Sema::MarkBlockDeclRefReferenced(), clang::Sema::MarkDeclRefReferenced(), and clang::Sema::MarkMemberReferenced().
| static void MarkVarDeclODRUsed | ( | Sema & | SemaRef, |
| VarDecl * | Var, | ||
| SourceLocation | Loc | ||
| ) | [static] |
Definition at line 9660 of file SemaExpr.cpp.
References clang::VarDecl::DeclarationOnly, clang::ExternalLinkage, clang::VarDecl::getCanonicalDecl(), clang::NamedDecl::getLinkage(), clang::VarDecl::hasDefinition(), clang::VarDecl::hasInit(), clang::SourceLocation::isInvalid(), clang::VarDecl::isStaticDataMember(), clang::Decl::setUsed(), clang::Sema::TryCaptureVar(), and clang::Sema::UndefinedInternals.
Referenced by clang::Sema::CleanupVarDeclMarking(), and DoMarkVarDeclReferenced().
| static void maybeExtendBlockObject | ( | Sema & | S, |
| ExprResult & | E | ||
| ) | [static] |
Do an explicit extend of the given block pointer if we're in ARC.
Definition at line 3850 of file SemaExpr.cpp.
References clang::CK_ARCExtendBlockObject, clang::Sema::Context, clang::ImplicitCastExpr::Create(), clang::Sema::ExprNeedsCleanups, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getLangOptions(), clang::Expr::getType(), clang::Expr::isRValue(), and clang::VK_RValue.
Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::PrepareCastToObjCObjectPointer(), and clang::Sema::PrepareScalarCast().
Given the last statement in a statement-expression, check whether the result is a producing expression (like a call to an ns_returns_retained function) and, if so, rebuild it to hoist the release out of the full-expression. Otherwise, return null. Cannot fail.
Definition at line 8252 of file SemaExpr.cpp.
References clang::CK_ARCConsumeObject, clang::CastExpr::getCastKind(), clang::ExprWithCleanups::getSubExpr(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::Expr::getValueKind(), and clang::ExprWithCleanups::setSubExpr().
Referenced by clang::Sema::ActOnStmtExpr().
| static ExprResult rebuildUnknownAnyFunction | ( | Sema & | S, |
| Expr * | FunctionExpr | ||
| ) | [static] |
Given a function expression of unknown-any type, try to rebuild it to have a function type.
Definition at line 10185 of file SemaExpr.cpp.
References clang::Sema::DefaultFunctionArrayConversion(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::ActionResult< PtrTy, CompressInvalid >::take().
Referenced by clang::Sema::ActOnCallExpr(), and clang::Sema::BuildResolvedCallExpr().
| static bool shouldAddConstForScope | ( | CapturingScopeInfo * | CSI, |
| VarDecl * | VD | ||
| ) | [static] |
Definition at line 9491 of file SemaExpr.cpp.
References clang::Decl::hasAttr().
Referenced by clang::Sema::TryCaptureVar().
Definition at line 2097 of file SemaExpr.cpp.
References clang::Sema::CurContext, clang::Sema::ExprEvalContexts, clang::Sema::getCurLambda(), clang::Decl::getDeclContext(), clang::Decl::hasAttr(), clang::VarDecl::hasLocalStorage(), clang::sema::LambdaScopeInfo::Mutable, and clang::Sema::Unevaluated.
Referenced by clang::Sema::BuildDeclarationNameExpr().
Definition at line 2083 of file SemaExpr.cpp.
References clang::Sema::CurContext, clang::Sema::getCurBlock(), clang::Decl::getDeclContext(), and clang::VarDecl::hasLocalStorage().
Referenced by clang::Sema::BuildDeclarationNameExpr().
| static void SuggestParentheses | ( | Sema & | Self, |
| SourceLocation | Loc, | ||
| const PartialDiagnostic & | Note, | ||
| SourceRange | ParenRange | ||
| ) | [static] |
SuggestParentheses - Emit a note with a fixit hint that wraps ParenRange in parentheses.
Definition at line 4774 of file SemaExpr.cpp.
References clang::FixItHint::CreateInsertion(), clang::Sema::Diag(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::Preprocessor::getLocForEndOfToken(), clang::SourceLocation::isFileID(), clang::SourceLocation::isValid(), and clang::Sema::PP.
Referenced by DiagnoseBitwisePrecedence(), DiagnoseConditionalPrecedence(), EmitDiagnosticForBitwiseAndInBitwiseOr(), and EmitDiagnosticForLogicalAndInLogicalOr().