diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-28 23:19:50 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-28 23:19:50 +0000 |
| commit | 9f8b19e9aea9c292bf023b7af61595694ab9c11d (patch) | |
| tree | dfe180ca057f7d6f817c2a576b056863d5ca45f6 /clang/test/SemaObjC/incomplete-implementation.m | |
| parent | b15c1dbfa1c79c667afce651dc98f68f138e950e (diff) | |
| download | bcm5719-llvm-9f8b19e9aea9c292bf023b7af61595694ab9c11d.tar.gz bcm5719-llvm-9f8b19e9aea9c292bf023b7af61595694ab9c11d.zip | |
objective-c: warn if implementation of a method in category
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group. // rdar://7020493
llvm-svn: 136426
Diffstat (limited to 'clang/test/SemaObjC/incomplete-implementation.m')
| -rw-r--r-- | clang/test/SemaObjC/incomplete-implementation.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/SemaObjC/incomplete-implementation.m b/clang/test/SemaObjC/incomplete-implementation.m index 612c331ae8c..f5c5a7cc181 100644 --- a/clang/test/SemaObjC/incomplete-implementation.m +++ b/clang/test/SemaObjC/incomplete-implementation.m @@ -1,26 +1,27 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s @interface I -- Meth; // expected-note{{method definition for 'Meth' not found}} +- Meth; // expected-note{{method definition for 'Meth' not found}} \ + // expected-note{{method declared here}} @end @implementation I // expected-warning{{incomplete implementation}} @end @implementation I(CAT) -- Meth {return 0;} +- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}} @end #pragma GCC diagnostic ignored "-Wincomplete-implementation" @interface I2 -- Meth; +- Meth; // expected-note{{method declared here}} @end @implementation I2 @end @implementation I2(CAT) -- Meth {return 0;} +- Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}} @end |

