Lines Matching defs:Context

55     return DeclGroupPtrTy::make(DeclGroupRef::Create(Context, Group, 2));
167 NestedNameSpecifierLoc QualifierLoc = SS->getWithLocInContext(Context);
225 NewSS.MakeTrivial(Context, NNS, SourceRange(NameLoc));
244 SS->MakeTrivial(Context, NNS, SourceRange(NameLoc));
307 T = Context.getTypeDeclType(TD);
321 ElabTL.setQualifierLoc(SS->getWithLocInContext(Context));
322 return CreateParsedType(T, Builder.getTypeSourceInfo(Context, T));
330 T = Context.getObjCInterfaceType(IDecl);
386 if (Context.hasSameUnqualifiedType(QualType(Ty, 1), Base->getType()))
429 tmpSS.MakeTrivial(Context, Corrected.getCorrectionSpecifier(),
561 ASTContext &Context = S.Context;
569 ElabTL.setQualifierLoc(SS.getWithLocInContext(Context));
570 return S.CreateParsedType(T, Builder.getTypeSourceInfo(Context, T));
778 Template = Context.getOverloadedTemplateName(Result.begin(),
787 Template = Context.getQualifiedTemplateName(SS.getScopeRep(),
811 QualType T = Context.getTypeDeclType(Type);
835 QualType T = Context.getObjCInterfaceType(Class);
852 QualType T = Context.getTypeDeclType(Type);
951 assert(S->getEntity() == CurContext && "Context imbalance!");
1011 ASTContext &Context) {
1012 if (Context.getLangOpts().CPlusPlus)
1123 isOutOfScopePreviousDeclaration(D, Ctx, Context))
1227 Context.DeclMustBeEmitted(FD))
1236 if (Context.DeclMustBeEmitted(VD))
1351 GenerateFixForUnusedDecl(D, Context, Hint);
1488 ASTContext &Context = ThisSema.Context;
1490 LookupResult Result(ThisSema, &Context.Idents.get("objc_super"),
1495 Context.setObjCSuperType(Context.getTagDeclType(TD));
1510 QualType R = Context.GetBuiltinType(BID, Error);
1519 << Context.BuiltinInfo.GetName(BID);
1525 << Context.BuiltinInfo.GetName(BID);
1531 << Context.BuiltinInfo.GetName(BID);
1535 if (!ForRedeclaration && Context.BuiltinInfo.isPredefinedLibFunction(BID)) {
1537 << Context.BuiltinInfo.GetName(BID)
1539 if (Context.BuiltinInfo.getHeaderName(BID) &&
1543 << Context.BuiltinInfo.getHeaderName(BID)
1544 << Context.BuiltinInfo.GetName(BID);
1547 DeclContext *Parent = Context.getTranslationUnitDecl();
1550 LinkageSpecDecl::Create(Context, Parent, Loc, Loc,
1556 FunctionDecl *New = FunctionDecl::Create(Context,
1570 ParmVarDecl::Create(Context, New, SourceLocation(),
1629 OldType = Context.getTypeDeclType(Old);
1646 !Context.hasSameType(OldType, NewType)) {
1686 Context.setObjCIdRedefinitionType(T);
1688 New->setTypeForDecl(Context.getObjCIdType().getTypePtr());
1694 Context.setObjCClassRedefinitionType(New->getUnderlyingType());
1696 New->setTypeForDecl(Context.getObjCClassType().getTypePtr());
1701 Context.setObjCSelRedefinitionType(New->getUnderlyingType());
1703 New->setTypeForDecl(Context.getObjCSelType().getTypePtr());
1788 (Context.getSourceManager().isInSystemHeader(Old->getLocation()) ||
1789 Context.getSourceManager().isInSystemHeader(New->getLocation())))
1879 unsigned Align = I->getAlignment(S.Context);
1898 unsigned Align = I->getAlignment(S.Context);
1916 Ty = S.Context.getTagDeclType(cast<TagDecl>(New));
1919 OldAlign = S.Context.getTypeAlign(Ty);
1921 NewAlign = S.Context.getTypeAlign(Ty);
1926 << (unsigned)S.Context.toCharUnitsFromBits(OldAlign).getQuantity()
1927 << (unsigned)S.Context.toCharUnitsFromBits(NewAlign).getQuantity();
1951 AlignedAttr *Clone = OldStrictestAlignAttr->clone(S.Context);
1960 AlignedAttr *Clone = OldAlignasAttr->clone(S.Context);
2003 NewAttr = cast<InheritableAttr>(Attr->clone(S.Context));
2121 UsedAttr *NewAttr = OldAttr->clone(Context);
2214 cast<InheritableParamAttr>((*i)->clone(S.Context));
2382 QualType OldQType = Context.getCanonicalType(Old->getType());
2383 QualType NewQType = Context.getCanonicalType(New->getType());
2451 AdjustedType = Context.adjustFunctionType(AdjustedType, NewTypeInfo);
2453 NewQType = Context.getCanonicalType(New->getType());
2492 if (!Context.hasSameType(OldDeclaredReturnType, NewDeclaredReturnType) &&
2497 ResQT = Context.mergeObjCGCQualifiers(NewQType, OldQType);
2520 OldAT->isDependentType() ? Context.DependentTy
2522 NewQType = Context.getCanonicalType(
2524 OldAT->isDependentType() ? Context.DependentTy
2632 = Context.adjustFunctionType(OldType, OldTypeInfo.withNoReturn(true));
2673 Context.typesAreCompatible(OldQType, NewQType)) {
2684 NewQType = Context.getFunctionType(NewFuncType->getResultType(),
2696 ParmVarDecl *Param = ParmVarDecl::Create(Context, New,
2736 QualType MergedReturn = Context.mergeTypes(OldProto->getResultType(),
2743 if (Context.typesAreCompatible(OldParm->getType(),
2746 } else if (Context.typesAreCompatible(OldParm->getType(),
2769 New->setType(Context.getFunctionType(MergedReturn, ArgTypes,
2786 if (Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) {
2848 QualType Merged = Context.mergeTypes(Old->getType(), New->getType());
2893 } else if (Context.hasSameType(New->getType(), Old->getType())) {
2904 const ArrayType *OldArray = Context.getAsArrayType(Old->getType());
2905 const ArrayType *NewArray = Context.getAsArrayType(New->getType());
2906 if (Context.hasSameType(OldArray->getElementType(),
2911 const ArrayType *OldArray = Context.getAsArrayType(Old->getType());
2912 const ArrayType *NewArray = Context.getAsArrayType(New->getType());
2913 if (Context.hasSameType(OldArray->getElementType(),
2918 MergedT = Context.mergeObjCGCQualifiers(New->getType(),
2925 MergedT = Context.mergeTypes(New->getType(), Old->getType());
2939 New->setType(Context.DependentTy);
3169 if (!S.Context.getLangOpts().CPlusPlus)
3178 S.Context.getManglingNumberContext(Tag->getParent());
3179 S.Context.setManglingNumber(Tag, MCtx.getManglingNumber(Tag));
3188 S.Context.setManglingNumber(Tag, MCtx->getManglingNumber(Tag));
3503 new (SemaRef.Context)NamedDecl*[Chaining.size()];
3508 IndirectFieldDecl::Create(SemaRef.Context, Owner, VD->getLocation(),
3725 Anon = FieldDecl::Create(Context, OwningClass,
3729 Context.getTypeDeclType(Record),
3747 Anon = VarDecl::Create(Context, Owner,
3750 Context.getTypeDeclType(Record),
3816 NamedDecl* Anon = FieldDecl::Create(Context,
3821 Context.getTypeDeclType(Record),
3866 NameInfo.setName(Context.DeclarationNames.getCXXOperatorName(
3876 NameInfo.setName(Context.DeclarationNames.getCXXLiteralOperatorName(
3887 NameInfo.setName(Context.DeclarationNames.getCXXConversionFunctionName(
3888 Context.getCanonicalType(Ty)));
3899 NameInfo.setName(Context.DeclarationNames.getCXXConstructorName(
3900 Context.getCanonicalType(Ty)));
3915 QualType CurClassType = Context.getTypeDeclType(CurClass);
3921 NameInfo.setName(Context.DeclarationNames.getCXXConstructorName(
3922 Context.getCanonicalType(CurClassType)));
3934 NameInfo.setName(Context.DeclarationNames.getCXXDestructorName(
3935 Context.getCanonicalType(Ty)));
3944 return Context.getNameForTemplate(TName, TNameLoc);
3970 static bool hasSimilarParameters(ASTContext &Context,
3982 if (Context.hasSameType(DefParamTy, DeclParamTy))
3990 if (Context.hasSameUnqualifiedType(DeclParamBaseTy, DefParamBaseTy) ||
4029 TSI = S.Context.getTrivialTypeSourceInfo(T, DS.getTypeSpecTypeLoc());
4181 !Context.hasSameType(Name.getCXXNameType(),
4182 Context.getTypeDeclType(cast<CXXRecordDecl>(Cur))))
4419 ASTContext &Context,
4438 TryToFixInvalidVariablyModifiedType(Pointee, Context, SizeIsNegative,
4441 FixedType = Context.getPointerType(FixedType);
4442 return Qs.apply(Context, FixedType);
4447 TryToFixInvalidVariablyModifiedType(Inner, Context, SizeIsNegative,
4450 FixedType = Context.getParenType(FixedType);
4451 return Qs.apply(Context, FixedType);
4463 !VLATy->getSizeExpr()->EvaluateAsInt(Res, Context))
4474 = ConstantArrayType::getNumAddressingBits(Context, VLATy->getElementType(),
4476 if (ActiveSizeBits > ConstantArrayType::getMaxSizeBits(Context)) {
4481 return Context.getConstantArrayType(VLATy->getElementType(),
4517 ASTContext &Context,
4521 = TryToFixInvalidVariablyModifiedType(TInfo->getType(), Context,
4525 TypeSourceInfo *FixedTInfo = Context.getTrivialTypeSourceInfo(FixedTy);
4642 TryToFixInvalidVariablyModifiedTypeSourceInfo(TInfo, Context,
4675 filterNonConflictingPreviousDecls(Context, NewTD, Previous);
4686 Context.setFILEDecl(NewTD);
4688 Context.setjmp_bufDecl(NewTD);
4690 Context.setsigjmp_bufDecl(NewTD);
4692 Context.setucontext_tDecl(NewTD);
4718 ASTContext &Context) {
4725 if (Context.getLangOpts().CPlusPlus) {
4789 type = Context.getLifetimeQualifiedType(type, lifetime);
4854 bool isC99Inline = (S.Context.GetGVALinkageForFunction(FD) == GVA_C99Inline);
4952 if (Context.getBaseElementType(R)->isHalfType()) {
5040 NewVD = VarDecl::Create(Context, DC, D.getLocStart(),
5232 NewVD = VarDecl::Create(Context, DC, D.getLocStart(),
5238 VarTemplateDecl::Create(Context, DC, D.getIdentifierLoc(), Name,
5260 Context, TemplateParamLists.size() - 1, TemplateParamLists.data());
5264 NewVD->setTemplateParameterListsInfo(Context,
5298 } else if (!Context.getTargetInfo().isTLSSupported())
5379 if (!Context.getTargetInfo().isValidGCCRegisterName(Label))
5390 NewVD->addAttr(::new (Context) AsmLabelAttr(SE->getStrTokenLoc(0),
5391 Context, Label));
5473 Context.setManglingNumber(NewVD, MCtx->getManglingNumber(NewVD));
5628 S.Context.getTranslationUnitDecl()->lookup(ND->getDeclName());
5717 T = Context.getObjCObjectPointerType(T);
5770 TryToFixInvalidVariablyModifiedTypeSourceInfo(TInfo, Context,
5773 const VariableArrayType *VAT = Context.getAsVariableArrayType(T);
5863 filterNonConflictingPreviousDecls(Context, NewVD, Previous);
5894 QualType T = Data->S->Context.getTypeDeclType(BaseRecord);
5895 CanQualType CT = Data->S->Context.getCanonicalType(T);
5897 Name = Data->S->Context.DeclarationNames.getCXXDestructorName(CT);
5993 DifferentNameValidatorCCC(ASTContext &Context, FunctionDecl *TypoFD,
5995 : Context(Context), OriginalFD(TypoFD),
6009 hasSimilarParameters(Context, FD, OriginalFD, MismatchedParams)) {
6024 ASTContext &Context;
6064 DifferentNameValidatorCCC Validator(SemaRef.Context, NewFD,
6071 hasSimilarParameters(SemaRef.Context, FD, NewFD, MismatchedParams)) {
6094 hasSimilarParameters(SemaRef.Context, FD, NewFD, MismatchedParams)) {
6237 NewFD = FunctionDecl::Create(SemaRef.Context, DC,
6269 return CXXConstructorDecl::Create(SemaRef.Context, cast<CXXRecordDecl>(DC),
6281 SemaRef.Context, Record,
6298 if (SemaRef.Context.getTargetInfo().getCXXABI().isMicrosoft() &&
6313 return FunctionDecl::Create(SemaRef.Context, DC,
6329 return CXXConversionDecl::Create(SemaRef.Context, cast<CXXRecordDecl>(DC),
6348 CXXMethodDecl *Ret = CXXMethodDecl::Create(SemaRef.Context,
6359 return FunctionDecl::Create(SemaRef.Context, DC,
6370 Param->getType().getUnqualifiedType() != Context.VoidTy) {
6659 FunctionTemplate = FunctionTemplateDecl::Create(Context, DC,
6668 NewFD->setTemplateParameterListsInfo(Context,
6676 NewFD->setTemplateParameterListsInfo(Context,
6708 NewFD->setTemplateParameterListsInfo(Context,
6762 Context.DependentTy);
6763 NewFD->setType(Context.getFunctionType(Result, FPT->getArgTypes(),
6881 NewFD->setType(Context.getFunctionType(FPT->getResultType(),
6895 NewFD->addAttr(::new (Context) AsmLabelAttr(SE->getStrTokenLoc(0), Context,
6971 ::new(Context) C11NoReturnAttr(D.getDeclSpec().getNoreturnSpecLoc(),
6972 Context));
6994 NewFD->addAttr(new (Context) WarnUnusedResultAttr(SourceRange(),
6995 Context));
7280 Context.getDefaultCallingConvention(true, false));
7284 QualType R = Context.getFunctionType(FT->getResultType(), None, EPI);
7347 Context.setcudaConfigureCallDecl(NewFD);
7357 Context, CurContext, SourceLocation(),
7396 filterNonConflictingPreviousDecls(Context, NewFD, Previous);
7408 if (!AllowOverloadingOfFunction(Previous, Context)) {
7443 NewFD->addAttr(::new (Context) OverloadableAttr(SourceLocation(),
7444 Context));
7452 filterNonConflictingPreviousDecls(Context, NewFD, Previous);
7467 NewFD->addAttr(::new (Context) OverloadableAttr(SourceLocation(),
7468 Context));
7500 MD->setType(Context.getFunctionType(FPT->getResultType(),
7564 !Context.getTargetInfo().getCXXABI().canKeyFunctionBeInline()) {
7570 Context.setNonKeyFunction(oldMethod);
7585 QualType ClassType = Context.getTypeDeclType(Record);
7591 = Context.DeclarationNames.getCXXDestructorName(
7592 Context.getCanonicalType(ClassType));
7646 QualType T = Context.GetBuiltinType(BuiltinID, Error);
7647 if (!T.isNull() && !Context.hasSameType(T, NewFD->getType())) {
7650 Context.BuiltinInfo.ForgetBuiltin(BuiltinID, Context.Idents);
7663 else if (!R.isPODType(Context) && !R->isVoidType() &&
7728 if (Context.hasSameUnqualifiedType(FT->getResultType(), Context.IntTy)) {
7769 if (nparams == 4 && Context.getTargetInfo().getTriple().isOSDarwin())
7782 Context.getPointerType(Context.getPointerType(Context.CharTy));
7783 QualType Expected[] = { Context.IntTy, CharPP, CharPP, CharPP };
7790 if (Context.hasSameUnqualifiedType(AT, Expected[i]))
7802 Context.hasSameType(QualType(qs.strip(PT->getPointeeType()), 0),
7803 Context.CharTy)) {
7855 if (Init->isConstantInitializer(Context, false))
7876 SelfReferenceChecker(Sema &S, Decl *OrigDecl) : Inherited(S.Context),
7882 isPODType = VD->getType().isPODType(S.Context);
8041 Context.getCanonicalType(IL->getType()) == Context.IntTy)
8093 Init->getType() == Context.UnknownAnyTy) {
8094 ExprResult Result = forceUnknownAnyToType(Init, Context.getObjCIdType());
8156 if (const ArrayType *Array = Context.getAsIncompleteArrayType(BaseDeclType))
8225 Init->getType() == Context.UnknownAnyTy) {
8226 ExprResult Result = forceUnknownAnyToType(Init, Context.getObjCIdType());
8335 !Init->isConstantInitializer(Context, false))
8387 else if (Init->isIntegerConstantExpr(Context, &Loc))
8389 else if (Init->isEvaluatable(Context)) {
8417 if (!Init->isValueDependent() && !Init->isEvaluatable(Context)) {
8425 } else if (getLangOpts().CPlusPlus11 && DclT->isLiteralType(Context)) {
8439 !(Context.getBaseElementType(VDecl->getType()).isConstQualified() ||
8451 Context, VDecl->getType()->isReferenceType())) {
8509 Context.getBaseElementType(Ty),
8606 = Context.getAsIncompleteArrayType(Type)) {
8661 Context.getBaseElementType(Type),
8687 = Context.getBaseElementType(Type)->getAs<RecordType>()) {
8831 Expr *varRef =new (Context) DeclRefExpr(var, false, type, VK_LValue, poi);
8839 Context.setBlockVarCopyInits(var, init);
8846 QualType baseType = Context.getBaseElementType(type);
8859 !Init->isConstantInitializer(Context, baseType->isReferenceType()))
8880 } else if (var->isUsableInConstantExpressions(Context)) {
8947 if (!MagicValueExpr->isIntegerConstantExpr(MagicValueInt, Context)) {
9019 CanQualType UCanon = Context.getCanonicalType(U);
9043 DeclGroupRef::Create(Context, Group.data(), Group.size()));
9075 ArrayRef<RawComment *> Comments = Context.getRawCommentList().getComments();
9086 Context.getCommentForDecl(Group[i], &PP);
9173 ParmVarDecl *New = CheckParameter(Context.getTranslationUnitDecl(),
9214 ParmVarDecl *Param = ParmVarDecl::Create(Context, DC, Loc, Loc, 0,
9215 T, Context.getTrivialTypeSourceInfo(T, Loc),
9246 if (!ReturnTy->isDependentType() && ReturnTy.isPODType(Context)) {
9247 unsigned Size = Context.getTypeSizeInChars(ReturnTy).getQuantity();
9257 if (T->isDependentType() || !T.isPODType(Context))
9259 unsigned Size = Context.getTypeSizeInChars(T).getQuantity();
9290 T = Context.getLifetimeQualifiedType(T, lifetime);
9293 ParmVarDecl *New = ParmVarDecl::Create(Context, DC, StartLoc, NameLoc, Name,
9294 Context.getAdjustedParameterType(T),
9313 T = Context.getObjCObjectPointerType(T);
9533 if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID) &&
9534 !Context.BuiltinInfo.isPredefinedRuntimeFunction(BuiltinID)) {
9605 if (D->getLexicalDeclContext() == Context.getTranslationUnitDecl()) {
9607 for (DeclContext::decl_iterator DI = Context.getTranslationUnitDecl()->decls_begin(),
9608 DE = Context.getTranslationUnitDecl()->decls_end(); DI != DE; ++DI) {
9610 Context.getTranslationUnitDecl()->removeDecl(D);
9763 Context.adjustDeducedFunctionResultType(
9764 FD, SubstAutoType(ResultType.getType(), Context.VoidTy));
9983 CurContext = Context.getTranslationUnitDecl();
10014 if (Context.BuiltinInfo.isPrintfLike(BuiltinID, FormatIdx, HasVAListArg)) {
10021 FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
10022 &Context.Idents.get(fmt),
10027 if (Context.BuiltinInfo.isScanfLike(BuiltinID, FormatIdx,
10030 FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
10031 &Context.Idents.get("scanf"),
10040 Context.BuiltinInfo.isConstWithoutErrno(BuiltinID)) {
10042 FD->addAttr(::new (Context) ConstAttr(FD->getLocation(), Context));
10045 if (Context.BuiltinInfo.isReturnsTwice(BuiltinID) &&
10047 FD->addAttr(::new (Context) ReturnsTwiceAttr(FD->getLocation(), Context));
10048 if (Context.BuiltinInfo.isNoThrow(BuiltinID) && !FD->getAttr<NoThrowAttr>())
10049 FD->addAttr(::new (Context) NoThrowAttr(FD->getLocation(), Context));
10050 if (Context.BuiltinInfo.isConst(BuiltinID) && !FD->getAttr<ConstAttr>())
10051 FD->addAttr(::new (Context) ConstAttr(FD->getLocation(), Context));
10071 FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
10072 &Context.Idents.get("printf"), 2,
10080 FD->addAttr(::new (Context) FormatArgAttr(FD->getLocation(), Context, 1));
10091 TInfo = Context.getTrivialTypeSourceInfo(T);
10095 TypedefDecl *NewTD = TypedefDecl::Create(Context, CurContext,
10140 if (!Context.hasSameType(T, Context.getTagDeclType(tagFromDeclSpec)))
10189 !Context.hasSameUnqualifiedType(EnumUnderlyingTy,
10399 EnumUnderlying = Context.IntTy.getTypePtr();
10409 EnumUnderlying = Context.IntTy.getTypePtr();
10413 EnumUnderlying = Context.IntTy.getTypePtr();
10417 EnumUnderlying = Context.IntTy.getTypePtr();
10547 SearchDC = Context.getTranslationUnitDecl();
10782 = cast<TagType>(Context.getTagDeclType(PrevTagDecl));
10890 New = EnumDecl::Create(Context, SearchDC, KWLoc, Loc, Name,
10937 New = CXXRecordDecl::Create(Context, Kind, SearchDC, KWLoc, Loc, Name,
10943 New = RecordDecl::Create(Context, Kind, SearchDC, KWLoc, Loc, Name,
10960 New->setQualifierInfo(SS.getWithLocInContext(Context));
10962 New->setTemplateParameterListsInfo(Context,
11013 Diag(Loc, diag::warn_decl_in_param_list) << Context.getTagDeclType(New);
11061 Context.setFILEDecl(New);
11119 Record->addAttr(new (Context)
11120 FinalAttr(FinalLoc, Context, IsFinalSpelledSealed));
11128 = CXXRecordDecl::Create(Context, Record->getTagKind(), CurContext,
11133 Context.getTypeDeclType(InjectedClassName, Record);
11256 uint64_t TypeSize = Context.getTypeSize(FieldTy);
11310 T = Context.IntTy;
11311 TInfo = Context.getTrivialTypeSourceInfo(T, Loc);
11416 T = Context.IntTy;
11419 QualType EltTy = Context.getBaseElementType(T);
11448 TryToFixInvalidVariablyModifiedTypeSourceInfo(TInfo, Context,
11476 BitWidth = VerifyBitField(Loc, II, T, Record->isMsStruct(Context), BitWidth,
11503 FieldDecl *NewFD = FieldDecl::Create(Context, Record, TSSL, Loc, II, T, TInfo,
11572 QualType EltTy = Context.getBaseElementType(FD->getType());
11606 FD->addAttr(new (Context) UnavailableAttr(Loc, Context,
11690 // Case of ivar declared in an implementation. Context is that of its class.
11708 ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, EnclosingContext,
11762 if (!Ivar->isBitField() || Ivar->getBitWidthValue(Context) == 0)
11775 llvm::APInt Zero(Context.getTypeSize(Context.IntTy), 0);
11776 Expr * BW = IntegerLiteral::Create(Context, Zero, Context.IntTy, DeclLoc);
11778 Ivar = ObjCIvarDecl::Create(Context, cast<ObjCContainerDecl>(CurContext),
11780 Context.CharTy,
11781 Context.getTrivialTypeSourceInfo(Context.CharTy,
11801 Context.ResetObjCLayout(cast<ObjCCategoryDecl>(DC)->getClassInterface());
11804 Context.
11906 !Context.getBaseElementType(FD->getType()).isPODType(Context)) {
11960 QualType T = Context.getObjCObjectPointerType(FD->getType());
11975 FD->addAttr(new (Context) UnavailableAttr(loc, Context,
11990 else if (Context.getAsArrayType(FD->getType())) {
11991 QualType BaseType = Context.getBaseElementType(FD->getType());
12028 if (Context.getTargetInfo().getCXXABI().isMicrosoft())
12107 if (I->getBitWidthValue(Context) > 0)
12113 !Context.getTypeSizeInChars(FieldType).isZero())
12205 static bool isRepresentableIntegerValue(ASTContext &Context,
12208 assert(T->isIntegralType(Context) && "Integral type required!");
12209 unsigned BitWidth = Context.getIntWidth(T);
12221 static QualType getNextLargerIntegralType(ASTContext &Context, QualType T) {
12224 assert(T->isIntegralType(Context) && "Integral type required!");
12227 Context.ShortTy, Context.IntTy, Context.LongTy, Context.LongLongTy
12230 Context.UnsignedShortTy, Context.UnsignedIntTy, Context.UnsignedLongTy,
12231 Context.UnsignedLongLongTy
12234 unsigned BitWidth = Context.getTypeSize(T);
12238 if (Context.getTypeSize(Types[I]) > BitWidth)
12249 unsigned IntWidth = Context.getTargetInfo().getIntWidth();
12261 EltTy = Context.DependentTy;
12289 if (!isRepresentableIntegerValue(Context, EnumVal, EltTy)) {
12311 if (!isRepresentableIntegerValue(Context, EnumVal, Context.IntTy))
12315 else if (!Context.hasSameType(Val->getType(), Context.IntTy)) {
12317 Val = ImpCastExprToType(Val, Context.IntTy, CK_IntegralCast).take();
12327 EltTy = Context.DependentTy;
12341 EltTy = Context.IntTy;
12361 QualType T = getNextLargerIntegralType(Context, EltTy);
12385 EnumVal = EnumVal.zextOrTrunc(Context.getIntWidth(EltTy));
12396 !isRepresentableIntegerValue(Context, EnumVal, EltTy)) {
12407 EnumVal = EnumVal.extOrTrunc(Context.getIntWidth(EltTy));
12411 return EnumConstantDecl::Create(Context, Enum, IdLoc, Id, EltTy,
12664 QualType EnumType = Context.getTypeDeclType(Enum);
12678 Enum->completeDefinition(Context.DependentTy, Context.DependentTy, 0, 0);
12685 unsigned IntWidth = Context.getTargetInfo().getIntWidth();
12686 unsigned CharWidth = Context.getTargetInfo().getCharWidth();
12687 unsigned ShortWidth = Context.getTargetInfo().getShortWidth();
12714 AllElementsInt = ECD->getType() == Context.IntTy;
12741 BestPromotionType = Context.getPromotedIntegerType(BestType);
12754 BestType = Context.SignedCharTy;
12758 BestType = Context.ShortTy;
12761 BestType = Context.IntTy;
12764 BestWidth = Context.getTargetInfo().getLongWidth();
12767 BestType = Context.LongTy;
12769 BestWidth = Context.getTargetInfo().getLongLongWidth();
12773 BestType = Context.LongLongTy;
12776 BestPromotionType = (BestWidth <= IntWidth ? Context.IntTy : BestType);
12782 BestType = Context.UnsignedCharTy;
12783 BestPromotionType = Context.IntTy;
12786 BestType = Context.UnsignedShortTy;
12787 BestPromotionType = Context.IntTy;
12790 BestType = Context.UnsignedIntTy;
12794 ? Context.UnsignedIntTy : Context.IntTy;
12796 (BestWidth = Context.getTargetInfo().getLongWidth())) {
12797 BestType = Context.UnsignedLongTy;
12800 ? Context.UnsignedLongTy : Context.LongTy;
12802 BestWidth = Context.getTargetInfo().getLongLongWidth();
12805 BestType = Context.UnsignedLongLongTy;
12808 ? Context.UnsignedLongLongTy : Context.LongLongTy;
12834 isRepresentableIntegerValue(Context, InitVal, Context.IntTy)) {
12835 NewTy = Context.IntTy;
12859 !Context.hasSameType(NewTy, ECD->getInitExpr()->getType()))
12860 ECD->setInitExpr(ImplicitCastExpr::Create(Context, NewTy,
12894 FileScopeAsmDecl *New = FileScopeAsmDecl::Create(Context, CurContext,
12922 ImportDecl *Import = ImportDecl::Create(Context,
12923 Context.getTranslationUnitDecl(),
12926 Context.getTranslationUnitDecl()->addDecl(Import);
12957 ::new (Context) AsmLabelAttr(AliasNameLoc, Context, AliasName->getName());
12972 PrevDecl->addAttr(::new (Context) WeakAttr(PragmaLoc, Context));