[cfe-commits] r125535 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/incomplete-implementation.m

Ted Kremenek kremenek at apple.com
Mon Feb 14 15:59:16 PST 2011


Author: kremenek
Date: Mon Feb 14 17:59:16 2011
New Revision: 125535

URL: http://llvm.org/viewvc/llvm-project?rev=125535&view=rev
Log:
Put "incomplete implementation" warning under a flag.

Added:
    cfe/trunk/test/SemaObjC/incomplete-implementation.m
Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=125535&r1=125534&r2=125535&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Feb 14 17:59:16 2011
@@ -343,7 +343,8 @@
   "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<DiagGroup<"incomplete-implementation">>;
 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">;

Added: cfe/trunk/test/SemaObjC/incomplete-implementation.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/incomplete-implementation.m?rev=125535&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/incomplete-implementation.m (added)
+++ cfe/trunk/test/SemaObjC/incomplete-implementation.m Mon Feb 14 17:59:16 2011
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+ at interface I
+- Meth; // expected-note{{method definition for 'Meth' not found}}
+ at end
+
+ at implementation  I  // expected-warning{{incomplete implementation}}
+ at end
+
+ at implementation I(CAT)
+- Meth {return 0;}
+ at end
+
+#pragma GCC diagnostic ignored "-Wincomplete-implementation"
+ at interface I2
+- Meth;
+ at end
+
+ at implementation  I2
+ at end
+
+ at implementation I2(CAT)
+- Meth {return 0;}
+ at end
+
+





More information about the cfe-commits mailing list