From 875a402dc32237a148a80c97c58895049110ecc4 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 25 Jul 2012 07:26:32 +0000 Subject: [PATCH] Turn -Wobjc-root-class on by default. . llvm-svn: 160707 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/test/Analysis/delegates.m | 2 +- clang/test/PCH/objc_methods.m | 2 +- clang/test/Sema/warn-documentation.m | 2 +- clang/test/Sema/warn-self-assign-field.mm | 2 +- clang/test/SemaObjC/error-implicit-property.m | 2 +- clang/test/SemaObjC/iboutlet.m | 4 ++-- clang/test/SemaObjC/no-ivar-in-interface-block.m | 2 +- clang/test/SemaObjC/property-12.m | 2 +- clang/test/SemaObjC/weak-receiver-warn.m | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 67f43d22c814..6a4e7d8c9bb9 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/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/clang/test/Analysis/delegates.m b/clang/test/Analysis/delegates.m index 970f81a59136..7fc4f2bb9616 100644 --- a/clang/test/Analysis/delegates.m +++ b/clang/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/clang/test/PCH/objc_methods.m b/clang/test/PCH/objc_methods.m index e90a463dce6b..e8aab843dc51 100644 --- a/clang/test/PCH/objc_methods.m +++ b/clang/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/clang/test/Sema/warn-documentation.m b/clang/test/Sema/warn-documentation.m index 3a661c5ef407..4b6aac3b4964 100644 --- a/clang/test/Sema/warn-documentation.m +++ b/clang/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/clang/test/Sema/warn-self-assign-field.mm b/clang/test/Sema/warn-self-assign-field.mm index ad0ff3e694b2..3ba8d62b663f 100644 --- a/clang/test/Sema/warn-self-assign-field.mm +++ b/clang/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/clang/test/SemaObjC/error-implicit-property.m b/clang/test/SemaObjC/error-implicit-property.m index ea0587a7449a..7e795c718829 100644 --- a/clang/test/SemaObjC/error-implicit-property.m +++ b/clang/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/clang/test/SemaObjC/iboutlet.m b/clang/test/SemaObjC/iboutlet.m index c9f5d8cf2a6a..a29915c393a1 100644 --- a/clang/test/SemaObjC/iboutlet.m +++ b/clang/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/clang/test/SemaObjC/no-ivar-in-interface-block.m b/clang/test/SemaObjC/no-ivar-in-interface-block.m index 1d3b518aa5ce..215db6150e53 100644 --- a/clang/test/SemaObjC/no-ivar-in-interface-block.m +++ b/clang/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/clang/test/SemaObjC/property-12.m b/clang/test/SemaObjC/property-12.m index ee9cb1a843fd..c4a755555629 100644 --- a/clang/test/SemaObjC/property-12.m +++ b/clang/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/clang/test/SemaObjC/weak-receiver-warn.m b/clang/test/SemaObjC/weak-receiver-warn.m index e6f8eaba8c50..547f0087bc40 100644 --- a/clang/test/SemaObjC/weak-receiver-warn.m +++ b/clang/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