@@ -2368,36 +2368,45 @@ class ObjCImplementationAttr final : public DeclAttribute {
23682368// / which declares one of the roles that a given macro can inhabit.
23692369class MacroRoleAttr final
23702370 : public DeclAttribute,
2371- private llvm::TrailingObjects<MacroRoleAttr, MacroIntroducedDeclName> {
2371+ private llvm::TrailingObjects<MacroRoleAttr, MacroIntroducedDeclName,
2372+ TypeExpr *> {
23722373 friend TrailingObjects;
23732374
23742375 MacroSyntax syntax;
23752376 MacroRole role;
23762377 unsigned numNames;
2378+ unsigned numConformances;
23772379 SourceLoc lParenLoc, rParenLoc;
23782380
23792381 MacroRoleAttr (SourceLoc atLoc, SourceRange range, MacroSyntax syntax,
23802382 SourceLoc lParenLoc, MacroRole role,
23812383 ArrayRef<MacroIntroducedDeclName> names,
2384+ ArrayRef<TypeExpr *> conformances,
23822385 SourceLoc rParenLoc, bool implicit);
23832386
23842387public:
23852388 static MacroRoleAttr *create (ASTContext &ctx, SourceLoc atLoc,
23862389 SourceRange range, MacroSyntax syntax,
23872390 SourceLoc lParenLoc, MacroRole role,
23882391 ArrayRef<MacroIntroducedDeclName> names,
2392+ ArrayRef<TypeExpr *> conformances,
23892393 SourceLoc rParenLoc, bool implicit);
23902394
23912395 size_t numTrailingObjects (OverloadToken<MacroIntroducedDeclName>) const {
23922396 return numNames;
23932397 }
23942398
2399+ size_t numTrailingObjects (OverloadToken<TypeExpr *>) const {
2400+ return numConformances;
2401+ }
2402+
23952403 SourceLoc getLParenLoc () const { return lParenLoc; }
23962404 SourceLoc getRParenLoc () const { return rParenLoc; }
23972405
23982406 MacroSyntax getMacroSyntax () const { return syntax; }
23992407 MacroRole getMacroRole () const { return role; }
24002408 ArrayRef<MacroIntroducedDeclName> getNames () const ;
2409+ ArrayRef<TypeExpr *> getConformances () const ;
24012410 bool hasNameKind (MacroIntroducedDeclNameKind kind) const ;
24022411
24032412 static bool classof (const DeclAttribute *DA) {
0 commit comments