Lines Matching defs:Context

64     Type = Context.getDependentNameType(ETK_None, NNS->getPrefix(),
77 Context.getTrivialTypeSourceInfo(Type, NameLoc));
206 QualType T = Context.getTypeDeclType(Type);
209 Context.hasSameUnqualifiedType(T, SearchType)) {
231 MemberOfType = Context.getTypeDeclType(Record);
292 SS.getWithLocInContext(Context),
298 QualType T = Context.getTypeDeclType(NonMatchingTypeDecl);
327 if (SearchType->isDependentType() || Context.hasSameUnqualifiedType(SearchType, T)) {
348 = Context.getUnqualifiedArrayType(Operand->getType().getNonReferenceType(),
354 return Owned(new (Context) CXXTypeidExpr(TypeInfoType.withConst(),
402 QualType UnqualT = Context.getUnqualifiedArrayType(T, Quals);
403 if (!Context.hasSameType(T, UnqualT)) {
409 return Owned(new (Context) CXXTypeidExpr(TypeInfoType.withConst(),
430 LookupQualifiedName(R, Context.getTranslationUnitDecl());
441 QualType TypeInfoType = Context.getTypeDeclType(CXXTypeInfoDecl);
452 TInfo = Context.getTrivialTypeSourceInfo(T, OpLoc);
477 return Owned(new (Context) CXXUuidofExpr(TypeInfoType.withConst(),
490 !E->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {
498 return Owned(new (Context) CXXUuidofExpr(TypeInfoType.withConst(),
511 LookupQualifiedName(R, Context.getTranslationUnitDecl());
517 QualType GuidType = Context.getTypeDeclType(MSVCGuidDecl);
528 TInfo = Context.getTrivialTypeSourceInfo(T, OpLoc);
542 return Owned(new (Context) CXXBoolLiteralExpr(Kind == tok::kw_true,
543 Context.BoolTy, OpLoc));
549 return Owned(new (Context) CXXNullPtrLiteralExpr(Context.NullPtrTy, Loc));
604 return Owned(new (Context) CXXThrowExpr(Ex, Context.VoidTy, OpLoc,
709 ThisTy = method->getThisType(Context);
731 = S.Context.getPointerType(
732 S.Context.getRecordType(Record).withCVRQualifiers(CXXThisTypeQuals));
744 static Expr *captureThis(ASTContext &Context, RecordDecl *RD,
747 = FieldDecl::Create(Context, RD, Loc, Loc, 0, ThisTy,
748 Context.getTrivialTypeSourceInfo(ThisTy, Loc),
753 return new (Context) CXXThisExpr(Loc, ThisTy, /*isImplicit*/true);
808 ThisExpr = captureThis(Context, LSI->Lambda, ThisTy, Loc);
811 ThisExpr = captureThis(Context, RSI->TheRecordDecl, ThisTy, Loc);
828 return Owned(new (Context) CXXThisExpr(Loc, ThisTy, /*isImplicit=*/false));
854 TInfo = Context.getTrivialTypeSourceInfo(Ty, SourceLocation());
872 return Owned(CXXUnresolvedConstructExpr::Create(Context, TInfo,
898 ElemTy = Context.getBaseElementType(Ty);
932 Context, ResultType, Expr::getValueKindForType(TInfo->getType()), TInfo,
951 S.Context.DeclarationNames.getCXXOperatorName(OO_Array_Delete);
1051 unsigned IntWidth = Context.getTargetInfo().getIntWidth();
1055 = CheckConvertedConstantExpression(NumElts, Context.getSizeType(), Value,
1186 = Context.getAsConstantArrayType(AllocType)) {
1187 ArraySize = IntegerLiteral::Create(Context, Array->getSize(),
1188 Context.getSizeType(),
1207 AllocType = Context.getLifetimeQualifiedType(AllocType,
1211 QualType ResultType = Context.getPointerType(AllocType);
1228 unsigned IntWidth = Context.getTargetInfo().getIntWidth();
1231 ConvertedSize = PerformImplicitConversion(ArraySize, Context.getSizeType(),
1319 if (ArraySize->isIntegerConstantExpr(Value, Context)) {
1333 ConstantArrayType::getNumAddressingBits(Context, AllocType, Value);
1334 if (ActiveSizeBits > ConstantArrayType::getMaxSizeBits(Context)) {
1405 if (unsigned Align = Context.getPreferredTypeAlign(AllocType.getTypePtr())){
1406 unsigned SuitableAlign = Context.getTargetInfo().getSuitableAlign();
1410 << unsigned(Align / Context.getCharWidth())
1411 << unsigned(SuitableAlign / Context.getCharWidth());
1431 InitType = Context.getConstantArrayType(AllocType,
1432 llvm::APInt(Context.getTypeSize(Context.getSizeType()), NumElements),
1492 QualType BaseAllocType = Context.getBaseElementType(AllocType);
1507 return Owned(new (Context) CXXNewExpr(Context, UseGlobal, OperatorNew,
1541 if (const ArrayType *AT = Context.getAsArrayType(AllocType)) {
1542 QualType BaseAllocType = Context.getBaseElementType(AT);
1570 S.Context.hasSameUnqualifiedType(FD->getParamDecl(1)->getType(),
1571 S.Context.getSizeType());
1594 IntegerLiteral Size(Context, llvm::APInt::getNullValue(
1595 Context.getTargetInfo().getPointerWidth(0)),
1596 Context.getSizeType(),
1607 DeclarationName NewName = Context.DeclarationNames.getCXXOperatorName(
1609 DeclarationName DeleteName = Context.DeclarationNames.getCXXOperatorName(
1612 QualType AllocElemType = Context.getBaseElementType(AllocType);
1625 DeclContext *TUDecl = Context.getTranslationUnitDecl();
1626 bool FallbackEnabled = IsArray && Context.getLangOpts().MicrosoftMode;
1637 NewName = Context.DeclarationNames.getCXXOperatorName(OO_New);
1638 DeleteName = Context.DeclarationNames.getCXXOperatorName(OO_Delete);
1677 LookupQualifiedName(FoundDelete, Context.getTranslationUnitDecl());
1710 ArgTypes.push_back(Context.VoidPtrTy);
1718 = Context.getFunctionType(Context.VoidTy, ArgTypes, EPI);
1735 if (Context.hasSameType(Fn->getType(), ExpectedFunctionType))
1854 InitializedEntity Entity = InitializedEntity::InitializeParameter(Context,
1969 StdBadAlloc = CXXRecordDecl::Create(Context, TTK_Class,
1979 QualType VoidPtr = Context.getPointerType(Context.VoidTy);
1980 QualType SizeT = Context.getSizeType();
1984 Context.DeclarationNames.getCXXOperatorName(OO_New),
1987 Context.DeclarationNames.getCXXOperatorName(OO_Array_New),
1990 Context.DeclarationNames.getCXXOperatorName(OO_Delete),
1991 Context.VoidTy, VoidPtr);
1993 Context.DeclarationNames.getCXXOperatorName(OO_Array_Delete),
1994 Context.VoidTy, VoidPtr);
1997 Context.DeclarationNames.getCXXOperatorName(OO_Delete),
1998 Context.VoidTy, VoidPtr, Context.getSizeType());
2000 Context.DeclarationNames.getCXXOperatorName(OO_Array_Delete),
2001 Context.VoidTy, VoidPtr, Context.getSizeType());
2011 DeclContext *GlobalCtx = Context.getTranslationUnitDecl();
2023 Context.getCanonicalType(Func->getParamDecl(0)
2027 ? Context.getCanonicalType(Func->getParamDecl(1)
2034 Func->addAttr(::new (Context) MallocAttr(SourceLocation(),
2035 Context));
2052 BadAllocType = Context.getTypeDeclType(getStdBadAlloc());
2069 QualType FnType = Context.getFunctionType(
2072 FunctionDecl::Create(Context, GlobalCtx, SourceLocation(),
2078 Alloc->addAttr(::new (Context) MallocAttr(SourceLocation(), Context));
2082 ParamDecls[I] = ParmVarDecl::Create(Context, Alloc, SourceLocation(),
2091 Context.getTranslationUnitDecl()->addDecl(Alloc);
2100 LookupQualifiedName(FoundDelete, Context.getTranslationUnitDecl());
2301 QualType PointeeElem = Context.getBaseElementType(Pointee);
2339 DeclarationName DeleteName = Context.DeclarationNames.getCXXOperatorName(
2416 return Owned(new (Context) CXXDeleteExpr(Context.VoidTy, UseGlobal, ArrayForm,
2444 Owned(DeclRefExpr::Create(Context, NestedNameSpecifierLoc(),
2561 Result = S.Owned(ImplicitCastExpr::Create(S.Context,
2606 BeforeToType = Context.getTagDeclType(Conv->getParent());
2708 if (Context.hasSameType(FromType, Context.OverloadTy)) {
2746 FromType = Context.getArrayDecayedType(FromType);
2752 FromType = Context.getPointerType(FromType);
2901 From = ImpCastExprToType(From, Context.FloatTy, CK_FloatingCast).take();
2902 FromType = Context.FloatTy;
2905 From = ImpCastExprToType(From, Context.BoolTy,
2943 if (Context.hasSameUnqualifiedType(ElType, From->getType())) {
2973 if (Context.hasSameUnqualifiedType(ElType, ToType)) {
3031 From = ImpCastExprToType(From, ToType.getNonLValueExprType(Context),
3049 assert(Context.hasSameType(
3066 TSInfo = Context.getTrivialTypeSourceInfo(T);
3167 ElTy = S.Context.getAsArrayType(ArgTy)->getElementType();
3206 if (!CPT || !CPT->isNothrow(Self.Context))
3219 ASTContext &C = Self.Context;
3291 return T.isTrivialType(Self.Context);
3293 return T.isTriviallyCopyableType(Self.Context);
3297 return T.isPODType(Self.Context);
3299 return T->isLiteralType(Self.Context);
3350 if (T.isPODType(Self.Context))
3360 if (T.isPODType(Self.Context))
3371 if (T.isPODType(Self.Context) || T->isReferenceType())
3381 if (T.isPODType(Self.Context))
3401 if (T.isPODType(Self.Context))
3414 if (T.isPODType(Self.Context) || T->isReferenceType())
3438 if (T.isPODType(Self.Context) || T->isObjCLifetimeType())
3451 if (T.isPODType(Self.Context))
3493 if (!CPT->isNothrow(Self.Context) || CPT->getNumArgs() > 1)
3529 return CPT->isNothrow(Self.Context) && CPT->getNumArgs() == 0;
3567 return Owned(new (Context) UnaryTypeTraitExpr(KWLoc, UTT, TSInfo, Value,
3568 RParen, Context.BoolTy));
3579 LhsTSInfo = Context.getTrivialTypeSourceInfo(LhsT);
3584 RhsTSInfo = Context.getTrivialTypeSourceInfo(RhsT);
3655 T = S.Context.getRValueReferenceType(T);
3658 T.getNonLValueExprType(S.Context),
3667 Sema::ContextRAII TUContext(S, S.Context.getTranslationUnitDecl());
3687 return !Result.get()->hasNonTrivialCall(S.Context);
3709 return TypeTraitExpr::Create(Context, Context.BoolTy, KWLoc, Kind,
3723 TInfo = Context.getTrivialTypeSourceInfo(T, KWLoc);
3750 assert(Self.Context.hasSameUnqualifiedType(LhsT, RhsT)
3768 return Self.Context.hasSameType(LhsT, RhsT);
3770 return Self.Context.typesAreCompatible(LhsT.getUnqualifiedType(),
3814 LhsT = Self.Context.getRValueReferenceType(LhsT);
3818 OpaqueValueExpr From(KeyLoc, LhsT.getNonLValueExprType(Self.Context),
3828 Sema::ContextRAII TUContext(Self, Self.Context.getTranslationUnitDecl());
3865 LhsT = Self.Context.getRValueReferenceType(LhsT);
3867 RhsT = Self.Context.getRValueReferenceType(RhsT);
3868 OpaqueValueExpr Lhs(KeyLoc, LhsT.getNonLValueExprType(Self.Context),
3870 OpaqueValueExpr Rhs(KeyLoc, RhsT.getNonLValueExprType(Self.Context),
3877 Sema::ContextRAII TUContext(Self, Self.Context.getTranslationUnitDecl());
3888 return !Result.get()->hasNonTrivialCall(Self.Context);
3917 case BTT_IsBaseOf: ResultType = Context.BoolTy; break;
3918 case BTT_IsConvertible: ResultType = Context.BoolTy; break;
3919 case BTT_IsSame: ResultType = Context.BoolTy; break;
3920 case BTT_TypeCompatible: ResultType = Context.IntTy; break;
3921 case BTT_IsConvertibleTo: ResultType = Context.BoolTy; break;
3922 case BTT_IsTriviallyAssignable: ResultType = Context.BoolTy;
3925 return Owned(new (Context) BinaryTypeTraitExpr(KWLoc, BTT, LhsTSInfo,
3938 TSInfo = Context.getTrivialTypeSourceInfo(T);
3952 while (const ArrayType *AT = Self.Context.getAsArrayType(T)) {
3977 while (const ArrayType *AT = Self.Context.getAsArrayType(T)) {
3987 if (const ConstantArrayType *CAT = Self.Context.getAsConstantArrayType(T))
4015 return Owned(new (Context) ArrayTypeTraitExpr(KWLoc, ATT, TSInfo, Value,
4017 Context.getSizeType()));
4055 return Owned(new (Context) ExpressionTraitExpr(KWLoc, ET, Queried, Value,
4056 RParen, Context.BoolTy));
4114 if (!Context.hasSameUnqualifiedType(Class, LHSType)) {
4125 Paths.isAmbiguous(Context.getCanonicalType(Class))) {
4131 QualType UseType = isIndirect ? Context.getPointerType(Class) : Class;
4153 Result = Context.getCVRQualifiedType(Result, LHSType.getCVRQualifiers());
4168 if (!isIndirect && !LHS.get()->Classify(Context).isLValue())
4174 if (isIndirect || !LHS.get()->Classify(Context).isRValue())
4190 return Context.BoundMemberTy;
4226 QualType T = Self.Context.getLValueReferenceType(ToType);
4394 return Context.DependentTy;
4442 return Context.VoidTy;
4457 if (!Context.hasSameType(LTy, RTy) &&
4495 if (!Context.hasSameType(LTy, RTy) &&
4496 Context.hasSameUnqualifiedType(LTy, RTy) &&
4520 bool Same = Context.hasSameType(LTy, RTy);
4558 if (Context.getCanonicalType(LTy) == Context.getCanonicalType(RTy)) {
4671 E2->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {
4676 E1->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {
4683 if (E1->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {
4690 if (E2->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {
4719 QualType Composite1 = Context.getCanonicalType(T1),
4720 Composite2 = Context.getCanonicalType(T2);
4788 Composite1 = Context.getMemberPointerType(
4789 Context.getQualifiedType(Composite1, Quals),
4791 Composite2 = Context.getMemberPointerType(
4792 Context.getQualifiedType(Composite2, Quals),
4797 = Context.getPointerType(Context.getQualifiedType(Composite1, Quals));
4799 = Context.getPointerType(Context.getQualifiedType(Composite2, Quals));
4813 if (!Context.hasSameType(Composite1, Composite2)) {
4892 if (T == Context.BoundMemberTy) {
4956 return Owned(ImplicitCastExpr::Create(Context, E->getType(), ck, E, 0,
4965 const Type *T = Context.getCanonicalType(E->getType().getTypePtr());
5008 CXXTemporary *Temp = CXXTemporary::Create(Context, Destructor);
5009 CXXBindTemporaryExpr *Bind = CXXBindTemporaryExpr::Create(Context, Temp, E);
5040 Expr *E = ExprWithCleanups::Create(Context, SubExpr, Cleanups);
5058 CompoundStmt *CompStmt = new (Context) CompoundStmt(Context, SubStmt,
5061 Expr *E = new (Context) StmtExpr(CompStmt, Context.VoidTy, SourceLocation(),
5098 return Owned(new (Context) BinaryOperator(BO->getLHS(), RHS.take(),
5229 CTypes.insert(Context.getCanonicalType(BaseType));
5273 CanQualType CBaseType = Context.getCanonicalType(BaseType);
5407 if (!Context.hasSameUnqualifiedType(DestructedType, ObjectType)) {
5414 DestructedTypeInfo = Context.getTrivialTypeSourceInfo(ObjectType,
5431 DestructedTypeInfo = Context.getTrivialTypeSourceInfo(ObjectType,
5448 !Context.hasSameUnqualifiedType(ScopeType, ObjectType)) {
5461 = new (Context) CXXPseudoDestructorExpr(Context, Base,
5463 SS.getWithLocInContext(Context),
5502 ObjectTypePtrForLookup = ParsedType::make(Context.DependentTy);
5557 DestructedTypeInfo = Context.getTrivialTypeSourceInfo(DestructedType,
5604 ScopeTypeInfo = Context.getTrivialTypeSourceInfo(ScopeType,
5628 TypeSourceInfo *DestructedTypeInfo = TLB.getTypeSourceInfo(Context, T);
5673 new (Context) MemberExpr(Exp.take(), /*IsArrow=*/false, Method,
5674 SourceLocation(), Context.BoundMemberTy,
5682 ResultType = ResultType.getNonLValueExprType(Context);
5685 new (Context) CXXMemberCallExpr(Context, ME, None, ResultType, VK,
5693 return Owned(new (Context) CXXNoexceptExpr(Context.BoolTy, Operand,
5801 E = ImpCastExprToType(E, Context.VoidTy, CK_ToVoid).take();
5830 ASTContext &Context) {
5849 return !IsVariableAConstantExpression(Var, Context);
5890 VariableCanNeverBeAConstantExpression(Var, S.Context);
5958 FullExpr.get()->getType() == Context.UnknownAnyTy) {
5959 FullExpr = forceUnknownAnyToType(FullExpr.take(), Context.getObjCIdType());