]> granicus.if.org Git - clang/commitdiff
Added a new attribute, objc_root_class, which informs the compiler when a root class...
authorPatrick Beard <pcbeard@mac.com>
Fri, 6 Apr 2012 18:12:22 +0000 (18:12 +0000)
committerPatrick Beard <pcbeard@mac.com>
Fri, 6 Apr 2012 18:12:22 +0000 (18:12 +0000)
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154187 91177308-0d34-0410-b5e6-96231b3b80d8

209 files changed:
include/clang/AST/NSAPI.h
include/clang/Basic/Attr.td
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/NSAPI.cpp
lib/Parse/ParseObjc.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaDeclObjC.cpp
test/Analysis/CheckNSError.m
test/Analysis/NSPanel.m
test/Analysis/NSString.m
test/Analysis/ObjCProperties.m
test/Analysis/ObjCRetSigs.m
test/Analysis/dead-stores.m
test/Analysis/malloc.m
test/Analysis/misc-ps-region-store.m
test/Analysis/misc-ps.m
test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m
test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m
test/Analysis/pr_2542_rdar_6793404.m
test/Analysis/properties.m
test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m
test/Analysis/retain-release-gc-only.m
test/Analysis/retain-release.m
test/Analysis/unused-ivars.m
test/FixIt/fixit-missing-method-return-type.m
test/FixIt/typo.m
test/Modules/redecl-merge.m
test/PCH/chain-categories2.m
test/PCH/chain-selectors.m
test/PCH/method_pool.m
test/Parser/missing-end-4.m
test/Parser/objc-forcollection-neg-2.m
test/Parser/objc-forcollection-neg.m
test/Parser/objc-foreach-syntax.m
test/Parser/objc-init.m
test/Parser/objc-property-syntax.m
test/Parser/objc-synthesized-recover.m
test/SemaObjC/ClassPropertyNotObject.m
test/SemaObjC/ContClassPropertyLookup.m
test/SemaObjC/DoubleMethod.m
test/SemaObjC/alias-test-2.m
test/SemaObjC/arc-decls.m
test/SemaObjC/arc-jump-block.m
test/SemaObjC/arc-no-runtime.m
test/SemaObjC/arc-objc-lifetime.m
test/SemaObjC/arc-property-lifetime.m
test/SemaObjC/arc-property.m
test/SemaObjC/arc-readonly-property-ivar-1.m
test/SemaObjC/arc-readonly-property-ivar.m
test/SemaObjC/arc-retain-block-property.m
test/SemaObjC/arc-setter-property-match.m
test/SemaObjC/arc-unavailable-for-weakref.m
test/SemaObjC/arc-unsafe-assigns.m
test/SemaObjC/arc.m
test/SemaObjC/assign-rvalue-message.m
test/SemaObjC/atomoic-property-synnthesis-rules.m
test/SemaObjC/attr-deprecated.m
test/SemaObjC/attr-root-class.m [new file with mode: 0644]
test/SemaObjC/autoreleasepool.m
test/SemaObjC/bad-property-synthesis-crash.m
test/SemaObjC/block-on-method-param.m
test/SemaObjC/block-type-safety.m
test/SemaObjC/category-1.m
test/SemaObjC/category-method-lookup.m
test/SemaObjC/check-dup-objc-decls-1.m
test/SemaObjC/class-extension-after-implementation.m
test/SemaObjC/class-getter-using-dotsyntax.m
test/SemaObjC/class-impl-1.m
test/SemaObjC/class-message-protocol-lookup.m
test/SemaObjC/class-method-self.m
test/SemaObjC/class-protocol-method-match.m
test/SemaObjC/compatible-protocol-qualified-types.m
test/SemaObjC/comptypes-10.m
test/SemaObjC/comptypes-a.m
test/SemaObjC/conditional-expr-5.m
test/SemaObjC/conditional-expr.m
test/SemaObjC/conflict-nonfragile-abi2.m
test/SemaObjC/conflicting-ivar-test-1.m
test/SemaObjC/continuation-class-err.m
test/SemaObjC/custom-atomic-property.m
test/SemaObjC/default-synthesize-1.m
test/SemaObjC/default-synthesize-2.m
test/SemaObjC/default-synthesize-3.m
test/SemaObjC/default-synthesize.m
test/SemaObjC/deref-interface.m
test/SemaObjC/direct-synthesized-ivar-access.m
test/SemaObjC/dist-object-modifiers.m
test/SemaObjC/enhanced-proto-2.m
test/SemaObjC/err-ivar-access-in-class-method.m
test/SemaObjC/error-property-gc-attr.m
test/SemaObjC/format-strings-objc.m
test/SemaObjC/forward-class-1.m
test/SemaObjC/gcc-cast-ext.m
test/SemaObjC/ibaction.m
test/SemaObjC/idiomatic-parentheses.m
test/SemaObjC/incomplete-implementation.m
test/SemaObjC/interface-scope-2.m
test/SemaObjC/invalid-code.m
test/SemaObjC/ivar-access-tests.m
test/SemaObjC/ivar-in-class-extension.m
test/SemaObjC/ivar-in-implementations.m
test/SemaObjC/ivar-lookup-resolution-builtin.m
test/SemaObjC/ivar-lookup.m
test/SemaObjC/ivar-ref-misuse.m
test/SemaObjC/legacy-implementation-1.m
test/SemaObjC/message.m
test/SemaObjC/method-attributes.m
test/SemaObjC/method-bad-param.m
test/SemaObjC/method-conflict-1.m
test/SemaObjC/method-conflict-2.m
test/SemaObjC/method-conflict.m
test/SemaObjC/method-def-1.m
test/SemaObjC/method-lookup.m
test/SemaObjC/method-prototype-scope.m
test/SemaObjC/method-typecheck-1.m
test/SemaObjC/method-undef-extension-warn-1.m
test/SemaObjC/method-undefined-warn-1.m
test/SemaObjC/method-unused-attribute.m
test/SemaObjC/missing-atend-metadata.m
test/SemaObjC/missing-method-return-type.m
test/SemaObjC/nested-typedef-decl.m
test/SemaObjC/newproperty-class-method-1.m
test/SemaObjC/no-gc-weak-test.m
test/SemaObjC/no-ivar-access-control.m
test/SemaObjC/no-protocol-option-tests.m
test/SemaObjC/no-warn-qual-mismatch.m
test/SemaObjC/no-warn-synth-protocol-meth.m
test/SemaObjC/no-warning-unavail-unimp.m
test/SemaObjC/nonnull.m
test/SemaObjC/nsobject-attribute-1.m
test/SemaObjC/nsobject-attribute.m
test/SemaObjC/objc-buffered-methods.m
test/SemaObjC/objc-cstyle-args-in-methods.m
test/SemaObjC/objc-qualified-property-lookup.m
test/SemaObjC/pedantic-dynamic-test.m
test/SemaObjC/pragma-pack.m
test/SemaObjC/property-2.m
test/SemaObjC/property-9.m
test/SemaObjC/property-and-ivar-use.m
test/SemaObjC/property-category-1.m
test/SemaObjC/property-category-3.m
test/SemaObjC/property-category-4.m
test/SemaObjC/property-category-impl.m
test/SemaObjC/property-dot-receiver.m
test/SemaObjC/property-expression-error.m
test/SemaObjC/property-impl-misuse.m
test/SemaObjC/property-in-class-extension.m
test/SemaObjC/property-ivar-mismatch.m
test/SemaObjC/property-lookup-in-id.m
test/SemaObjC/property-method-lookup-impl.m
test/SemaObjC/property-not-lvalue.m
test/SemaObjC/property-ns-returns-not-retained-attr.m
test/SemaObjC/property-redundant-decl-accessor.m
test/SemaObjC/property-typecheck-1.m
test/SemaObjC/property-user-setter.m
test/SemaObjC/property.m
test/SemaObjC/protocol-archane.m
test/SemaObjC/protocol-id-test-1.m
test/SemaObjC/protocol-id-test-2.m
test/SemaObjC/provisional-ivar-lookup.m
test/SemaObjC/qualified-protocol-method-conflicts.m
test/SemaObjC/related-result-type-inference.m
test/SemaObjC/return.m
test/SemaObjC/scope-check.m
test/SemaObjC/selector-3.m
test/SemaObjC/selector-error.m
test/SemaObjC/self-assign.m
test/SemaObjC/self-declared-in-block.m
test/SemaObjC/severe-syntax-error.m
test/SemaObjC/sizeof-interface.m
test/SemaObjC/stand-alone-implementation.m
test/SemaObjC/synchronized.m
test/SemaObjC/synth-provisional-ivars-1.m
test/SemaObjC/synth-provisional-ivars.m
test/SemaObjC/synthesize-setter-contclass.m
test/SemaObjC/synthesized-ivar.m
test/SemaObjC/transparent-union.m
test/SemaObjC/undeclared-selector.m
test/SemaObjC/undef-protocol-methods-1.m
test/SemaObjC/undef-superclass-1.m
test/SemaObjC/unimplemented-protocol-prop.m
test/SemaObjC/unused.m
test/SemaObjC/warn-deprecated-implementations.m
test/SemaObjC/warn-forward-class-attr-deprecated.m
test/SemaObjC/warn-implicit-atomic-property.m
test/SemaObjC/warn-missing-super.m
test/SemaObjC/warn-retain-cycle.m
test/SemaObjC/warn-weak-field.m
test/SemaObjC/weak-property.m
test/SemaObjCXX/arc-overloading.mm
test/SemaObjCXX/blocks.mm
test/SemaObjCXX/composite-objc-pointertype.mm
test/SemaObjCXX/cstyle-block-pointer-cast.mm
test/SemaObjCXX/cxxoperator-selector.mm
test/SemaObjCXX/fragile-abi-object-assign.m
test/SemaObjCXX/goto.mm
test/SemaObjCXX/instantiate-method-return.mm
test/SemaObjCXX/ivar-construct.mm
test/SemaObjCXX/ivar-lookup.mm
test/SemaObjCXX/message.mm
test/SemaObjCXX/objc-decls-inside-namespace.mm
test/SemaObjCXX/objc-pointer-conv.mm
test/SemaObjCXX/overload.mm
test/SemaObjCXX/propert-dot-error.mm
test/SemaObjCXX/properties.mm
test/SemaObjCXX/property-reference.mm
test/SemaObjCXX/property-synthesis-error.mm
test/SemaObjCXX/void_to_obj.mm

