@@ -2960,29 +2960,28 @@ MacroRoleAttr::MacroRoleAttr(SourceLoc atLoc, SourceRange range,
29602960 MacroSyntax syntax, SourceLoc lParenLoc,
29612961 MacroRole role,
29622962 ArrayRef<MacroIntroducedDeclName> names,
2963- ArrayRef<TypeExpr *> conformances,
2964- SourceLoc rParenLoc, bool implicit)
2963+ ArrayRef<Expr *> conformances, SourceLoc rParenLoc ,
2964+ bool implicit)
29652965 : DeclAttribute(DeclAttrKind::MacroRole, atLoc, range, implicit),
29662966 syntax(syntax), role(role), numNames(names.size()),
29672967 numConformances(conformances.size()), lParenLoc(lParenLoc),
29682968 rParenLoc(rParenLoc) {
29692969 auto *trailingNamesBuffer = getTrailingObjects<MacroIntroducedDeclName>();
29702970 std::uninitialized_copy (names.begin (), names.end (), trailingNamesBuffer);
29712971
2972- auto *trailingConformancesBuffer = getTrailingObjects<TypeExpr *>();
2972+ auto *trailingConformancesBuffer = getTrailingObjects<Expr *>();
29732973 std::uninitialized_copy (conformances.begin (), conformances.end (),
29742974 trailingConformancesBuffer);
29752975}
29762976
2977- MacroRoleAttr *
2978- MacroRoleAttr::create (ASTContext &ctx, SourceLoc atLoc, SourceRange range,
2979- MacroSyntax syntax, SourceLoc lParenLoc, MacroRole role,
2980- ArrayRef<MacroIntroducedDeclName> names,
2981- ArrayRef<TypeExpr *> conformances,
2982- SourceLoc rParenLoc, bool implicit) {
2983- unsigned size =
2984- totalSizeToAlloc<MacroIntroducedDeclName, TypeExpr *>(
2985- names.size (), conformances.size ());
2977+ MacroRoleAttr *MacroRoleAttr::create (ASTContext &ctx, SourceLoc atLoc,
2978+ SourceRange range, MacroSyntax syntax,
2979+ SourceLoc lParenLoc, MacroRole role,
2980+ ArrayRef<MacroIntroducedDeclName> names,
2981+ ArrayRef<Expr *> conformances,
2982+ SourceLoc rParenLoc, bool implicit) {
2983+ unsigned size = totalSizeToAlloc<MacroIntroducedDeclName, Expr *>(
2984+ names.size (), conformances.size ());
29862985 auto *mem = ctx.Allocate (size, alignof (MacroRoleAttr));
29872986 return new (mem) MacroRoleAttr (atLoc, range, syntax, lParenLoc, role, names,
29882987 conformances, rParenLoc, implicit);
@@ -2995,11 +2994,12 @@ ArrayRef<MacroIntroducedDeclName> MacroRoleAttr::getNames() const {
29952994 };
29962995}
29972996
2998- ArrayRef<TypeExpr *> MacroRoleAttr::getConformances () const {
2999- return {
3000- getTrailingObjects<TypeExpr *>(),
3001- numConformances
3002- };
2997+ ArrayRef<Expr *> MacroRoleAttr::getConformances () const {
2998+ return {getTrailingObjects<Expr *>(), numConformances};
2999+ }
3000+
3001+ MutableArrayRef<Expr *> MacroRoleAttr::getConformances () {
3002+ return {getTrailingObjects<Expr *>(), numConformances};
30033003}
30043004
30053005bool MacroRoleAttr::hasNameKind (MacroIntroducedDeclNameKind kind) const {
0 commit comments