Fix a regression in accessing class getter using the dot-syntax
notation. There is still an issue accessing field of a 'Class''s isa
in legacy code using dot field access notation (as noted in the test case)
but unrelated to this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/class-getter-using-dotsyntax.m b/test/SemaObjC/class-getter-using-dotsyntax.m
new file mode 100644
index 0000000..ba42590
--- /dev/null
+++ b/test/SemaObjC/class-getter-using-dotsyntax.m
@@ -0,0 +1,39 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+typedef struct objc_class *Class;
+
+struct objc_class {
+    Class isa;
+};
+
+typedef struct objc_object {
+    Class isa;
+} *id;
+
+@interface XCActivityLogSection 
++ (unsigned)serializationFormatVersion;
++ (unsigned)sectionByDeserializingData;
++ (Class)retursClass;
+@end
+
+@implementation XCActivityLogSection
+
++ (unsigned)serializationFormatVersion
+{
+
+    return 0;
+}
++ (unsigned)sectionByDeserializingData {
+    unsigned version;
+    return self.serializationFormatVersion;
+}
+
++ (Class)retursClass {
+    Class version;
+    // FIXIT. (*version).isa does not work. Results in compiler error.
+    return version->isa;
+}
+
+@end
+
+