objc modern translator: fix up attribute for  dynamic property in a category.
// rdar://11095151


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156127 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp
index 14dba8f..e723d0c 100644
--- a/lib/Rewrite/RewriteModernObjC.cpp
+++ b/lib/Rewrite/RewriteModernObjC.cpp
@@ -7160,7 +7160,7 @@
     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 7d74a95..abebb2c 100644
--- a/test/Rewriter/objc-modern-property-attributes.mm
+++ b/test/Rewriter/objc-modern-property-attributes.mm
@@ -33,3 +33,13 @@
 // 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"}}