From 2cbe84dd36664b54bf056e4c69fe8d0fecd7346c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 29 Nov 2011 19:18:47 +0000 Subject: [PATCH] Place "use @dynamic or provide a method implementation" warnings under a -W flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145418 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticGroups.td | 1 + include/clang/Basic/DiagnosticSemaKinds.td | 6 ++++-- test/Misc/warning-flags.c | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 8a2313423d..48b02d6ecf 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -120,6 +120,7 @@ def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">; def : DiagGroup<"overflow">; def OverlengthStrings : DiagGroup<"overlength-strings">; def OverloadedVirtual : DiagGroup<"overloaded-virtual">; +def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">; def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">; def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">; def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 8bf377f8d0..d3b7687e9b 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3738,10 +3738,12 @@ def err_incomplete_type_objc_at_encode : Error< def warn_setter_getter_impl_required : Warning< "property %0 requires method %1 to be defined - " "use @synthesize, @dynamic or provide a method implementation " - "in this class implementation">; + "in this class implementation">, + InGroup; def warn_setter_getter_impl_required_in_category : Warning< "property %0 requires method %1 to be defined - " - "use @dynamic or provide a method implementation in this category">; + "use @dynamic or provide a method implementation in this category">, + InGroup; def note_property_impl_required : Note< "implementation is here">; def note_parameter_named_here : Note< diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index 5fc48cdb6d..04a2fde860 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -17,7 +17,7 @@ This test serves two purposes: The list of warnings below should NEVER grow. It should gradually shrink to 0. -CHECK: Warnings without flags (274): +CHECK: Warnings without flags (272): CHECK-NEXT: ext_anon_param_requires_type_specifier CHECK-NEXT: ext_anonymous_struct_union_qualified CHECK-NEXT: ext_array_init_copy @@ -265,8 +265,6 @@ CHECK-NEXT: warn_remainder_by_zero CHECK-NEXT: warn_root_inst_method_not_found CHECK-NEXT: warn_second_parameter_of_va_start_not_last_named_argument CHECK-NEXT: warn_second_parameter_to_va_arg_never_compatible -CHECK-NEXT: warn_setter_getter_impl_required -CHECK-NEXT: warn_setter_getter_impl_required_in_category CHECK-NEXT: warn_standalone_specifier CHECK-NEXT: warn_static_inline_explicit_inst_ignored CHECK-NEXT: warn_static_non_static -- 2.40.0