diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp index 14dba8f0a0..e723d0c54f 100644 --- a/lib/Rewrite/RewriteModernObjC.cpp +++ b/lib/Rewrite/RewriteModernObjC.cpp @@ -7160,7 +7160,7 @@ void RewriteModernObjC::RewriteObjCCategoryImplDecl(ObjCCategoryImplDecl *IDecl, ClassProperties.push_back(&*I); Write_prop_list_t_initializer(*this, Context, Result, ClassProperties, - /* Container */0, + /* Container */IDecl, "_OBJC_$_PROP_LIST_", FullCategoryName); diff --git a/test/Rewriter/objc-modern-property-attributes.mm b/test/Rewriter/objc-modern-property-attributes.mm index 7d74a95e7d..abebb2c0fe 100644 --- a/test/Rewriter/objc-modern-property-attributes.mm +++ b/test/Rewriter/objc-modern-property-attributes.mm @@ -33,3 +33,13 @@ typedef void (^void_block_t)(void); // CHECK: T@?,C,V__completion // CHECK: T@\"PropertyClass\",&,VYVAR +@interface Test @end +@interface Test (Category) +@property int q; +@end + +@implementation Test (Category) +@dynamic q; +@end + +// CHECK: {{"q","Ti,D"}}