diff options
-rw-r--r-- | lib/AST/ASTContext.cpp | 3 | ||||
-rw-r--r-- | test/CodeGenObjC/objc2-property-encode.m | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 9659b94dd0..d7f686f127 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2085,7 +2085,8 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, return; } else if (PointeeTy->isObjCInterfaceType()) { - if (dyn_cast<TypedefType>(PointeeTy.getTypePtr())) { + if (!EncodingProperty && + dyn_cast<TypedefType>(PointeeTy.getTypePtr())) { // Another historical/compatibility reason. // We encode the underlying type which comes out as // {...}; diff --git a/test/CodeGenObjC/objc2-property-encode.m b/test/CodeGenObjC/objc2-property-encode.m new file mode 100644 index 0000000000..deae4b722b --- /dev/null +++ b/test/CodeGenObjC/objc2-property-encode.m @@ -0,0 +1,13 @@ +// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s && +// RUN: grep -e "T@\\\\22NSString\\\\22" %t +@interface NSString @end + +typedef NSString StoreVersionID ; + +@interface Parent + @property(retain) StoreVersionID* foo; +@end + +@implementation Parent +@dynamic foo; +@end |