From: Ted Kremenek Date: Wed, 25 Jul 2012 07:26:32 +0000 (+0000) Subject: Turn -Wobjc-root-class on by default. . X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34653184b0dbd9423215b8324b23c260ab7efa2e;p=clang Turn -Wobjc-root-class on by default. . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160707 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 67f43d22c8..6a4e7d8c9b 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -480,7 +480,7 @@ def err_objc_root_class_subclass : Error< "objc_root_class attribute may only be specified on a root class declaration">; def warn_objc_root_class_missing : Warning< "class %0 defined without specifying a base class">, - InGroup, DefaultIgnore; + InGroup; def note_objc_needs_superclass : Note< "add a super class to fix this problem">; def warn_dup_category_def : Warning< diff --git a/test/Analysis/delegates.m b/test/Analysis/delegates.m index 970f81a591..7fc4f2bb96 100644 --- a/test/Analysis/delegates.m +++ b/test/Analysis/delegates.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -Wno-objc-root-class -verify %s //===----------------------------------------------------------------------===// diff --git a/test/PCH/objc_methods.m b/test/PCH/objc_methods.m index e90a463dce..e8aab843dc 100644 --- a/test/PCH/objc_methods.m +++ b/test/PCH/objc_methods.m @@ -1,5 +1,5 @@ // Test this without pch. -// RUN: %clang_cc1 -include %S/objc_methods.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/objc_methods.h -fsyntax-only -Wno-objc-root-class -verify %s // Test with pch. // RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_methods.h diff --git a/test/Sema/warn-documentation.m b/test/Sema/warn-documentation.m index 3a661c5ef4..4b6aac3b49 100644 --- a/test/Sema/warn-documentation.m +++ b/test/Sema/warn-documentation.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -Wdocumentation -Wdocumentation-pedantic -verify %s @class NSString; diff --git a/test/Sema/warn-self-assign-field.mm b/test/Sema/warn-self-assign-field.mm index ad0ff3e694..3ba8d62b66 100644 --- a/test/Sema/warn-self-assign-field.mm +++ b/test/Sema/warn-self-assign-field.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s class S { public: diff --git a/test/SemaObjC/error-implicit-property.m b/test/SemaObjC/error-implicit-property.m index ea0587a744..7e795c7188 100644 --- a/test/SemaObjC/error-implicit-property.m +++ b/test/SemaObjC/error-implicit-property.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -Wno-objc-root-class -verify %s // rdar://11273060 @interface I diff --git a/test/SemaObjC/iboutlet.m b/test/SemaObjC/iboutlet.m index c9f5d8cf2a..a29915c393 100644 --- a/test/SemaObjC/iboutlet.m +++ b/test/SemaObjC/iboutlet.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify %s -// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -verify %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -Wno-objc-root-class -verify %s +// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -Wno-objc-root-class -verify %s // rdar://11448209 #define READONLY readonly diff --git a/test/SemaObjC/no-ivar-in-interface-block.m b/test/SemaObjC/no-ivar-in-interface-block.m index 1d3b518aa5..215db6150e 100644 --- a/test/SemaObjC/no-ivar-in-interface-block.m +++ b/test/SemaObjC/no-ivar-in-interface-block.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wobjc-interface-ivars %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -Wobjc-interface-ivars %s // rdar://10763173 @interface I diff --git a/test/SemaObjC/property-12.m b/test/SemaObjC/property-12.m index ee9cb1a843..c4a7555556 100644 --- a/test/SemaObjC/property-12.m +++ b/test/SemaObjC/property-12.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -Wreadonly-setter-attrs -verify %s @protocol P0 @property(readonly,assign) id X; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}} diff --git a/test/SemaObjC/weak-receiver-warn.m b/test/SemaObjC/weak-receiver-warn.m index e6f8eaba8c..547f0087bc 100644 --- a/test/SemaObjC/weak-receiver-warn.m +++ b/test/SemaObjC/weak-receiver-warn.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -fblocks -Wreceiver-is-weak -verify %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -fblocks -Wno-objc-root-class -Wreceiver-is-weak -verify %s // rdar://10225276 @interface Test0