index 222c8dbaccb5339a5db9e63fd332c07130ebd8c1..40e97590678430bc1e345c98cf89735b41e09f90 100644 (file)
@@ -25,6 +25,7 @@ public:
   ASTContext &getASTContext() const { return Ctx; }
 
   enum NSClassIdKindKind {
+    ClassId_NSObject,
     ClassId_NSString,
     ClassId_NSArray,
     ClassId_NSMutableArray,
@@ -32,7 +33,7 @@ public:
     ClassId_NSMutableDictionary,
     ClassId_NSNumber
   };
-  static const unsigned NumClassIds = 6;
+  static const unsigned NumClassIds = 7;
 
   enum NSStringMethodKind {
     NSStr_stringWithString,
index ee9f60f2527c2c7506903da9775beb8152123968..e8e0f35096f3ffe4209c6bb197af1f11984d889a 100644 (file)
@@ -452,6 +452,11 @@ def ObjCReturnsInnerPointer : Attr {
   let Subjects = [ObjCMethod];
 }
 
+def ObjCRootClass : Attr {
+  let Spellings = ["objc_root_class"];
+  let Subjects = [ObjCInterface];
+}
+
 def Overloadable : Attr {
   let Spellings = ["overloadable"];
 }
@@ -534,10 +539,12 @@ def Unavailable : InheritableAttr {
 
 def ArcWeakrefUnavailable : InheritableAttr {
   let Spellings = ["objc_arc_weak_reference_unavailable"];
+  let Subjects = [ObjCInterface];
 }
 
 def ObjCRequiresPropertyDefs : InheritableAttr {
   let Spellings = ["objc_requires_property_definitions"];
+  let Subjects = [ObjCInterface];
 }
 
 def Unused : InheritableAttr {
index 2e91a5ffa8cacc8e10bead2a3f89ea31635f5842..c83985345bce6623a3b3eb1f8a056843dbdac094 100644 (file)
@@ -148,6 +148,7 @@ 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">;
+def ObjCRootClass : DiagGroup<"objc-root-class">;
 def Packed : DiagGroup<"packed">;
 def Padded : DiagGroup<"padded">;
 def PointerArith : DiagGroup<"pointer-arith">;
index 30173fb7baad2d7d2f9c0187f0e13b045ce3b961..515919c4fe9ad892b1cd67029b312bf8efc7a004 100644 (file)
@@ -444,6 +444,13 @@ def note_receiver_is_id : Note<
   "receiver is treated with 'id' type for purpose of method lookup">;
 def note_suppressed_class_declare : Note<
   "class with specified objc_requires_property_definitions attribute is declared here">;
+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<ObjCRootClass>, DefaultIgnore;
+def note_objc_needs_superclass : Note<
+  "add a super class to fix this problem">;
 def warn_dup_category_def : Warning<
   "duplicate definition of category %1 on interface %0">;
 def err_conflicting_super_class : Error<"conflicting super class name %0">;
index 8f03711f4d70d45d050a038d22a2241df1c94a8b..f5ea2c54ee2a05da34d526348d471a329fed5a9e 100644 (file)
@@ -18,6 +18,7 @@ NSAPI::NSAPI(ASTContext &ctx)
 
 IdentifierInfo *NSAPI::getNSClassId(NSClassIdKindKind K) const {
   static const char *ClassName[NumClassIds] = {
+    "NSObject",
     "NSString",
     "NSArray",
     "NSMutableArray",
index c664c64b6736019f3facd228a6a5ec9455fb1682..11417fb66f350e28161e6e2c68c3eb317e23dd82 100644 (file)
@@ -161,6 +161,7 @@ void Parser::CheckNestedObjCContexts(SourceLocation AtLoc)
 ///     __attribute__((deprecated))
 ///     __attribute__((unavailable))
 ///     __attribute__((objc_exception)) - used by NSException on 64-bit
+///     __attribute__((objc_root_class))
 ///
 Decl *Parser::ParseObjCAtInterfaceDeclaration(SourceLocation AtLoc,
                                               ParsedAttributes &attrs) {
index 081c93f8c20e3adbfb50db12dd79cd1359bde115..77809e153f1043ab39aad0b8a05b601abd82eb50 100644 (file)
@@ -1593,6 +1593,22 @@ static void handleArcWeakrefUnavailableAttr(Sema &S, Decl *D,
                                           Attr.getRange(), S.Context));
 }
 
+static void handleObjCRootClassAttr(Sema &S, Decl *D, 
+                                    const AttributeList &Attr) {
+  if (!isa<ObjCInterfaceDecl>(D)) {
+    S.Diag(Attr.getLoc(), diag::err_attribute_requires_objc_interface);
+    return;
+  }
+  
+  unsigned NumArgs = Attr.getNumArgs();
+  if (NumArgs > 0) {
+    S.Diag(Attr.getLoc(), diag::err_attribute_too_many_arguments) << 0;
+    return;
+  }
+  
+  D->addAttr(::new (S.Context) ObjCRootClassAttr(Attr.getRange(), S.Context));
+}
+
 static void handleObjCRequiresPropertyDefsAttr(Sema &S, Decl *D, 
                                             const AttributeList &Attr) {
   if (!isa<ObjCInterfaceDecl>(D)) {
@@ -3658,6 +3674,9 @@ static void ProcessInheritableDeclAttr(Sema &S, Scope *scope, Decl *D,
   case AttributeList::AT_objc_arc_weak_reference_unavailable: 
     handleArcWeakrefUnavailableAttr (S, D, Attr); 
     break;
+  case AttributeList::AT_objc_root_class:
+    handleObjCRootClassAttr(S, D, Attr);
+    break;
   case AttributeList::AT_objc_requires_property_definitions: 
     handleObjCRequiresPropertyDefsAttr (S, D, Attr); 
     break;
index 6be9c7ceeb84af3cbbf9e518d9c01abe4442e46e..a942d4979d737ead02c360b1c5da218adff965e8 100644 (file)
@@ -24,6 +24,7 @@
 #include "clang/AST/ASTMutationListener.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Sema/DeclSpec.h"
+#include "clang/Lex/Preprocessor.h"
 #include "llvm/ADT/DenseSet.h"
 
 using namespace clang;
@@ -2371,11 +2372,39 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd,
       AtomicPropertySetterGetterRules(IC, IDecl);
       DiagnoseOwningPropertyGetterSynthesis(IC);
   
-      if (LangOpts.ObjCNonFragileABI2)
+      bool HasRootClassAttr = IDecl->hasAttr<ObjCRootClassAttr>();
+      if (IDecl->getSuperClass() == NULL) {
+        // This class has no superclass, so check that it has been marked with
+        // __attribute((objc_root_class)).
+        if (!HasRootClassAttr) {
+          SourceLocation DeclLoc(IDecl->getLocation());
+          SourceLocation SuperClassLoc(PP.getLocForEndOfToken(DeclLoc));
+          Diag(DeclLoc, diag::warn_objc_root_class_missing)
+            << IDecl->getIdentifier();
+          // See if NSObject is in the current scope, and if it is, suggest
+          // adding " : NSObject " to the class declaration.
+          NamedDecl *IF = LookupSingleName(TUScope,
+                                           NSAPIObj->getNSClassId(NSAPI::ClassId_NSObject),
+                                           DeclLoc, LookupOrdinaryName);
+          ObjCInterfaceDecl *NSObjectDecl = dyn_cast_or_null<ObjCInterfaceDecl>(IF);
+          if (NSObjectDecl && NSObjectDecl->getDefinition()) {
+            Diag(SuperClassLoc, diag::note_objc_needs_superclass)
+              << FixItHint::CreateInsertion(SuperClassLoc, " : NSObject ");
+          } else {
+            Diag(SuperClassLoc, diag::note_objc_needs_superclass);
+          }
+        }
+      } else if (HasRootClassAttr) {
+        // Complain that only root classes may have this attribute.
+        Diag(IDecl->getLocation(), diag::err_objc_root_class_subclass);
+      }
+
+      if (LangOpts.ObjCNonFragileABI2) {
         while (IDecl->getSuperClass()) {
           DiagnoseDuplicateIvars(IDecl, IDecl->getSuperClass());
           IDecl = IDecl->getSuperClass();
         }
+      }
     }
     SetIvarInitializers(IC);
   } else if (ObjCCategoryImplDecl* CatImplClass =
index 5bf7e08a587a30a4311281145ca7d001ab90ab7d..d35b686ef1d9c854f953fddca406d64456dee62d 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -analyzer-constraints=basic -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -analyzer-constraints=range -verify -Wno-objc-root-class %s
 
 
 typedef signed char BOOL;
index ac725716457f56f5fc6e25a73d44556a0276ecfc..578658eab694a4802e861c8b25f2bb83b0eab8f6 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,experimental.core -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,experimental.core -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,experimental.core -analyzer-store=region -analyzer-constraints=basic -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,experimental.core -analyzer-store=region -analyzer-constraints=range -verify -Wno-objc-root-class %s
 
 // BEGIN delta-debugging reduced header stuff
 
index 4add37b975401de8f29e0f7ae54debbf210eb0ed..4035cc93130a62192c262e3c85a9ca4361eb1328 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=range -verify %s
-// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=basic -verify %s
-// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=basic -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=range -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=basic -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,osx.AtomicCAS,experimental.core -analyzer-store=region -analyzer-constraints=range -verify -Wno-objc-root-class %s
 
 
 //===----------------------------------------------------------------------===//
index d88e0571e4c135505705f65efe8cc52af3994e9c..b9ed9b9a7e5fb98e19de270e7e81e93bdf819455 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=basic %s -verify
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=range %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=basic -Wno-objc-root-class %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=range -Wno-objc-root-class %s -verify
 
 // The point of this test cases is to exercise properties in the static
 // analyzer
index 02be25717a63a37dfed675d296d8dc6699017a49..13078a32232bbc6f07136072020b5bc1b4f0092a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.core -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.core -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify -Wno-objc-root-class %s
 
 int printf(const char *, ...);
 
index d67703feb39aeb7e444510f103fddce066c53c18..083427478d7e310f7ca3d40af199bd0735ba12d7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.core -analyzer-checker=deadcode.DeadStores,osx.cocoa.RetainCount -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.core -analyzer-checker=deadcode.DeadStores,osx.cocoa.RetainCount -fblocks -verify -Wno-objc-root-class %s
 
 typedef signed char BOOL;
 typedef unsigned int NSUInteger;
index 6451dbc98398c5b141e15d669b569bbf98b8557d..6c94118286ab32b60d721c919ceee3ba50e27e51 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -Wno-objc-root-class %s
 #include "system-header-simulator-objc.h"
 
 @class NSString;
index 1c5b0b29ddd66d301040fb6afef90af334a6a303..d263d4da30cce161f1a232e8a719b5b6d1bbfbd4 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core.CastToStruct,experimental.security.ReturnPtrRange,experimental.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core.CastToStruct,experimental.security.ReturnPtrRange,experimental.security.ArrayBound -analyzer-store=region -verify -fblocks   -analyzer-opt-analyze-nested-blocks %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core.CastToStruct,experimental.security.ReturnPtrRange,experimental.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core.CastToStruct,experimental.security.ReturnPtrRange,experimental.security.ArrayBound -analyzer-store=region -verify -fblocks   -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
 
 typedef long unsigned int size_t;
 void *memcpy(void *, const void *, size_t);
index 7c6818a4cdfb4ef2a46bed37d9ce92b279df96e5..9d2ff5b6ea37922efd1847824ebe393803605c44 100644 (file)
@@ -1,8 +1,8 @@
 // NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued.
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code -Wno-null-dereference %s
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code -Wno-null-dereference %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=basic -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,experimental.deadcode.IdempotentOperations,experimental.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
 
 #ifndef __clang_analyzer__
 #error __clang_analyzer__ not defined
index 7e8d96ac5760094daea264dfd47e315dad10e185..c1cc076a936232599731fbbc6803fefdb621307a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=range -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=range -analyzer-store=region -verify -Wno-objc-root-class %s
 
 // <rdar://problem/6888289> - This test case shows that a nil instance
 // variable can possibly be initialized by a method.
index 7c46426a8157c9b000aef56696d44de38474570c..e4d5aaf82b2dc03426e2a4cd5774578c54a259e1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin8 %s
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin9 %s
-// RUN: %clang_cc1 -triple thumbv6-apple-ios4.0 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin9 %s
+// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region -Wno-objc-root-class %s 2>&1 | FileCheck -check-prefix=darwin8 %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region -Wno-objc-root-class %s 2>&1 | FileCheck -check-prefix=darwin9 %s
+// RUN: %clang_cc1 -triple thumbv6-apple-ios4.0 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region -Wno-objc-root-class %s 2>&1 | FileCheck -check-prefix=darwin9 %s
 
 @interface MyClass {}
 - (void *)voidPtrM;
index d5125a649d2bbbc8be5bec7d9ae5b4516ed78ed0..19c140d9e59a665443075b0fccbb24a3f75fa518 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,experimental.core -pedantic -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,experimental.core -pedantic -analyzer-store=region -verify -Wno-objc-root-class %s
 
 // BEGIN delta-debugging reduced header stuff
 
index 231923b9ea0d49fb1577512eaf91f6a64e15f93e..4aa91805fda60a2d4d1b64dfab4ff2e00056727b 100644 (file)
@@ -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 -verify -Wno-objc-root-class %s
 
 typedef signed char BOOL;
 typedef unsigned int NSUInteger;
index 48bac623b55495494a1a574b4c5dac486cb0ca90..5af4776b32db591f4915ba632c9ffe965b6001f2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-constraints=basic -analyzer-store=region -verify -Wno-objc-root-class %s
 
 typedef struct Foo { int x; } Bar;
 
index b12e1e04b9a1c5fdce3b3307ba2113e96e6bced8..0340a3c2a140e36d4c64c44627c30ac5a650eda7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.NSAutoreleasePool -analyzer-store=region -fobjc-gc-only -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.NSAutoreleasePool -analyzer-store=region -fobjc-gc-only -fblocks -verify -Wno-objc-root-class %s
 
 //===----------------------------------------------------------------------===//
 // Header stuff.
index fb02427eb45feebb53082b3653cc568c4481044e..06c510e5dd3ef97709b01c3f816defff001fa8a8 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -x objective-c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -x objective-c++ -Wno-objc-root-class %s
 
 #if __has_feature(attribute_ns_returns_retained)
 #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
index 42bde1004dccb480e0c64417d3c7fe961ef6f0ba..894184078039af0b58ddba89a4e01901a78c27c4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.UnusedIvars %s -verify
+// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.UnusedIvars -verify -Wno-objc-root-class %s
 
 //===--- BEGIN: Delta-debugging reduced headers. --------------------------===//
 
index 027c89572ff961abbcdb293a16514007f8e89220..769fbe8921b3ca71219b2b37246919a50f506f95 100644 (file)
@@ -1,12 +1,12 @@
 // Objective-C recovery
 // RUN: cp %s %t
-// RUN: %clang_cc1 -Wmissing-method-return-type -fixit -x objective-c %t
-// RUN: %clang_cc1 -fsyntax-only -pedantic -Wmissing-method-return-type -Werror -x objective-c %t
+// RUN: %clang_cc1 -Wmissing-method-return-type -fixit -x objective-c -Wno-objc-root-class %t
+// RUN: %clang_cc1 -fsyntax-only -pedantic -Wmissing-method-return-type -Werror -x objective-c -Wno-objc-root-class %t
 
 // Objective-C++ recovery
 // RUN: cp %s %t
-// RUN: %clang_cc1 -Wmissing-method-return-type -fixit -x objective-c++ %t
-// RUN: %clang_cc1 -fsyntax-only -pedantic -Wmissing-method-return-type -Werror -x objective-c++ %t
+// RUN: %clang_cc1 -Wmissing-method-return-type -fixit -x objective-c++ -Wno-objc-root-class %t
+// RUN: %clang_cc1 -fsyntax-only -pedantic -Wmissing-method-return-type -Werror -x objective-c++ -Wno-objc-root-class %t
 // rdar://9615045
 
 @interface I
index a474035021e6d32400e07a9336e087f68ce987ee..381233f95c29a4187417e46e69a56aaee69b5dc8 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10 -DNON_FIXITS -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10 -DNON_FIXITS -verify -Wno-objc-root-class %s
 // RUN: cp %s %t
-// RUN: not %clang_cc1 -x objective-c -fsyntax-only -triple x86_64-apple-darwin10 -fixit %t
-// RUN: %clang_cc1 -x objective-c -fsyntax-only -triple x86_64-apple-darwin10 -pedantic -Werror %t
+// RUN: not %clang_cc1 -x objective-c -fsyntax-only -triple x86_64-apple-darwin10 -fixit -Wno-objc-root-class %t
+// RUN: %clang_cc1 -x objective-c -fsyntax-only -triple x86_64-apple-darwin10 -pedantic -Werror -Wno-objc-root-class %t
 // RUN: grep "@implementation Sub3" %t
 
 @interface NSString // expected-note 2{{'NSString' declared here}}
index 2ddd563b133081c1e410f1487cfd1510248dc44c..d7930aca2ecc2a9e25e71521481f5da2c422c4b3 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify
-// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify
+// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify -Wno-objc-root-class
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify -Wno-objc-root-class
 @class C2;
 @class C3;
 @class C3;
index 6b9708566cb1c6ba2e5868da255539d33c1adc0e..f230bf93485848f5022690969923c87c746e2f0f 100644 (file)
@@ -1,10 +1,10 @@
 // Test that infinite loop in rdar://10418538 was fixed.
 
 // Without PCH
-// RUN: %clang_cc1 -fsyntax-only -verify -include %s -include %s %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -include %s -include %s %s
 
 // With PCH
-// RUN: %clang_cc1 -fsyntax-only -verify %s -chain-include %s -chain-include %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s -chain-include %s -chain-include %s
 
 #ifndef HEADER1
 #define HEADER1
index c543b7106d5a0229157224f839c0f9d9a8bdb2d8..7eae094e15139a2a2f2707347b6547638f25d782 100644 (file)
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -Wselector -include %S/Inputs/chain-selectors1.h -include %S/Inputs/chain-selectors2.h
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s -Wselector -include %S/Inputs/chain-selectors1.h -include %S/Inputs/chain-selectors2.h
 
-// RUN: %clang_cc1 -x objective-c -emit-pch -o %t1 %S/Inputs/chain-selectors1.h
-// RUN: %clang_cc1 -x objective-c -emit-pch -o %t2 %S/Inputs/chain-selectors2.h -include-pch %t1
-// RUN: %clang_cc1 -fsyntax-only -verify %s -Wselector -include-pch %t2
+// RUN: %clang_cc1 -x objective-c -Wno-objc-root-class -emit-pch -o %t1 %S/Inputs/chain-selectors1.h
+// RUN: %clang_cc1 -x objective-c -Wno-objc-root-class -emit-pch -o %t2 %S/Inputs/chain-selectors2.h -include-pch %t1
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s -Wselector -include-pch %t2
 
 @implementation X
 -(void)f {}
index ee537840e0ebc3c7de1e3d2988ce4013da7bd499..20010fbd1c56b7eb8eb60e135276bc841b1c8f27 100644 (file)
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: %clang_cc1 -include %S/method_pool.h -fsyntax-only -verify %s
+// RUN: %clang_cc1 -include %S/method_pool.h -fsyntax-only -verify -Wno-objc-root-class %s
 
 // Test with pch.
-// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/method_pool.h
-// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s 
+// RUN: %clang_cc1 -x objective-c -Wno-objc-root-class -emit-pch -o %t %S/method_pool.h
+// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify -Wno-objc-root-class %s 
 
 int message_id(id x) {
    return [x instMethod:17]; // expected-warning{{multiple methods}}
index e98cef45e9f8fe4e352dd7d67459ec785a0168ab..8a96e64421c133a2d335826de26c6a1d57891f3d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface X1
 @end
index 93118a3c6c6ff5ec67d8ed92f976d7a98596196b..f95dd1356bc3e7f4141c2e3b966e01cc05189b6c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef struct objc_class *Class;
 struct __objcFastEnumerationState; 
index d896c35f3f69a28062e35a308be085bef4e88e9a..1a989a14464c7cdeed2135bbfdfaad58e254c158 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 struct __objcFastEnumerationState; 
 typedef struct objc_class *Class;
index cc82725b17d76925effc7354a5e7e4385099a978..5d83dc69fcd9cb9b135ef57dbb7bb75259c29165 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 struct __objcFastEnumerationState; 
 @implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}}
index b2c6fa9eb798872b8d8a240fdfcaa970373af201..efa1266e7b8e13e5b7541bf00a81dd1fd286dcac 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify %s -pedantic
-// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify -x objective-c++ %s 
+// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify -pedantic -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify -x objective-c++ -Wno-objc-root-class %s
 // rdar://5707001
 
 @interface NSNumber;
index 6ef2ad7c527d986ba1b31993ace1d4aa2660d701..38d12d5905c33312cbdf121481605f90f6f6b170 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface MyClass {
   int prop;
index 3f04a8c21d39236ea493a0767d9a0a9d39b2c19c..c281c21000d02133f9e413d945086a66640c979d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface I1 
 {
index df2f835932f121f1cc3f5c8e00fb84e2b0bfaffd..02ed40ae338b9c8ed08b3359f39b11d07b182818 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10565506
 
 @protocol P @end
index 2bc376f696f73dc6a7c1556c90b6017d74b0536d..06a0ffae588c9c882ca56c7e8dbc792cc959be9c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface MyObject {
     int _foo;
index 3452dbedb513773c0daf80c5759062a7b6aca00c..4eca4c701af79be8a9609a7fd31efbc634d00184 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Subclass
 {
index 0c186885a3e085e353c9ac8f17d7ff17cd32a7d9..6688db62e538ad246056e8f69d8baf02aca93daf 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 // Note: GCC doesn't produce any of the following errors.
 @interface Super @end // expected-note {{previous definition is here}}
index 314e532a4768865ca9e7b19f67e6e9a52c712d96..8d5cca26a74c90a10779b16af98e4df59000e352 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -fobjc-arc -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fobjc-arc -verify -Wno-objc-root-class %s
 
 // rdar://8843524
 
index 9b44606c59d39ffe39fc3fc9727b692dd3e170f0..fdd2dbff00a7cf31f0c666ffe4fac63570df114e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify -Wno-objc-root-class %s
 // rdar://9535237
 
 typedef struct dispatch_queue_s *dispatch_queue_t;
index 567dc68cd681d86ca44146398be69a54a44d7065..b75064f77651c041fb618baa10e27b2676fead1a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-arc -verify %s
+// RUN: %clang_cc1 -fobjc-arc -verify -Wno-objc-root-class %s
 
 // rdar://problem/9150784
 void test(void) {
index ce525db7b5b98ffef42b3419f08d1482f4a89f78..03260e8cdd4a0b9cd7230cb1f0c0a000339566ca 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -verify %s
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://10244607
 
 typedef const struct __CFString * CFStringRef;
index 3fd845bd9ed66f490aea61e8e0e2fac50b744fd4..fad37ccbf46397da7c08970f88a655070d405959 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://9340606
 
 @interface Foo {
index 226b03b3ae120377da9fb83fc7dda0204b79ab98..2599fb9848f22cc8a9bbee692acd50176b27c7e0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -fblocks -verify -Wno-objc-root-class %s
 // rdar://9309489
 
 @interface MyClass {
index 38a5ab2dee98666b5cb674046c92ba27ed7b9cec..c773f26cc11314d1617cca83f6001614800bac2f 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1  -fobjc-default-synthesize-properties  -triple x86_64-apple-darwin11  -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify %s
-// RUN: %clang_cc1  -x objective-c++ -fobjc-default-synthesize-properties  -triple x86_64-apple-darwin11  -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fobjc-default-synthesize-properties  -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1  -x objective-c++ -fobjc-default-synthesize-properties  -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar:// 10558871
 
 @interface PP
index adff0e69ae8313736a1cf21766aac433dab33a40..635b9fec71d12f71fc5827a2443a4e8d3f901188 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -triple x86_64-apple-darwin11  -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify %s
+// RUN: %clang_cc1  -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar:// 10558871
 
 @interface PP
index c7d04300494871c9eb8dc1f1e9931446bafdde05..3b66d149302c7063c46cf4d106f6f1d6199b79a9 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -fobjc-arc -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://9829425
 
 extern void doSomething();
index 0de0a11f1bbe95671b092a7f905b51fcb118b4be..9158b09a47e76b6311227150a340ad3f1219a8f6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify -Wno-objc-root-class %s
 // rdar://10156674
 
 @class NSArray;
index 97566809d9db7e77cd6a39ba74c76f0ba122892f..8498de6d9a112247e08051d8711028ed99ef7162 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://9693477
 
 __attribute__((objc_arc_weak_reference_unavailable))
index 6dba18ba073b7df462b7f42c4f867db6b24f06ed..1805b852fb186c0caba9d515fc665481ec53715b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://9495837
 
 @interface Foo {
index a78229cf43875227422c8838a1b35aa36fd95234..9c3b298cb561bcd98d6785d2aa359a32015614ed 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -fblocks -verify -Wno-objc-root-class %s
 
 typedef unsigned long NSUInteger;
 typedef const void * CFTypeRef;
index 8cbce8e2ee543c712d4f02b5b6e37718d2da2895..1105d5e743a9a49494336ed9c133d7eed0f8c505 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9005189
 
 @interface Foo 
index 77e2e1a3d0bb350dfac55c8a68fe3ffa9ad9c6c4..b681558220da7d58901f731daf219c1585948a74 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 /*
   Conditions for warning:
index 619203a87f9fdbb02ff05ef4e9126da193a2f5b2..db0b958f8dd4c37d1468a77956c435d9283485f6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface A {
   int X __attribute__((deprecated));
diff --git a/test/SemaObjC/attr-root-class.m b/test/SemaObjC/attr-root-class.m
new file mode 100644 (file)
index 0000000..195cd66
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wattributes -Wobjc-root-class %s
+@interface RootClass {} // expected-warning {{class 'RootClass' defined without specifying a base class}} \
+                        // expected-note {{add a super class to fix this problem}}
+@end
+@implementation RootClass
+@end
+
+__attribute__((objc_root_class))
+@interface NonRootClass : RootClass   // expected-error {{objc_root_class attribute may only be specified on a root class declaration}}
+@end
+@implementation NonRootClass
+@end
+
+__attribute__((objc_root_class)) static void nonClassDeclaration()  // expected-error {{attribute may only be applied to an Objective-C interface}}
+{
+}
index 41e17681afdfc3e1584d840659dd271be789cbdc..45c749e570c172fbb69406b98ce0299488f66747 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 void *objc_autoreleasepool_push();
 void autoreleasepool_pop(void*);
index 577faea9dadcd82f2867371126a7004986c8bd1b..ea4e0045dc4b34090acd5a95ce8acb8185d7c800 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10177744
 
 @interface Foo
index bb3ad689f3b63747a9bc591774e554524aaf8cc2..d5cbc8a822d487a9330bbc99c949ef7eb5bdfede 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks %s
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
 
 // rdar://10681443
 @interface I
index bfb848e01cb6f4959d7dd2451198303b747fc1a3..56342baae528783cd148f4daa5e4e154a10c7899 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
 // test for block type safety.
 
 @interface Super  @end
index d5ca0e213a0914e9e988e880088f9157c4e7c8b1..f8422782d78b3d9d1d6b0bfe403121501b536d08 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface MyClass1 @end
 
index 27a10e556c28277d751d59de4cb40874225a125a..4223a747947c3bdf4c9af1d13bf5f1a2b5445cc2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Foo
 @end
index 8dde777f7437d7d8ac5dba07142a795e2811ada6..d6fa53a2f0b2f233899601853b1da4a771c38b8d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Foo // expected-note {{previous definition is here}}
 @end
index 2d8a5b1d4d80547bc12c48ddd8a6072ef9aee2c9..ccfd3ef0e39f802a0d5d31fb7c2867a54e5df603 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://7822210
 
 @interface A @end
index 6454bc013c1a2b7bfa3770a6ed52908bbbbeed8e..4ff9428e9637b84858618faaaa7443997cf42814 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef struct objc_class *Class;
 
index 170ccb98facbb0470d7944b7d412b7d388f8233a..68becaf0ac87ee0f85797e7726417bb5413647b9 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef int INTF3; // expected-note {{previous definition is here}}
 
index 944d4698023a2d693c57ee39aed6354eb7eede54..37df7a641673241a9b0ab6925bb9946d160edebd 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9224670
 
 @interface RandomObject {
index ba70644ebae8ba61ef371515cef893dd62b65905..b1e37bfe58f2785426f968f5021b9107b873acc8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify %s 
+// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
 
 typedef struct objc_class *Class;
 @interface XX
index 04243e967757393bb17ee4f76e6ed6ed490c6c55..7c936e653fbabdf867cc09c4226e5965913aaac0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -Woverriding-method-mismatch -fsyntax-only -verify %s
+// RUN: %clang_cc1  -Woverriding-method-mismatch -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9352731
 
 @protocol Bar 
index 0342622a11e100e7d4ca2796a923f2df3a7ac1e8..c0b929de446f24d027b3852ee1bc63bcdbbf5e68 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s
+// RUN: %clang_cc1 -pedantic -fsyntax-only -verify -Wno-objc-root-class %s
 typedef signed char BOOL;
 
 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
index 1a6533a600ea3a33420fbad6647fa9db3d67409d..5f16a6e654f15a17df4964948116eef924ab769e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 //rdar: //8591619
 // pr8453
 
index 8480f524dc72c77e1219ac36217da2d9ecd2974f..18d546b02f6082e26411894a0adceafb67c22858 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wmethod-signatures -verify -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -Wmethod-signatures -verify -pedantic -Wno-objc-root-class %s
 typedef signed char BOOL;
 typedef int NSInteger;
 
index 63afca18fdd6fffd7fb972ff34ed548b5b971a05..47aed3e6a579f39900b6fadee698f0bd043efee2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface PBXBuildSettingsDictionary
 {
index f97224fe7afc958e922c799ef528784eb4132be7..e0a3210debd3f28845973e355be10fb019e76580 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -Wno-objc-root-class %s
 @protocol NSObject
 @end
 
index 7c95d5d57b5e3dd2e90b30a7a99a0930434e4e7c..819732758d275e1ed64922f16d3f61b296c3712b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
 // rdar://8225011
 
 int glob;
index 01b35314aa986c3fdd32a3c3917e6958afce961e..a7c1d353a608c020ebdcc1d634df29cb0d62a06c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-fragile-abi -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fobjc-fragile-abi -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface INTF 
 {
index ad8b90955fa5bc1f243506f56019b4711e466ddc..d691f124e8a51005b14fc065a24b83023b1a4bb4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface ReadOnly 
 {
index f80119e14903cb7be9b35ee2d1da886d3c6a4d77..53eaeb022ca9da3d04384635537bf8c00a685235 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -Wcustom-atomic-properties -verify %s
+// RUN: %clang_cc1  -fsyntax-only -Wcustom-atomic-properties -verify -Wno-objc-root-class %s
 
 @interface Foo
 @property (assign) Foo *myProp; // expected-note {{property declared here}} expected-note {{property declared here}}
index 1e763af62c0a52bdeb95a531d545203d5fd80adb..c201e747090b12168cdc34faafd97b5e00101d50 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 
 @interface NSObject 
 - (void) release;
index 1ea492ef57950ed7f792d0f9732b592ba5e856c9..b95f263c32d2f0a95a1af1a190619b137a4bed6e 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -x objective-c -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 -x objective-c -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 // rdar://8843851
 
 @interface StopAccessingIvarsDirectlyExample
index 9bbc6847870f1fab13e2829d978b90749c20461a..606ece33af8d48f0725236a42a595b383bf51a64 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -x objective-c -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 -x objective-c -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 
 #if __has_attribute(objc_requires_property_definitions)
 __attribute ((objc_requires_property_definitions)) 
index b4ae0de71510a3579acd420420ddf71fd007381c..e6ea0a5eafb312bb0f034221eb74052e300f8907 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 
 @interface NSString @end
 
index 1d6ed01deaf8d82aa3cbfbc95205e411d6b3284f..3201412cbc2728e06700a271809698b3a0066ccf 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
 
 @interface NSView 
   - (id)initWithView:(id)realView;
index 7e57a29b18acd7dfc82f499c12e0f446d149e323..54b71109c335667adf3181240891f3f8c6f29e9a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wnonfragile-abi2 -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -Wnonfragile-abi2 -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 // rdar://8673791
 // rdar://9943851
 
index 98a9ce6cdc52742b6a620f8e2c5b0157aed0f034..aa7e3405c57b74823982e5c34ac8b0eba4bdb958 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://7076235
 
 @protocol P
index de1d56a2d773fd96e94c4352a65c7bd4b1524402..28b03d93e2d2265e8a9e70358025602e9a64aecc 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
 
 @protocol MyProto1 
 @optional
index 5efd6224a7a5d099e8795d5289a11931bf874a6a..2a5e0dca77049f6cd98d87c08a564ddd9ff46d81 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -x objective-c -fsyntax-only -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s
+// RUN: %clang_cc1 -x objective-c -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10593227
 
 @class UIWindow;
index 25fee051174b3850fbccc86bb689e2cbc8c1191b..56802960c6b2ea8217bc6f8c21baadae651ab620 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s
-// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface INTF
 {
index b9c224139998d34349c5f750bbe696a40d3e77fb..987889bc232ff355d6dfaf988ee7c68afba4e4aa 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -Wformat-nonliteral -fsyntax-only -fblocks -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -Wformat-nonliteral -fsyntax-only -fblocks -verify -Wno-objc-root-class %s
 
 //===----------------------------------------------------------------------===//
 // The following code is reduced using delta-debugging from
index 30a06358c5ef2b839189deadb51c2cd78695c35d..85c6c875014b382302bb89e33440839e12259224 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @class FOO, BAR; // expected-note {{forward declaration of class here}}
 @class FOO, BAR; 
index d023302bf58c8df2411e02e809e57211b4fa5295..30e0dce4bdabc9326bf505515ce3a6af8b6b4810 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify -fms-extensions
+// RUN: %clang_cc1 -verify -fms-extensions -Wno-objc-root-class %s
 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
 typedef struct _NSRange { } NSRange;
 
index bcedf8334047a8e7bd270a80ba047907a5bc73b1..9c59d7aaec5b27826054176ff998148b3ea61ef5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify
+// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
 
 @interface Foo 
 {
index 39e97e2df60a05976a106bb5109aeda3d465f0b0..417b948b8fabebd49d4c38df121da009e6cb513c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wparentheses %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wparentheses -Wno-objc-root-class %s
 
 // Don't warn about some common ObjC idioms unless we have -Widiomatic-parentheses on.
 // <rdar://problem/7382435>
index b10f9f629ec663630c95892bc29ae00d5da5d98b..54f66efcb22d12327a20afaa484a633ee296b73b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface I
 - Meth; // expected-note{{method definition for 'Meth' not found}} \
index d8046c9c2fa7887d77438068a4a90ec4c08f4ace..60fd900285d059f28586d4a9520cc77317b1e8bb 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9  %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -Wno-objc-root-class %s
 // FIXME: must also compile as Objective-C++ 
 
 // <rdar://problem/6487662>
index e06c5b566d31f68b79ba89a1270435dfe6ac783e..290f9d51922364f5683ffa0c38059fa32d111ce0 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -fobjc-exceptions
+// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions -Wno-objc-root-class %s
 
 // rdar://6124613
 void test1() {
index 85612209003f0dcadd7259c63c4956b7b9641162..cd7e09d406adaa5f92de8d9f24ba6470537bdd3d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface MySuperClass
 {
index c9f138f4075216a38eb33ba43c8bb582e1cda96c..cf02d26e721953a136e5a5483fb147ad555bd0c5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface SomeClass  @end
 
index c4cfc10d5e401b8edf4a1dcfd254bb8a3c052da8..7281f553e2339cdedaa0ef4b0a962681c0452e16 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Super @end
 
index 1254c1299d61b8b86a8f601c9e1af9d0cfa8e6e8..dd11b51459d7adeb93919fe68df7605da84f4d2b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // pr5986
 
 @interface Test {
index f9a7b35cefe2c88830832cc42c556dce3d541939..df9d8bac9077ff180b1570d3df7234112236234f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Test {
    int x;
index f6d9c9408445504cb497219bb903aa539bbd53b7..3115f5bd23322deb82316a80bcbb88cc9d8d88de 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Sprite { // expected-note{{'Sprite' declared here}}
   int sprite, spree;
index e9abb87f041edb178c6e147adc733c27b29ce5bd..2e4c5ae06106d60d3aedff3c063622e5a0f9897a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @implementation INTF // expected-warning {{cannot find interface declaration for 'INTF'}}
 @end
index fed3961ce111d808a4a84467600d95fc75117252..621a18fc9bf003af1ebf9f791197c0cfbb9694ad 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef struct objc_object {
   Class isa;
index b2472a46bf22cab6985e3c99b55b8cdaa1f3279d..f7252af1f1b75afe83787bcdb41a8f274f0cd833 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
 
 @class NSString;
 
index c58cfcf80fb3849a61e15f85a4a1f83d28251ae9..9505cb44a34654704d3bd33a0f0900484cc747c2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface foo
 @end
index 3cf2c6b5a908b434d9b25ef16877951bdc6cc426..ca91ebdef237acfdc6da5dd04acc8b1199a97890 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 // This test case tests the default behavior.
 
index 7b5a08ad9ee4328e37ac7190c0bfcb76b3f07972..df59f242ce7a617f066568d862b7a2ee864a4b33 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface A @end
 @interface B : A @end
index 4eb729061251dab3eff65743da5e64d2185160e4..2da629e566a855c70a014c06bed4749fabf1a37d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef signed char BOOL;
 typedef unsigned int NSUInteger;
index bc7ea7bc449c9f0f8f5a51a0ae86f7f11193df34..7b292fb36ae17fdbb803967394931f0e2d041bc9 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface foo
 - (int)meth;
index 3091124e66ab39c5ec547e2432d4dc18d4de4930..13e2d7fe4c3e04dd8324c8b2d7295d8f48b24a74 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 typedef signed char BOOL;
 typedef int NSInteger;
 
index b08faa65b22a39016f74f475200c4eedf482d37f..0bebd9b029d7e5d5189c3adee304656a451f13c2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -Wduplicate-method-arg -verify %s
+// RUN: %clang_cc1  -fsyntax-only -Wduplicate-method-arg -verify -Wno-objc-root-class %s
 
 // rdar://8877730
 
index 6c382d8cd956cbd26c7f574cba16a418d14db700..ee068d0bfccf82a9dfc2f70deff216430a8817e3 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface A
 - (void) setMoo: (int) x;      //  expected-note {{previous definition is here}}
index aeacee16c6fbca1e0b53117d8eebc21da1d4bfdc..c092f24828474c3303002347a5d8bcfc67a5dcbd 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface MyClass // expected-note {{required for direct or indirect protocol 'P'}}
 @end
index 922a0347992b18c95b3184ab52ddcab7ed19857c..27d645e73bc1a9fa7012efdabbc6b0df644fa82a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface INTF
 - (void) meth;
index a4e53210c2517b855ce15f13b04a1208ec7a045a..d604c3975c804f65bf1841cd04ed8b864e26add2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -Wunused-parameter -verify %s
+// RUN: %clang_cc1  -fsyntax-only -Wunused-parameter -verify -Wno-objc-root-class %s
 
 @interface INTF
 - (void) correct_use_of_unused: (void *) notice : (id)another_arg;
index 2c60482b357729313134abe4034a148606132409..f072981dc1bfb5620df7d0ba3dcb47301849ced8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s 
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s 
 
 @interface I0 
 @end
index a0c10f6fc954693682b421a04cd54cdba2ef98e3..fc6ff7b1fe801a9ad0a8668319f088fd889798ab 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wmissing-method-return-type -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wmissing-method-return-type -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9615045
 
 @interface I
index 70ca3a12cc0f0cd72312e10ec557042421c7ebb4..bb01eadba94bbe5fca2f52c93ebaa8154d9f5d7c 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -x objective-c -fsyntax-only -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s
+// RUN: %clang_cc1 -x objective-c -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10041908
 
 @interface Bar {
index d4ea5e54a553757a76884672d5e77c0721051280..0f32998ba53b2343009e0a6a99b6277c09e2a6e8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only
+// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
 
 void abort(void);
 
index ca8318d00fc219cf6a710f5792871cef8fb8f40a..dd9b73cc0de3c69095517c04d004a0fc9b0dacec 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Subtask
 {
index cf720992d47989adf7077264b561c16392acba56..6f00b1a367c70749808ebdfa857d8d1f0b531b2a 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -fdebugger-support -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fdebugger-support -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fdebugger-support -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fdebugger-support -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10997647
 
 @interface I
index 311800f39a853c53d01d723c7d5f9ca31dea5c66..dbd2a14e91d072e9ece7c0638408e9a1f83eff05 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wno-protocol -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-protocol -verify -Wno-objc-root-class %s
 // rdar: // 7056600
 
 @protocol P
index 1b5f184ae063c14c69e1d440048add34cc75e257..1e3c18636674d8e3e5d3d3203495b13a282ffc40 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // radar 7211563
 
 @interface X
index fed6b27652ea6adcca7efa2ade007daee30baa33..103f6bbd02ed4d5657f4860e305e5be44ab368e2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @protocol CYCdef
 - (int)name;
index 94093222e8c91d38f9393ef04e4f06b6a6913905..88d519d115c4d7edbc3c401e68548b6f8745cfe1 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9651605
 
 @interface Foo
index 76c6ffa229ea1c9713f519dcb2671d02dc689b2d..a38c0acb84f10a52695d05e2d529378183899121 100644 (file)
@@ -1,6 +1,6 @@
 #include "nonnull.h"
 
-// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s
 
 @class NSObject;
 
index 991246c72fd46dcb3616deb7e475908d057aca43..72d8fa693a9b0b28bc2a4c6994db2802ad71aad7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface NSObject
 - (id)self;
index bbeb31a85962c4f963fcb23cdcb686e3cbccb6ba..f41df8932887e9d7a7f3a2fa20506b6ccfc3e985 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef struct CGColor * __attribute__ ((NSObject)) CGColorRef;
 static int count;
index 78912aed8605b60f6c366477f0b4603f157a25b5..a4b83be0cd707a2519a6fd6d726902b6b7ddb7ac 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://8843851
 
 int* global;
index 9f752959e95b68d3fed4c3d720f8af4d5c94d56d..d37b5897b1140cd37f3811eae425fbde03d88ce1 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Foo 
 - (id)test:(id)one, id two;
index daf583de334b5618d37d85da4cb3b5694900de26..48b28cb05ca5720564f647ae4081f027d9236a92 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9078584
 
 @interface NSObject @end
index 9b14c1d75f39b86dc73f78083f68fa8b607a9102..61f36b3338264fc0ff120d58c45c8a7dc0114cc3 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -Wno-objc-root-class %s
 // rdar: // 7860960
 
 @interface I
index e0ee5609d73198b16760ffc2922b5301b9c405f9..ba39257fcd50459b53a3b7e641015bafdd2eb526 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
 
 // Make sure pragma pack works inside ObjC methods.  <rdar://problem/10893316>
 @interface X
index 069b0cbc7132acd7bda78b939dab168aef399d37..f95af5990275a980594959bde7146e22e85a584e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Tester 
 @property char PropertyAtomic_char;
index a7668da04095892c52ec015afd460bd76864b742..4bed8751b6a80cf9ff77ae7f8751a8c4382547a9 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef signed char BOOL;
 @protocol NSObject  - (BOOL)isEqual:(id)object; @end
index 12874e7d201ebe9f5b2ec412751abc17acd34797..5b40d854898e45449a79c6d9d542d99d52515d91 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // Do not issue error if 'ivar' used previously belongs to the inherited class
 // and has same name as @dynalic property in current class.
 
index fd2ae1165b6fa5d487287156111266ec4a9b88f9..3788bc90ddf07d82333542f87c436c3d2d9c1f95 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Object
 + (id)new;
index 2a61d927247766dff4cd6dbfcb97a02d76d832a3..47e93a33d24237b1b125a0c2843b7047fed0034c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @protocol P
   @property(readonly) int X; // expected-note {{property declared here}}
index aa49a3f0b5eda3796fe2f18ff06f6c06a3bb87fc..e7939b32c114126e7c803617b8daf0e7bd0c1aef 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface IDELogNavigator
 {
index 21fdf1b6d4bee3a02df17fca3c296e7b16f71e68..9524c22799dab4118f8cd61e4300e6f81bdef7f1 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 /* This test is for categories which don't implement the accessors but some accessors are
    implemented in their base class implementation. In this case,no warning must be issued.
index 733ad4288a83b08cfd605b2a79fff134f66e0107..c5a928b4e8927e927118db80b22f94cd742bf7ae 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s 
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s 
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s 
 // rdar://8962253
 
 @interface Singleton {
index 6b5cf047dc171ad94a65ab8f189b5110323f10f0..e306722e6c51f994c2183c7faa16f6abd6e03adf 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface AddressMyProperties 
 {
index 122afc1d4b5be6c061cecc868f1a21fb514eaf4f..c3cedb05ed61ae734ed98f890aee3462283dd3d6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface I {
   int Y;
index 53210fc34bf8ddf820ac4812f3d250d293b5d239..a7b513075263f756fdda424d94a41ac02e40c3d2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://7766184
 
 @interface Foo @end
index 16ff33855061a0aab16901a99544088548b815ad..6abd6e662d7254670417dff81bdb057c3a8b2b70 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // Test that arithmatic types on property and its ivar have exact match.
 
 @interface Test4 
index b729a4d85d73aabb3ea355687838db22ee208ddb..38aa32c50607f08b365210e4cd7edf9448272c1b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9106929
 
 typedef struct objc_class *Class;
index 0a018b0dffd849a0c689c7227b1695834f52b17f..19d4e684944a9f824ec57ad64725b58c0cdba786 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface SSyncCEList
 {
index 3d95d2607f8e4b14a17d6a6032b2a87d11c6f369..12d2cc62ff47741448c4ce8144e6c993c4eefce4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef struct NSSize {
                int width;
index a209da884ed722126cd2e707487dca10b8fcd759..96ef3eddecb15ce33a7ca6393470788f7d123d5d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9636091
 
 @interface I
index 2a24e7e82446d5e878e3f4577a37ea842d685205..3b0e825b9d8ca1e301acfe01a7b0a073c23e561c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Werror -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
 
 @interface MyClass {
     const char *_myName;
index f86e047799917279bda7e3dea9d54079d085daf9..f71e4a0f1c7f847efdbd345220872bba18d7ce14 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface A
 -(float) x;    // expected-note {{declared here}}
index 3dd19c5f3a76d4e86dcd8bafa668108724670ae0..7d4e544f0332cff5415fb6dc5314dd2e97edd465 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface I0 
 @property(readonly) int x;
index 29f84daef9c457a9e9c6097f71ad2515a5355370..a9487412c19d87e433ebb8d727582a2dd1817884 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface I 
 {
index 992d3e4798c1ad9937300e93e7d6551c19abe0eb..49c9851122ec95bf9b7d9f48d9710e084678e87e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://5986251
 
 @protocol SomeProtocol
index 6b2b682a135d4e5552e8633db5292e19a31b5e2f..19a4432de619c103fb6b6011caf099c8e5cfc140 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
 
 @interface FF
 - (void) Meth;
index a9365e9cb9327a8b71eb036b4e1a2aba523438e1..6bd2feeeaf1fd4a3fb6403eb427b2c2a78eca2fe 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
 
 @protocol P
 @end
index 007c21b726a56968ca79cdf84f7f759dbed521e9..2ec23a55c37cb4752b6b4e566687e040f8f2cce9 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1  -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 
 // rdar:// 8565343
 @interface Foo  {
index 0cff3ff46841754faf370eb598484f02fbd4abd5..d1d5612ef0edd9c38215c849cbf8b6e01c29d097 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -Woverriding-method-mismatch -fsyntax-only -verify %s
+// RUN: %clang_cc1  -Woverriding-method-mismatch -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://6191214
 
 @protocol Xint
index 1448dfdaa53aed4d24e06572319295b6b09d9866..124767cd665418e90c79891999c1842e94eb3f1a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
 
 @interface Unrelated
 @end
index 4e70bde1edc14894f31404cb405c3fbb9f91f5a1..f69d41eaade945343b37bc910527ba779d4b408e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wmissing-noreturn -fobjc-exceptions
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-noreturn -fobjc-exceptions -Wno-objc-root-class %s
 
 int test1() {
   id a;
index 5b73be5851f425b657f3bbf214e1dc764400cfb0..e19ba47ad272299ed4cc9d0571b5e3f309451f47 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions -Wno-objc-root-class %s
 
 @class A, B, C;
 
index b248a5d036ab3ed58e68c589163af3f30fb975c6..4c12a9392dc14843bb3e20b2842ed2c624f18695 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -Wselector -verify %s
+// RUN: %clang_cc1  -fsyntax-only -Wselector -verify -Wno-objc-root-class %s
 // rdar://8851684
 
 @interface Foo
index dfd6bd053d192b1d6479cf791acca1d256e67007..f59dec812b702e02676ed0d22b7155930a401844 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Foo
 - (char*) foo;
index f05b028d67185664888cce8f904b7fb11e2ef02e..e0f5f43f3319aff9e5ec2a880b3915f2287f581d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 @interface A
 @end
 
index 25ce8ba5993364262a8469658d6c6d7a49072760..40a03313b693f768f340f630502a29138bc6cf41 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10  -fblocks -verify %s 
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -triple x86_64-apple-darwin10  -fblocks -verify %s 
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10  -fblocks -verify -Wno-objc-root-class %s 
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -triple x86_64-apple-darwin10  -fblocks -verify -Wno-objc-root-class %s 
 // rdar://9154582
 
 @interface Blocky @end
index 626cd98a953c147b42be254ec96759b0058f927f..8c59151c2bdd56c3aa699f0730c9babcb46bcd7e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10633434
 
 @interface testClass
index dc99befeefc4418ac2b2cc5725f5105c6cd06ffb..7304b6c2c8a6c510b126f9dc5512b8282e03ed2b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
 
 @class I0; // expected-note 2{{forward declaration of class here}}
 
index c33b66a37bc3abba9b8f7a28b847d259d607a7ac..6fa9b4bec5a26a0e0cb65947124139aa376422d3 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // radar 7547942
 // Allow injection of ivars into implementation's implicit class.
 
index dac620a8182920afee23ed5fbc2223dd66ce7bee..c158815acbf878b975b25dc7f71515cb65d62c55 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface PBXTrackableTaskManager @end
 
index 8bf687811fd2bcfa172603e9118eb6247c1689d2..0e155f4840f0ae45ddb76a4012bb07f8d075f4a5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 // rdar://8913053
 
 typedef unsigned char BOOL;
index 696eb9b38558a58a7b84ef8c66c699b64d408cf8..9d7abd566d7ac237a064d28881fccc64b0ab35d5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 
 int bar;
 
index 36967d458e36a30c1b757a1533709990eca9c944..d75441518725492d186315c5f8fd92dc230c6b4c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface TestClass 
 {
index 745fe77449ac0fb273a7ddeee74d0d4b026c670a..8c9d90587f4d5b21acb25388ab4755d1820e3f8d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 @interface I
 {
 }
index cb03dfec3563d76d427e03131646be43271dd16a..6f2dbf915ac0a52e9e47d16abb0b05af7508d337 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef union {
  struct xx_object_s *_do;
index af52fde8806e2fcaea9b73b4a975ace244cd3018..091451003f55f55f67d79133fa43d6c8cc4342f5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -Wundeclared-selector -verify %s
+// RUN: %clang_cc1  -fsyntax-only -Wundeclared-selector -verify -Wno-objc-root-class %s
 
 typedef struct objc_selector *SEL;
 
index 70ff2289465463327da86b1f225be7ae8f5acc8f..15ba1a1eb2f890976f8529ff9474f6475968c78a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @protocol P1
 - (void) P1proto;  // expected-note {{method 'P1proto' declared here}}
index ef2f1929716f35607987787b7cc948173cf4e3fe..e8e03c5938f2593b3866424508c0f21a71b50296 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @class SUPER, Y; // expected-note 2 {{forward declaration of class here}}
 
index fa3ed8ef121c7f6bfb4cb20d7e4fefa05f34e5b6..1438cf595d1fb24b45617e3d31ce7a34c96ed6b7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -verify %s
+// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
 
 @protocol PROTOCOL0
 @required
index 1ecf32295eaed7f7213f218d4a03360e06b4f2b8..975b9a96a7732844e8111160a47409ce78efc975 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify -Wunused -Wunused-parameter -fsyntax-only
+// RUN: %clang_cc1 -verify -Wunused -Wunused-parameter -fsyntax-only -Wno-objc-root-class %s
 
 int printf(const char *, ...);
 
index 0e116fe9f346a7725480200599f4b325e45f988b..919b2211ddc447cdbcf5525c53fd16862d253880 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
 // rdar://8973810
 
 @protocol P
index 26e019627c476e240584a9b2d2bda05baa323dd0..854ff699eed4bc12277ef0cd1b3c19657c601dc6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://10290322
 
 @class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}}
index 00e0c771d0f173e2d22e6d15eae90c3627c2c7f9..887a2862250a9d6f819da469c4188a6af7ff5acd 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wimplicit-atomic-properties -fobjc-default-synthesize-properties -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wimplicit-atomic-properties -fobjc-default-synthesize-properties -verify -Wno-objc-root-class %s
 // rdar://8774580
 
 @interface Super
index 0169a6157258b53be409053ad9ace89a890779e3..02b81651d7a21d0d9f8cdbdedaa90e251913b426 100644 (file)
@@ -1,5 +1,6 @@
 @protocol NSCopying @end
 
+__attribute__((objc_root_class))
 @interface NSObject <NSCopying>
 - (void)dealloc;
 @end
 @end
 
 // RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s
-// CHECK: warn-missing-super.m:23:1: warning: method possibly missing a [super dealloc] call
+// CHECK: warn-missing-super.m:24:1: warning: method possibly missing a [super dealloc] call
 // CHECK: 1 warning generated.
 
 // RUN: %clang_cc1 -fsyntax-only -fobjc-gc %s 2>&1 | FileCheck --check-prefix=CHECK-GC %s
-// CHECK-GC: warn-missing-super.m:23:1: warning: method possibly missing a [super dealloc] call
-// CHECK-GC: warn-missing-super.m:25:1: warning: method possibly missing a [super finalize] call
+// CHECK-GC: warn-missing-super.m:24:1: warning: method possibly missing a [super dealloc] call
+// CHECK-GC: warn-missing-super.m:26:1: warning: method possibly missing a [super finalize] call
 // CHECK-GC: 2 warnings generated.
 
 // RUN: %clang_cc1 -fsyntax-only -fobjc-gc-only %s 2>&1 | FileCheck --check-prefix=CHECK-GC-ONLY %s
-// CHECK-GC-ONLY: warn-missing-super.m:25:1: warning: method possibly missing a [super finalize] call
+// CHECK-GC-ONLY: warn-missing-super.m:26:1: warning: method possibly missing a [super finalize] call
 // CHECK-GC-ONLY: 1 warning generated.
 
 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10 -fobjc-arc %s 2>&1 | FileCheck --check-prefix=CHECK-ARC %s
-// CHECK-ARC: warn-missing-super.m:35:4: error: ARC forbids explicit message send of 'dealloc'
+// CHECK-ARC: warn-missing-super.m:36:4: error: ARC forbids explicit message send of 'dealloc'
 // CHECK-ARC: 1 error generated.
index a05e663c092c847bf596c79c6837415569ec98a9..00fd234a0c09ccec7235a7d0815d91fd619876fa 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -fblocks -verify -Wno-objc-root-class %s
 
 @interface Test0
 - (void) setBlock: (void(^)(void)) block;
index ead454a04a37c7391f1d734fbb27a9fd08ef836a..e7b0fe2694d675cba1473dfa225cbb6b5bf4660b 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
-// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify -Wno-objc-root-class %s
 
 struct S {
        __weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
index bea66281ea7ba963fa835581f620e0874894fe06..8a2adf99b7e4001ecddfbc524ed5c45874b0245b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1  -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -verify %s
+// RUN: %clang_cc1  -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -verify -Wno-objc-root-class %s
 // rdar://8899430
 
 @interface WeakPropertyTest {
index dad5d0f7051fdaba5f0e5e7b4cdf89016b5e78f0..a74941721172b49fea2a9254cac7f6f8f9f75274 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify -fblocks %s
+// RUN: %clang_cc1 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify -fblocks -Wno-objc-root-class %s
 
 // Simple ownership conversions + diagnostics.
 int &f0(id __strong const *); // expected-note{{candidate function not viable: 1st argument ('__weak id *') has __weak ownership, but parameter has __strong ownership}}
index c91fd103e1333cf039f9e70ce46c1939566a5218..09d614d3728708dc78d2d91e53a39287bcee4823 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
 @protocol NSObject;
 
 void bar(id(^)(void));
index 0d9a93897656cefb3a7208ed2a656000187ba642..684f633f71cc2d8c3418b2c7881078c840f4738d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 @interface Foo
 @end
index 72f5283dea37734df9fe4272845fb44ad9275be6..0f982bae62a768e870d6d864cd6446cb63140f7d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
 // radar 7562285
 
 typedef int (^blocktype)(int a, int b);
index 6dd36a8c100edc4167e787280ad28f5927e440d7..f1aecab23a9d40fad3b37ffc3451f1fba0c6a73a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar:// 8328250
 
 @class NSDate;
index 953db6bbc06d3f6e5bd7308941771ea340f5ce83..5bb3ac6f6f50bc874f33b4b3fed6f887464cefad 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-fragile-abi -verify %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-fragile-abi -verify -Wno-objc-root-class %s
 // rdar://10731065
 
 @interface MyView {}
index 67df1f4c32400cd93e7a810db1ed9ca8000fef1f..55bde99da29f31dabc333e551eee4be5d17ad4b2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 // PR9495
 struct NonPOD { NonPOD(); ~NonPOD(); };
index b8ba4af09222322a566d94e3edf83ebd9cdb12cd..2a3ae323128052c0a051d06371f14b17d437d497 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // PR7386
 
 @class NSObject;
index da066e96597159d12d98af9bdaaac1e2546f7e88..535d2a0217ff71b8f23ba8e9848b8ef6bf75044c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 struct Y { 
   Y(); 
 
index bb26f48f13d5b92e20f088b876b51a5dfeac89ad..fc99c15fd379d8a5197c64195b40b41c7364a4e4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 @interface Ivar
 - (float*)method;
 @end
index 51a15d5773baa9be66e5d7f5e8013bfb6a4fdd81..5ac2f40db849f9efe86ecfd639134932aab7dfd2 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify -Wno-objc-root-class %s
 @interface I1
 - (int*)method;
 @end
index f68078b6779d5232e774f25ae7af5633495ca2fe..070207195f37f892d1b0c1657bb0a802ede231c8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 namespace C {
 
index 6f59de179472b2b5cf8c0acb6920747a113023f4..611b7bc009ae5e888cc65780a3b9c0f84512c091 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 typedef const void * VoidStar;
 
index 3139876bd2ea4a66d6a9256a6ba3393d6301812c..6f24c59e3a73a5a953831822801ed50759b47f9c 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 @interface Foo
 @end
 
index 5f7efdd90a048fb7828b3df77a56a71f045dce30..2237411aaf0c4413e0c8095a4081532db33c06a4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar: // 8379892
 
 struct X {
index 4d107c0356e5a90672eb457dac9a320c4310ec6a..3c6b13858686d44befb0605606d65307e808492a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wno-objc-root-class %s
 
 struct X { 
   void f() const;
index 9cc51d53760d1b799352fa903fcff5a9c7ff9f2a..18f06045a340976355ca001cd3e1dd0b301c9e12 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar://9070460
 
 class TCPPObject
index c50756622cc69eeb996f8475407464f01e8da23b..4b726d8ca64a22fc8c28e63405d545f346e2a791 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 // rdar: //8550657
 
 @interface NSArray @end
index 7dca9faa854438b54dcd32093ae84a2047aca9ea..97151fd7fa49f436d11e21aa1fe769e67654133d 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
 
 // <rdar://problem/6463729>
 @class XX;