diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-27 21:19:25 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-27 21:19:25 +0000 |
commit | 7e35274df4a598d5e3e4b8b5567bcb256fc2ab2f (patch) | |
tree | 9af0d7e5a8732234086cac9ea35c54ee2014f780 /test/SemaObjCXX | |
parent | e81fdb1fdde48d3fa18df56c5797f6b0bc5dfc4a (diff) |
Objective-C: Issue more precise warning when user
is accessing 'isa' as an object pointer.
// rdar://13503456. FixIt to follow in another patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX')
-rw-r--r-- | test/SemaObjCXX/instantiate-expr.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaObjCXX/instantiate-expr.mm b/test/SemaObjCXX/instantiate-expr.mm index 071bf6bced..e9d296db8f 100644 --- a/test/SemaObjCXX/instantiate-expr.mm +++ b/test/SemaObjCXX/instantiate-expr.mm @@ -21,7 +21,7 @@ void f(U value, V value2) { get_an_A(N)->ivar = value; // expected-error{{assigning to 'int' from incompatible type 'int *'}} get_an_A(N).prop = value2; // expected-error{{assigning to 'int' from incompatible type 'double *'}} T c = get_an_id(N)->isa; // expected-error{{cannot initialize a variable of type 'int' with an lvalue of type 'Class'}} \ - // expected-warning 5 {{direct access to Objective-C's isa is deprecated in favor of object_setClass() and object_getClass()}} + // expected-warning 3 {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}} } template void f<6, Class>(int, int); // expected-note{{in instantiation of}} @@ -46,7 +46,7 @@ template void f2(A*, int, double*); // expected-note{{instantiation of}} template<typename T, typename U> void f3(U ptr) { T c = ptr->isa; // expected-error{{cannot initialize a variable of type 'int' with an lvalue of type 'Class'}} \ - // expected-warning 2 {{direct access to Objective-C's isa is deprecated in favor of object_setClass() and object_getClass()}} + // expected-warning 1 {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}} } template void f3<Class>(id); // expected-note{{in instantiation of}} |