aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-03-19 21:25:51 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-03-19 21:25:51 +0000
commit8d52cbdce856d6498a5c454b8e113498e645cc4d (patch)
treea8e04f0e5dea9b4d5e8f8c82de393a510a5faaaa
parent292db6401f040795db3ea4e00fc02622d6c3ba1d (diff)
More coherent diagnostics when ivar is placed n categories.
(related to radar 7538989). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98993 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--test/SemaObjC/ivar-in-class-extension.m4
2 files changed, 3 insertions, 4 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 5a95c0f852..752be5df7a 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1537,8 +1537,7 @@ def err_forward_ref_enum : Error<
"ISO C++ forbids forward references to 'enum' types">;
def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">;
def err_duplicate_member : Error<"duplicate member %0">;
-def err_misplaced_ivar : Error<"ivar may be placed in a class extension "
- "in non-fragile-abi2 mode only">;
+def err_misplaced_ivar : Error<"ivars may not be placed in categories">;
def ext_enum_value_not_int : Extension<
"ISO C restricts enumerator values to range of 'int' (%0 is too "
"%select{small|large}1)">;
diff --git a/test/SemaObjC/ivar-in-class-extension.m b/test/SemaObjC/ivar-in-class-extension.m
index 683a78feef..e1a649cd47 100644
--- a/test/SemaObjC/ivar-in-class-extension.m
+++ b/test/SemaObjC/ivar-in-class-extension.m
@@ -31,12 +31,12 @@ int fn3(SomeClass *obj) {
@end
@interface SomeClass (Category)
- { // expected-error {{ivar may be placed in a class extension}}
+ { // expected-error {{ivars may not be placed in categories}}
int categoryIvar;
}
@end
@interface SomeClass (Category1)
- { // expected-error {{ivar may be placed in a class extension}}
+ { // expected-error {{ivars may not be placed in categories}}
}
@end