From: Ted Kremenek Date: Mon, 14 Feb 2011 23:59:16 +0000 (+0000) Subject: Put "incomplete implementation" warning under a flag. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d61df3d022835236656250565ee577a7b6f89775;p=clang Put "incomplete implementation" warning under a flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125535 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 82ebf0b56d..4e42fefdf1 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -343,7 +343,8 @@ def err_conflicting_ivar_name : Error< "conflicting instance variable names: %0 vs %1">; def err_inconsistant_ivar_count : Error< "inconsistent number of instance variables specified">; -def warn_incomplete_impl : Warning<"incomplete implementation">; +def warn_incomplete_impl : Warning<"incomplete implementation">, + InGroup>; def note_undef_method_impl : Note<"method definition for %0 not found">; def note_required_for_protocol_at : Note<"required for direct or indirect protocol %0">; diff --git a/test/SemaObjC/incomplete-implementation.m b/test/SemaObjC/incomplete-implementation.m new file mode 100644 index 0000000000..612c331ae8 --- /dev/null +++ b/test/SemaObjC/incomplete-implementation.m @@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +@interface I +- Meth; // expected-note{{method definition for 'Meth' not found}} +@end + +@implementation I // expected-warning{{incomplete implementation}} +@end + +@implementation I(CAT) +- Meth {return 0;} +@end + +#pragma GCC diagnostic ignored "-Wincomplete-implementation" +@interface I2 +- Meth; +@end + +@implementation I2 +@end + +@implementation I2(CAT) +- Meth {return 0;} +@end + +