clang
3.7.0
|
Implements semantic analysis for C++ expressions. More...
#include "clang/Sema/SemaInternal.h"
#include "TreeTransform.h"
#include "TypeLocBuilder.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/DeclObjC.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/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/ParsedTemplate.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaLambda.h"
#include "clang/Sema/TemplateDeduction.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/ErrorHandling.h"
Go to the source code of this file.
Functions | |
static void | collectPublicBases (CXXRecordDecl *RD, llvm::DenseMap< CXXRecordDecl *, unsigned > &SubobjectsSeen, llvm::SmallPtrSetImpl< CXXRecordDecl * > &VBases, llvm::SetVector< CXXRecordDecl * > &PublicSubobjectsSeen, bool ParentIsPublic) |
static void | getUnambiguousPublicSubobjects (CXXRecordDecl *RD, llvm::SmallVectorImpl< CXXRecordDecl * > &Objects) |
static Expr * | captureThis (ASTContext &Context, RecordDecl *RD, QualType ThisTy, SourceLocation Loc) |
static bool | doesUsualArrayDeleteWantSize (Sema &S, SourceLocation loc, QualType allocType) |
static bool | isLegalArrayNewInitializer (CXXNewExpr::InitializationStyle Style, Expr *Init) |
static bool | isNonPlacementDeallocationFunction (Sema &S, FunctionDecl *FD) |
Determine whether the given function is a non-placement deallocation function. More... | |
static void | DiagnoseMismatchedNewDelete (Sema &SemaRef, SourceLocation DeleteLoc, const MismatchingNewDeleteDetector &Detector) |
static ExprResult | BuildCXXCastArgument (Sema &S, SourceLocation CastLoc, QualType Ty, CastKind Kind, CXXMethodDecl *Method, DeclAccessPair FoundDecl, bool HadMultipleCandidates, Expr *From) |
static bool | CheckUnaryTypeTraitTypeCompleteness (Sema &S, TypeTrait UTT, SourceLocation Loc, QualType ArgTy) |
Check the completeness of a type in a unary type trait. More... | |
static bool | HasNoThrowOperator (const RecordType *RT, OverloadedOperatorKind Op, Sema &Self, SourceLocation KeyLoc, ASTContext &C, bool(CXXRecordDecl::*HasTrivial)() const, bool(CXXRecordDecl::*HasNonTrivial)() const, bool(CXXMethodDecl::*IsDesiredOp)() const) |
static bool | EvaluateUnaryTypeTrait (Sema &Self, TypeTrait UTT, SourceLocation KeyLoc, QualType T) |
static bool | hasNontrivialObjCLifetime (QualType T) |
Determine whether T has a non-trivial Objective-C lifetime in ARC mode. More... | |
static bool | EvaluateBinaryTypeTrait (Sema &Self, TypeTrait BTT, QualType LhsT, QualType RhsT, SourceLocation KeyLoc) |
static bool | evaluateTypeTrait (Sema &S, TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc) |
static uint64_t | EvaluateArrayTypeTrait (Sema &Self, ArrayTypeTrait ATT, QualType T, Expr *DimExpr, SourceLocation KeyLoc) |
static bool | EvaluateExpressionTrait (ExpressionTrait ET, Expr *E) |
static bool | TryClassUnification (Sema &Self, Expr *From, Expr *To, SourceLocation QuestionLoc, bool &HaveConversion, QualType &ToType) |
Try to convert a type to another according to C++0x 5.16p3. More... | |
static bool | FindConditionalOverload (Sema &Self, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) |
Try to find a common type for two according to C++0x 5.16p5. More... | |
static bool | ConvertForConditional (Sema &Self, ExprResult &E, QualType T) |
Perform an "extended" implicit conversion as returned by TryClassUnification. More... | |
static void | noteOperatorArrows (Sema &S, ArrayRef< FunctionDecl * > OperatorArrows) |
Note a set of 'operator->' functions that were used for a member access. More... | |
static bool | CheckArrow (Sema &S, QualType &ObjectType, Expr *&Base, tok::TokenKind &OpKind, SourceLocation OpLoc) |
static bool | IsSpecialDiscardedValue (Expr *E) |
static bool | VariableCanNeverBeAConstantExpression (VarDecl *Var, ASTContext &Context) |
static void | CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures (Expr *const FE, LambdaScopeInfo *const CurrentLSI, Sema &S) |
Check if the current lambda has any potential captures that must be captured by any of its enclosing lambdas that are ready to capture. If there is a lambda that can capture a nested potential-capture, go ahead and do so. Also, check to see if any variables are uncaptureable or do not involve an odr-use so do not need to be captured. More... | |
static ExprResult | attemptRecovery (Sema &SemaRef, const TypoCorrectionConsumer &Consumer, TypoCorrection TC) |
Implements semantic analysis for C++ expressions.
Definition in file SemaExprCXX.cpp.
|
static |
Definition at line 6318 of file SemaExprCXX.cpp.
References clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::Context, clang::TypoCorrection::getCorrectionDecl(), clang::TypoCorrection::getCorrectionRange(), clang::TypoCorrection::getCorrectionSpecifier(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::TypoCorrectionConsumer::getLookupResult(), clang::TypoCorrectionConsumer::getScope(), clang::TypoCorrectionConsumer::getSS(), clang::TypoCorrectionConsumer::isAddressOfOperand(), clang::CXXScopeSpec::isEmpty(), clang::Sema::LookupInObjCMethod(), clang::CXXScopeSpec::MakeTrivial(), and clang::TypoCorrection::WillReplaceSpecifier().
|
static |
Definition at line 2890 of file SemaExprCXX.cpp.
References clang::Sema::BuildCXXConstructExpr(), clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::CheckConstructorAccess(), clang::Sema::CheckMemberOperatorAccess(), clang::CXXConstructExpr::CK_Complete, clang::CK_ConstructorConversion, clang::CK_UserDefinedConversion, clang::Sema::CompleteConstructorCall(), clang::Sema::Context, clang::ImplicitCastExpr::Create(), clang::Sema::DiagnoseUseOfDecl(), clang::ExprError(), clang::Decl::getAccess(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Expr::getType(), clang::InitializedEntity::InitializeTemporary(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::Sema::MaybeBindToTemporary(), clang::Sema::RequireNonAbstractType(), and clang::Result.
Referenced by clang::Sema::PerformImplicitConversion().
|
static |
Definition at line 887 of file SemaExprCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_private, clang::Sema::Context, clang::FieldDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ICIS_NoInit, clang::Decl::setAccess(), and clang::Decl::setImplicit().
Referenced by clang::Sema::CheckCXXThisCapture().
|
static |
Definition at line 5700 of file SemaExprCXX.cpp.
References clang::Sema::CheckPlaceholderExpr(), clang::FixItHint::CreateReplacement(), clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::isSFINAEContext(), and clang::Expr::isTypeDependent().
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), and clang::Sema::BuildPseudoDestructorExpr().
|
static |
Check if the current lambda has any potential captures that must be captured by any of its enclosing lambdas that are ready to capture. If there is a lambda that can capture a nested potential-capture, go ahead and do so. Also, check to see if any variables are uncaptureable or do not involve an odr-use so do not need to be captured.
Definition at line 6229 of file SemaExprCXX.cpp.
References clang::sema::LambdaScopeInfo::CallOperator, clang::Sema::CheckCXXThisCapture(), clang::sema::LambdaScopeInfo::clearPotentialCaptures(), clang::Sema::Context, clang::Sema::CurContext, clang::Sema::FunctionScopes, clang::Expr::getExprLoc(), clang::sema::LambdaScopeInfo::getNumPotentialVariableCaptures(), clang::sema::LambdaScopeInfo::getPotentialVariableCapture(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), clang::sema::LambdaScopeInfo::hasPotentialThisCapture(), clang::DeclContext::isDependentContext(), clang::Expr::isInstantiationDependent(), clang::Sema::isUnevaluatedContext(), clang::sema::LambdaScopeInfo::isVariableExprMarkedAsNonODRUsed(), clang::MarkVarDeclODRUsed(), clang::sema::LambdaScopeInfo::PotentialThisCaptureLocation, S, clang::Sema::TryCapture_Implicit, clang::Sema::tryCaptureVariable(), and VariableCanNeverBeAConstantExpression().
Referenced by clang::Sema::ActOnFinishFullExpr().
|
static |
Check the completeness of a type in a unary type trait.
If the particular type trait requires a complete type, tries to complete it. If completing the type fails, a diagnostic is emitted and false returned. If completing the type succeeds or no completion was required, returns true.
Definition at line 3482 of file SemaExprCXX.cpp.
References clang::Sema::Context, clang::ASTContext::getAsArrayType(), clang::ArrayType::getElementType(), clang::Type::isIncompleteArrayType(), clang::Type::isVoidType(), clang::Sema::RequireCompleteType(), clang::UTT_HasNothrowAssign, clang::UTT_HasNothrowConstructor, clang::UTT_HasNothrowCopy, clang::UTT_HasNothrowMoveAssign, clang::UTT_HasTrivialAssign, clang::UTT_HasTrivialCopy, clang::UTT_HasTrivialDefaultConstructor, clang::UTT_HasTrivialDestructor, clang::UTT_HasTrivialMoveAssign, clang::UTT_HasTrivialMoveConstructor, clang::UTT_HasVirtualDestructor, clang::UTT_IsAbstract, clang::UTT_IsArithmetic, clang::UTT_IsArray, clang::UTT_IsClass, clang::UTT_IsCompleteType, clang::UTT_IsCompound, clang::UTT_IsConst, clang::UTT_IsDestructible, clang::UTT_IsEmpty, clang::UTT_IsEnum, clang::UTT_IsFinal, clang::UTT_IsFloatingPoint, clang::UTT_IsFunction, clang::UTT_IsFundamental, clang::UTT_IsIntegral, clang::UTT_IsInterfaceClass, clang::UTT_IsLiteral, clang::UTT_IsLvalueReference, clang::UTT_IsMemberFunctionPointer, clang::UTT_IsMemberObjectPointer, clang::UTT_IsMemberPointer, clang::UTT_IsNothrowDestructible, clang::UTT_IsObject, clang::UTT_IsPOD, clang::UTT_IsPointer, clang::UTT_IsPolymorphic, clang::UTT_IsReference, clang::UTT_IsRvalueReference, clang::UTT_IsScalar, clang::UTT_IsSealed, clang::UTT_IsSigned, clang::UTT_IsStandardLayout, clang::UTT_IsTrivial, clang::UTT_IsTriviallyCopyable, clang::UTT_IsUnion, clang::UTT_IsUnsigned, clang::UTT_IsVoid, and clang::UTT_IsVolatile.
Referenced by clang::Sema::BuildTypeTrait().
|
static |
Definition at line 687 of file SemaExprCXX.cpp.
References clang::AS_public, and clang::CXXRecordDecl::bases().
Referenced by getUnambiguousPublicSubobjects().
|
static |
Perform an "extended" implicit conversion as returned by TryClassUnification.
Definition at line 4742 of file SemaExprCXX.cpp.
References clang::InitializationKind::CreateCopy(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::InitializedEntity::InitializeTemporary(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::InitializationSequence::Perform(), and clang::Result.
Referenced by clang::Sema::CXXCheckConditionalOperands().
|
static |
Definition at line 2537 of file SemaExprCXX.cpp.
References clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::Sema::Diag(), clang::Lexer::findLocationAfterToken(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::Sema::getLocForEndOfToken(), clang::Sema::getSourceManager(), and clang::SourceLocation::isValid().
|
static |
doesUsualArrayDeleteWantSize - Answers whether the usual operator delete[] for the given type has a size_t parameter.
Definition at line 1086 of file SemaExprCXX.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::LookupResult::Filter::erase(), clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), clang::LookupResult::getFoundDecl(), clang::FunctionDecl::getNumParams(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), and clang::LookupResult::suppressDiagnostics().
Referenced by clang::Sema::ActOnCXXDelete(), and clang::Sema::BuildCXXNew().
|
static |
Definition at line 4330 of file SemaExprCXX.cpp.
References clang::ATT_ArrayExtent, clang::ATT_ArrayRank, clang::Sema::Context, clang::Sema::Diag(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getAsConstantArrayType(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Sema::VerifyIntegerConstantExpression().
Referenced by clang::Sema::BuildArrayTypeTrait().
|
static |
Definition at line 4144 of file SemaExprCXX.cpp.
References clang::BO_Assign, clang::BTT_IsBaseOf, clang::BTT_IsConvertible, clang::BTT_IsConvertibleTo, clang::BTT_IsNothrowAssignable, clang::BTT_IsSame, clang::BTT_IsTriviallyAssignable, clang::BTT_TypeCompatible, clang::Sema::BuildBinOp(), clang::Sema::canThrow(), clang::Sema::Context, clang::InitializationKind::CreateCopy(), clang::CT_Cannot, clang::Type::getAs(), clang::RecordType::getDecl(), clang::Sema::getLangOpts(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getTranslationUnitDecl(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::Sema::SFINAETrap::hasErrorOccurred(), hasNontrivialObjCLifetime(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjectType(), clang::TagDecl::isUnion(), clang::Type::isVoidType(), clang::Sema::RequireCompleteType(), clang::Sema::RequireNonAbstractType(), clang::Result, clang::ASTContext::typesAreCompatible(), and clang::Sema::Unevaluated.
Referenced by evaluateTypeTrait().
|
static |
Definition at line 4419 of file SemaExprCXX.cpp.
References clang::ET_IsLValueExpr, clang::ET_IsRValueExpr, clang::Expr::isLValue(), and clang::Expr::isRValue().
Referenced by clang::Sema::BuildExpressionTrait().
|
static |
Definition at line 3992 of file SemaExprCXX.cpp.
References clang::BTT_Last, clang::Sema::canThrow(), clang::Sema::Context, clang::InitializationKind::CreateDirect(), clang::CT_Cannot, EvaluateBinaryTypeTrait(), EvaluateUnaryTypeTrait(), clang::InitializationSequence::Failed(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getLangOpts(), clang::QualType::getNonLValueExprType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getTranslationUnitDecl(), clang::Expr::getValueKindForType(), clang::Sema::SFINAETrap::hasErrorOccurred(), hasNontrivialObjCLifetime(), clang::InitializedEntity::InitializeTemporary(), clang::CXXRecordDecl::isAbstract(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjectType(), clang::Type::isVoidType(), clang::InitializationSequence::Perform(), clang::Sema::RequireCompleteType(), clang::Result, clang::TT_IsConstructible, clang::TT_IsNothrowConstructible, clang::TT_IsTriviallyConstructible, clang::Sema::Unevaluated, and clang::UTT_Last.
Referenced by clang::Sema::BuildTypeTrait().
|
static |
Definition at line 3622 of file SemaExprCXX.cpp.
References clang::DeclContextLookupResult::begin(), clang::Sema::Context, clang::DeclContextLookupResult::end(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::FunctionProtoType::getNumParams(), clang::QualType::getObjCLifetime(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasNonTrivialCopyAssignment(), clang::CXXRecordDecl::hasNonTrivialCopyConstructor(), clang::CXXRecordDecl::hasNonTrivialDefaultConstructor(), clang::CXXRecordDecl::hasNonTrivialMoveAssignment(), clang::CXXRecordDecl::hasNonTrivialMoveConstructor(), HasNoThrowOperator(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), clang::CXXRecordDecl::isAbstract(), clang::Type::isArithmeticType(), clang::Type::isArrayType(), clang::Type::isClassType(), clang::Type::isCompoundType(), clang::QualType::isConstQualified(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyConstructor(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::Type::isDependentType(), clang::CXXRecordDecl::isEmpty(), clang::Type::isEnumeralType(), clang::Type::isFloatingType(), clang::Type::isFunctionType(), clang::Type::isFundamentalType(), clang::Type::isIncompleteType(), clang::Type::isIntegralType(), clang::TagDecl::isInterface(), clang::Type::isInterfaceType(), clang::Type::isLiteralType(), clang::Type::isLValueReferenceType(), clang::Type::isMemberDataPointerType(), clang::Type::isMemberFunctionPointerType(), clang::Type::isMemberPointerType(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionProtoType::isNothrow(), clang::Type::isObjCLifetimeType(), clang::Type::isObjectType(), clang::QualType::isPODType(), clang::Type::isPointerType(), clang::CXXRecordDecl::isPolymorphic(), clang::Type::isReferenceType(), clang::Type::isRValueReferenceType(), clang::Type::isScalarType(), clang::Type::isSignedIntegerType(), clang::Type::isStandardLayoutType(), clang::Type::isStructureType(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::TagDecl::isUnion(), clang::Type::isUnionType(), clang::Type::isUnsignedIntegerType(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), clang::Sema::LookupConstructors(), clang::Sema::LookupDestructor(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::Sema::ResolveExceptionSpec(), clang::UTT_HasNothrowAssign, clang::UTT_HasNothrowConstructor, clang::UTT_HasNothrowCopy, clang::UTT_HasNothrowMoveAssign, clang::UTT_HasTrivialAssign, clang::UTT_HasTrivialCopy, clang::UTT_HasTrivialDefaultConstructor, clang::UTT_HasTrivialDestructor, clang::UTT_HasTrivialMoveAssign, clang::UTT_HasTrivialMoveConstructor, clang::UTT_HasVirtualDestructor, clang::UTT_IsAbstract, clang::UTT_IsArithmetic, clang::UTT_IsArray, clang::UTT_IsClass, clang::UTT_IsCompleteType, clang::UTT_IsCompound, clang::UTT_IsConst, clang::UTT_IsDestructible, clang::UTT_IsEmpty, clang::UTT_IsEnum, clang::UTT_IsFinal, clang::UTT_IsFloatingPoint, clang::UTT_IsFunction, clang::UTT_IsFundamental, clang::UTT_IsIntegral, clang::UTT_IsInterfaceClass, clang::UTT_IsLiteral, clang::UTT_IsLvalueReference, clang::UTT_IsMemberFunctionPointer, clang::UTT_IsMemberObjectPointer, clang::UTT_IsMemberPointer, clang::UTT_IsNothrowDestructible, clang::UTT_IsObject, clang::UTT_IsPOD, clang::UTT_IsPointer, clang::UTT_IsPolymorphic, clang::UTT_IsReference, clang::UTT_IsRvalueReference, clang::UTT_IsScalar, clang::UTT_IsSealed, clang::UTT_IsSigned, clang::UTT_IsStandardLayout, clang::UTT_IsTrivial, clang::UTT_IsTriviallyCopyable, clang::UTT_IsUnion, clang::UTT_IsUnsigned, clang::UTT_IsVoid, and clang::UTT_IsVolatile.
Referenced by evaluateTypeTrait().
|
static |
Try to find a common type for two according to C++0x 5.16p5.
This is part of the parameter validation for the ? operator. If either value operand is a class type, overload resolution is used to find a conversion to a common type.
Definition at line 4683 of file SemaExprCXX.cpp.
References clang::Sema::AA_Converting, clang::Sema::AddBuiltinOperatorCandidates(), clang::OverloadCandidateSet::BestViableFunction(), clang::OverloadCandidateSet::CSK_Operator, clang::Sema::Diag(), clang::Sema::DiagnoseConditionalForNull(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::MarkFunctionReferenced(), clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and clang::Sema::PerformImplicitConversion().
Referenced by clang::Sema::CXXCheckConditionalOperands().
|
static |
Definition at line 716 of file SemaExprCXX.cpp.
References collectPublicBases().
Referenced by clang::Sema::CheckCXXThrowOperand().
Determine whether T has a non-trivial Objective-C lifetime in ARC mode.
Definition at line 3972 of file SemaExprCXX.cpp.
References clang::QualType::getObjCLifetime(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by EvaluateBinaryTypeTrait(), and evaluateTypeTrait().
|
static |
Definition at line 3586 of file SemaExprCXX.cpp.
References clang::LookupResult::begin(), clang::ASTContext::DeclarationNames, clang::LookupResult::end(), clang::Type::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), clang::ValueDecl::getType(), clang::FunctionProtoType::isNothrow(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::ResolveExceptionSpec(), and clang::LookupResult::suppressDiagnostics().
Referenced by EvaluateUnaryTypeTrait().
|
static |
Definition at line 1237 of file SemaExprCXX.cpp.
References clang::CXXNewExpr::ListInit.
Referenced by clang::Sema::BuildCXXNew().
|
static |
Determine whether the given function is a non-placement deallocation function.
Definition at line 1693 of file SemaExprCXX.cpp.
References clang::Sema::Context, clang::Sema::getLangOpts(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameUnqualifiedType(), and clang::Decl::isInvalidDecl().
Referenced by clang::Sema::FindAllocationFunctions(), and clang::Sema::FindUsualDeallocationFunction().
Definition at line 6072 of file SemaExprCXX.cpp.
References clang::BO_Comma, clang::Expr::IgnoreParens(), and clang::UO_Deref.
Referenced by clang::Sema::IgnoredValueConversions().
|
static |
Note a set of 'operator->' functions that were used for a member access.
Definition at line 5537 of file SemaExprCXX.cpp.
References clang::Sema::Diag().
Referenced by clang::Sema::ActOnStartCXXMemberReference().
|
static |
Try to convert a type to another according to C++0x 5.16p3.
This is part of the parameter validation for the ? operator. If either value operand is a class type, the two operands are attempted to be converted to each other. This function does the conversion in one direction. It returns true if the program is ill-formed and has already been diagnosed as such.
Definition at line 4594 of file SemaExprCXX.cpp.
References clang::Sema::Context, clang::InitializationKind::CreateCopy(), clang::InitializationSequence::Diagnose(), clang::InitializationSequence::Failed(), clang::Type::getAs(), clang::ASTContext::getLValueReferenceType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::InitializedEntity::InitializeTemporary(), clang::InitializationSequence::isAmbiguous(), clang::QualType::isAtLeastAsQualifiedAs(), clang::Sema::IsDerivedFrom(), clang::InitializationSequence::isDirectReferenceBinding(), and clang::Expr::isLValue().
Referenced by clang::Sema::CXXCheckConditionalOperands().
|
inlinestatic |
Definition at line 6199 of file SemaExprCXX.cpp.
References clang::VarDecl::ensureEvaluatedStmt(), clang::VarDecl::getAnyInitializer(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Expr::isValueDependent(), clang::IsVariableAConstantExpression(), clang::ValueDecl::isWeak(), and clang::EvaluatedStmt::Value.
Referenced by CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures().