aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclObjC.h2
-rw-r--r--include/clang/Basic/DiagnosticKinds.def2
-rw-r--r--test/SemaObjC/property-typecheck-1.m12
-rw-r--r--test/SemaObjC/property-typecheck-2.m12
4 files changed, 15 insertions, 13 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index c9f5265542..1ccc8a5570 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -277,6 +277,8 @@ class ObjCInterfaceDecl : public NamedDecl, public DeclContext {
Type *TypeForDecl;
friend class ASTContext;
+ // FIXME: We should be able to get away with this slot by saving the
+ // record decl. build lazily in a map.
RecordDecl *RecordForDecl;
/// Class's super class.
diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def
index 7beac265f7..1417b8acbd 100644
--- a/include/clang/Basic/DiagnosticKinds.def
+++ b/include/clang/Basic/DiagnosticKinds.def
@@ -457,7 +457,7 @@ DIAG(warn_objc_property_default_assign_on_object, WARNING,
DIAG(err_objc_property_requires_object, ERROR,
"property with '%0' attribute must be of object type")
DIAG(err_property_type, ERROR,
- "property cannot have type %0 (array or function type)")
+ "property cannot have array or function type %0")
DIAG(err_objc_directive_only_in_protocol, ERROR,
"directive may only be specified in protocols only")
DIAG(err_missing_catch_finally, ERROR,
diff --git a/test/SemaObjC/property-typecheck-1.m b/test/SemaObjC/property-typecheck-1.m
index d5ee8d1b88..30d56081c5 100644
--- a/test/SemaObjC/property-typecheck-1.m
+++ b/test/SemaObjC/property-typecheck-1.m
@@ -17,3 +17,15 @@
}
@end
+
+typedef int T[2];
+typedef void (F)(void);
+
+@interface C
+@property(assign) T p2; // expected-error {{property cannot have array or function type 'T'}}
+
+@property(assign) F f2; // expected-error {{property cannot have array or function type 'F'}}
+
+@end
+
+
diff --git a/test/SemaObjC/property-typecheck-2.m b/test/SemaObjC/property-typecheck-2.m
deleted file mode 100644
index b8da661126..0000000000
--- a/test/SemaObjC/property-typecheck-2.m
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: clang -fsyntax-only -verify %s
-
-typedef int T[2];
-typedef void (F)(void);
-
-@interface A
-@property(assign) T p2; // expected-error {{property cannot have type 'T' (array or function type)}}
-
-@property(assign) F f2; // expected-error {{property cannot have type 'F' (array or function type)}}
-
-@end
-