From b2f6820773aabff3c5c9e0dbb1cbbbda0d80c41f Mon Sep 17 00:00:00 2001 From: Patrick Beard Date: Fri, 6 Apr 2012 18:12:22 +0000 Subject: [PATCH] Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154187 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/NSAPI.h | 3 +- include/clang/Basic/Attr.td | 7 +++++ include/clang/Basic/DiagnosticGroups.td | 1 + include/clang/Basic/DiagnosticSemaKinds.td | 7 +++++ lib/AST/NSAPI.cpp | 1 + lib/Parse/ParseObjc.cpp | 1 + lib/Sema/SemaDeclAttr.cpp | 19 ++++++++++++ lib/Sema/SemaDeclObjC.cpp | 31 ++++++++++++++++++- test/Analysis/CheckNSError.m | 4 +-- test/Analysis/NSPanel.m | 4 +-- test/Analysis/NSString.m | 8 ++--- test/Analysis/ObjCProperties.m | 4 +-- test/Analysis/ObjCRetSigs.m | 2 +- test/Analysis/dead-stores.m | 2 +- test/Analysis/malloc.m | 2 +- test/Analysis/misc-ps-region-store.m | 4 +-- test/Analysis/misc-ps.m | 8 ++--- ...undefined-larger-than-voidptr-ret-region.m | 2 +- ...ceiver-undefined-larger-than-voidptr-ret.m | 6 ++-- test/Analysis/pr_2542_rdar_6793404.m | 2 +- test/Analysis/properties.m | 2 +- ...600344-nil-receiver-undefined-struct-ret.m | 2 +- test/Analysis/retain-release-gc-only.m | 2 +- test/Analysis/retain-release.m | 4 +-- test/Analysis/unused-ivars.m | 2 +- test/FixIt/fixit-missing-method-return-type.m | 8 ++--- test/FixIt/typo.m | 6 ++-- test/Modules/redecl-merge.m | 4 +-- test/PCH/chain-categories2.m | 4 +-- test/PCH/chain-selectors.m | 8 ++--- test/PCH/method_pool.m | 6 ++-- test/Parser/missing-end-4.m | 2 +- test/Parser/objc-forcollection-neg-2.m | 2 +- test/Parser/objc-forcollection-neg.m | 2 +- test/Parser/objc-foreach-syntax.m | 2 +- test/Parser/objc-init.m | 4 +-- test/Parser/objc-property-syntax.m | 2 +- test/Parser/objc-synthesized-recover.m | 2 +- test/SemaObjC/ClassPropertyNotObject.m | 4 +-- test/SemaObjC/ContClassPropertyLookup.m | 2 +- test/SemaObjC/DoubleMethod.m | 2 +- test/SemaObjC/alias-test-2.m | 2 +- test/SemaObjC/arc-decls.m | 2 +- test/SemaObjC/arc-jump-block.m | 2 +- test/SemaObjC/arc-no-runtime.m | 2 +- test/SemaObjC/arc-objc-lifetime.m | 4 +-- test/SemaObjC/arc-property-lifetime.m | 2 +- test/SemaObjC/arc-property.m | 2 +- test/SemaObjC/arc-readonly-property-ivar-1.m | 4 +-- test/SemaObjC/arc-readonly-property-ivar.m | 2 +- test/SemaObjC/arc-retain-block-property.m | 2 +- test/SemaObjC/arc-setter-property-match.m | 2 +- test/SemaObjC/arc-unavailable-for-weakref.m | 2 +- test/SemaObjC/arc-unsafe-assigns.m | 2 +- test/SemaObjC/arc.m | 2 +- test/SemaObjC/assign-rvalue-message.m | 4 +-- .../atomoic-property-synnthesis-rules.m | 2 +- test/SemaObjC/attr-deprecated.m | 2 +- test/SemaObjC/attr-root-class.m | 16 ++++++++++ test/SemaObjC/autoreleasepool.m | 2 +- test/SemaObjC/bad-property-synthesis-crash.m | 2 +- test/SemaObjC/block-on-method-param.m | 4 +-- test/SemaObjC/block-type-safety.m | 2 +- test/SemaObjC/category-1.m | 2 +- test/SemaObjC/category-method-lookup.m | 2 +- test/SemaObjC/check-dup-objc-decls-1.m | 2 +- .../class-extension-after-implementation.m | 2 +- test/SemaObjC/class-getter-using-dotsyntax.m | 2 +- test/SemaObjC/class-impl-1.m | 2 +- test/SemaObjC/class-message-protocol-lookup.m | 2 +- test/SemaObjC/class-method-self.m | 2 +- test/SemaObjC/class-protocol-method-match.m | 2 +- .../compatible-protocol-qualified-types.m | 2 +- test/SemaObjC/comptypes-10.m | 2 +- test/SemaObjC/comptypes-a.m | 2 +- test/SemaObjC/conditional-expr-5.m | 2 +- test/SemaObjC/conditional-expr.m | 2 +- test/SemaObjC/conflict-nonfragile-abi2.m | 2 +- test/SemaObjC/conflicting-ivar-test-1.m | 2 +- test/SemaObjC/continuation-class-err.m | 2 +- test/SemaObjC/custom-atomic-property.m | 2 +- test/SemaObjC/default-synthesize-1.m | 2 +- test/SemaObjC/default-synthesize-2.m | 4 +-- test/SemaObjC/default-synthesize-3.m | 4 +-- test/SemaObjC/default-synthesize.m | 2 +- test/SemaObjC/deref-interface.m | 2 +- .../SemaObjC/direct-synthesized-ivar-access.m | 2 +- test/SemaObjC/dist-object-modifiers.m | 2 +- test/SemaObjC/enhanced-proto-2.m | 2 +- .../err-ivar-access-in-class-method.m | 4 +-- test/SemaObjC/error-property-gc-attr.m | 4 +-- test/SemaObjC/format-strings-objc.m | 2 +- test/SemaObjC/forward-class-1.m | 2 +- test/SemaObjC/gcc-cast-ext.m | 2 +- test/SemaObjC/ibaction.m | 2 +- test/SemaObjC/idiomatic-parentheses.m | 2 +- test/SemaObjC/incomplete-implementation.m | 2 +- test/SemaObjC/interface-scope-2.m | 2 +- test/SemaObjC/invalid-code.m | 2 +- test/SemaObjC/ivar-access-tests.m | 2 +- test/SemaObjC/ivar-in-class-extension.m | 2 +- test/SemaObjC/ivar-in-implementations.m | 2 +- .../SemaObjC/ivar-lookup-resolution-builtin.m | 2 +- test/SemaObjC/ivar-lookup.m | 2 +- test/SemaObjC/ivar-ref-misuse.m | 2 +- test/SemaObjC/legacy-implementation-1.m | 2 +- test/SemaObjC/message.m | 2 +- test/SemaObjC/method-attributes.m | 2 +- test/SemaObjC/method-bad-param.m | 2 +- test/SemaObjC/method-conflict-1.m | 2 +- test/SemaObjC/method-conflict-2.m | 2 +- test/SemaObjC/method-conflict.m | 2 +- test/SemaObjC/method-def-1.m | 2 +- test/SemaObjC/method-lookup.m | 2 +- test/SemaObjC/method-prototype-scope.m | 2 +- test/SemaObjC/method-typecheck-1.m | 2 +- test/SemaObjC/method-undef-extension-warn-1.m | 2 +- test/SemaObjC/method-undefined-warn-1.m | 2 +- test/SemaObjC/method-unused-attribute.m | 2 +- test/SemaObjC/missing-atend-metadata.m | 2 +- test/SemaObjC/missing-method-return-type.m | 2 +- test/SemaObjC/nested-typedef-decl.m | 4 +-- test/SemaObjC/newproperty-class-method-1.m | 2 +- test/SemaObjC/no-gc-weak-test.m | 2 +- test/SemaObjC/no-ivar-access-control.m | 4 +-- test/SemaObjC/no-protocol-option-tests.m | 2 +- test/SemaObjC/no-warn-qual-mismatch.m | 2 +- test/SemaObjC/no-warn-synth-protocol-meth.m | 2 +- test/SemaObjC/no-warning-unavail-unimp.m | 2 +- test/SemaObjC/nonnull.m | 2 +- test/SemaObjC/nsobject-attribute-1.m | 2 +- test/SemaObjC/nsobject-attribute.m | 2 +- test/SemaObjC/objc-buffered-methods.m | 2 +- test/SemaObjC/objc-cstyle-args-in-methods.m | 2 +- .../SemaObjC/objc-qualified-property-lookup.m | 2 +- test/SemaObjC/pedantic-dynamic-test.m | 2 +- test/SemaObjC/pragma-pack.m | 2 +- test/SemaObjC/property-2.m | 2 +- test/SemaObjC/property-9.m | 2 +- test/SemaObjC/property-and-ivar-use.m | 2 +- test/SemaObjC/property-category-1.m | 2 +- test/SemaObjC/property-category-3.m | 2 +- test/SemaObjC/property-category-4.m | 2 +- test/SemaObjC/property-category-impl.m | 2 +- test/SemaObjC/property-dot-receiver.m | 4 +-- test/SemaObjC/property-expression-error.m | 2 +- test/SemaObjC/property-impl-misuse.m | 2 +- test/SemaObjC/property-in-class-extension.m | 2 +- test/SemaObjC/property-ivar-mismatch.m | 2 +- test/SemaObjC/property-lookup-in-id.m | 2 +- test/SemaObjC/property-method-lookup-impl.m | 2 +- test/SemaObjC/property-not-lvalue.m | 2 +- .../property-ns-returns-not-retained-attr.m | 2 +- .../property-redundant-decl-accessor.m | 2 +- test/SemaObjC/property-typecheck-1.m | 2 +- test/SemaObjC/property-user-setter.m | 2 +- test/SemaObjC/property.m | 2 +- test/SemaObjC/protocol-archane.m | 2 +- test/SemaObjC/protocol-id-test-1.m | 2 +- test/SemaObjC/protocol-id-test-2.m | 2 +- test/SemaObjC/provisional-ivar-lookup.m | 2 +- .../qualified-protocol-method-conflicts.m | 2 +- test/SemaObjC/related-result-type-inference.m | 2 +- test/SemaObjC/return.m | 2 +- test/SemaObjC/scope-check.m | 2 +- test/SemaObjC/selector-3.m | 2 +- test/SemaObjC/selector-error.m | 2 +- test/SemaObjC/self-assign.m | 2 +- test/SemaObjC/self-declared-in-block.m | 4 +-- test/SemaObjC/severe-syntax-error.m | 2 +- test/SemaObjC/sizeof-interface.m | 2 +- test/SemaObjC/stand-alone-implementation.m | 2 +- test/SemaObjC/synchronized.m | 2 +- test/SemaObjC/synth-provisional-ivars-1.m | 2 +- test/SemaObjC/synth-provisional-ivars.m | 2 +- test/SemaObjC/synthesize-setter-contclass.m | 2 +- test/SemaObjC/synthesized-ivar.m | 2 +- test/SemaObjC/transparent-union.m | 2 +- test/SemaObjC/undeclared-selector.m | 2 +- test/SemaObjC/undef-protocol-methods-1.m | 2 +- test/SemaObjC/undef-superclass-1.m | 2 +- test/SemaObjC/unimplemented-protocol-prop.m | 2 +- test/SemaObjC/unused.m | 2 +- .../warn-deprecated-implementations.m | 2 +- .../warn-forward-class-attr-deprecated.m | 2 +- test/SemaObjC/warn-implicit-atomic-property.m | 2 +- test/SemaObjC/warn-missing-super.m | 11 ++++--- test/SemaObjC/warn-retain-cycle.m | 2 +- test/SemaObjC/warn-weak-field.m | 4 +-- test/SemaObjC/weak-property.m | 2 +- test/SemaObjCXX/arc-overloading.mm | 2 +- test/SemaObjCXX/blocks.mm | 2 +- test/SemaObjCXX/composite-objc-pointertype.mm | 2 +- test/SemaObjCXX/cstyle-block-pointer-cast.mm | 2 +- test/SemaObjCXX/cxxoperator-selector.mm | 2 +- test/SemaObjCXX/fragile-abi-object-assign.m | 2 +- test/SemaObjCXX/goto.mm | 2 +- test/SemaObjCXX/instantiate-method-return.mm | 2 +- test/SemaObjCXX/ivar-construct.mm | 2 +- test/SemaObjCXX/ivar-lookup.mm | 2 +- test/SemaObjCXX/message.mm | 2 +- .../SemaObjCXX/objc-decls-inside-namespace.mm | 2 +- test/SemaObjCXX/objc-pointer-conv.mm | 2 +- test/SemaObjCXX/overload.mm | 2 +- test/SemaObjCXX/propert-dot-error.mm | 2 +- test/SemaObjCXX/properties.mm | 2 +- test/SemaObjCXX/property-reference.mm | 2 +- test/SemaObjCXX/property-synthesis-error.mm | 2 +- test/SemaObjCXX/void_to_obj.mm | 2 +- 209 files changed, 329 insertions(+), 246 deletions(-) create mode 100644 test/SemaObjC/attr-root-class.m diff --git a/include/clang/AST/NSAPI.h b/include/clang/AST/NSAPI.h index 222c8dbaccb5..40e975906784 100644 --- a/include/clang/AST/NSAPI.h +++ b/include/clang/AST/NSAPI.h @@ -25,6 +25,7 @@ class NSAPI { ASTContext &getASTContext() const { return Ctx; } enum NSClassIdKindKind { + ClassId_NSObject, ClassId_NSString, ClassId_NSArray, ClassId_NSMutableArray, @@ -32,7 +33,7 @@ class NSAPI { ClassId_NSMutableDictionary, ClassId_NSNumber }; - static const unsigned NumClassIds = 6; + static const unsigned NumClassIds = 7; enum NSStringMethodKind { NSStr_stringWithString, diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index ee9f60f2527c..e8e0f35096f3 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -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 { diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 2e91a5ffa8ca..c83985345bce 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -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">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 30173fb7baad..515919c4fe9a 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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, 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">; diff --git a/lib/AST/NSAPI.cpp b/lib/AST/NSAPI.cpp index 8f03711f4d70..f5ea2c54ee2a 100644 --- a/lib/AST/NSAPI.cpp +++ b/lib/AST/NSAPI.cpp @@ -18,6 +18,7 @@ NSAPI::NSAPI(ASTContext &ctx) IdentifierInfo *NSAPI::getNSClassId(NSClassIdKindKind K) const { static const char *ClassName[NumClassIds] = { + "NSObject", "NSString", "NSArray", "NSMutableArray", diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index c664c64b6736..11417fb66f35 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -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) { diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 081c93f8c20e..77809e153f10 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -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(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(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; diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 6be9c7ceeb84..a942d4979d73 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -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(); + 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(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 = diff --git a/test/Analysis/CheckNSError.m b/test/Analysis/CheckNSError.m index 5bf7e08a587a..d35b686ef1d9 100644 --- a/test/Analysis/CheckNSError.m +++ b/test/Analysis/CheckNSError.m @@ -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; diff --git a/test/Analysis/NSPanel.m b/test/Analysis/NSPanel.m index ac725716457f..578658eab694 100644 --- a/test/Analysis/NSPanel.m +++ b/test/Analysis/NSPanel.m @@ -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 diff --git a/test/Analysis/NSString.m b/test/Analysis/NSString.m index 4add37b97540..4035cc93130a 100644 --- a/test/Analysis/NSString.m +++ b/test/Analysis/NSString.m @@ -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 //===----------------------------------------------------------------------===// diff --git a/test/Analysis/ObjCProperties.m b/test/Analysis/ObjCProperties.m index d88e0571e4c1..b9ed9b9a7e5f 100644 --- a/test/Analysis/ObjCProperties.m +++ b/test/Analysis/ObjCProperties.m @@ -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 diff --git a/test/Analysis/ObjCRetSigs.m b/test/Analysis/ObjCRetSigs.m index 02be25717a63..13078a32232b 100644 --- a/test/Analysis/ObjCRetSigs.m +++ b/test/Analysis/ObjCRetSigs.m @@ -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 *, ...); diff --git a/test/Analysis/dead-stores.m b/test/Analysis/dead-stores.m index d67703feb39a..083427478d7e 100644 --- a/test/Analysis/dead-stores.m +++ b/test/Analysis/dead-stores.m @@ -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; diff --git a/test/Analysis/malloc.m b/test/Analysis/malloc.m index 6451dbc98398..6c94118286ab 100644 --- a/test/Analysis/malloc.m +++ b/test/Analysis/malloc.m @@ -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; diff --git a/test/Analysis/misc-ps-region-store.m b/test/Analysis/misc-ps-region-store.m index 1c5b0b29ddd6..d263d4da30cc 100644 --- a/test/Analysis/misc-ps-region-store.m +++ b/test/Analysis/misc-ps-region-store.m @@ -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); diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m index 7c6818a4cdfb..9d2ff5b6ea37 100644 --- a/test/Analysis/misc-ps.m +++ b/test/Analysis/misc-ps.m @@ -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 diff --git a/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m b/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m index 7e8d96ac5760..c1cc076a9362 100644 --- a/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m +++ b/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m @@ -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 // - This test case shows that a nil instance // variable can possibly be initialized by a method. diff --git a/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m b/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m index 7c46426a8157..e4d5aaf82b2d 100644 --- a/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m +++ b/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m @@ -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; diff --git a/test/Analysis/pr_2542_rdar_6793404.m b/test/Analysis/pr_2542_rdar_6793404.m index d5125a649d2b..19c140d9e59a 100644 --- a/test/Analysis/pr_2542_rdar_6793404.m +++ b/test/Analysis/pr_2542_rdar_6793404.m @@ -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 diff --git a/test/Analysis/properties.m b/test/Analysis/properties.m index 231923b9ea0d..4aa91805fda6 100644 --- a/test/Analysis/properties.m +++ b/test/Analysis/properties.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify -Wno-objc-root-class %s typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m b/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m index 48bac623b554..5af4776b32db 100644 --- a/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m +++ b/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m @@ -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; diff --git a/test/Analysis/retain-release-gc-only.m b/test/Analysis/retain-release-gc-only.m index b12e1e04b9a1..0340a3c2a140 100644 --- a/test/Analysis/retain-release-gc-only.m +++ b/test/Analysis/retain-release-gc-only.m @@ -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. diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m index fb02427eb45f..06c510e5dd3e 100644 --- a/test/Analysis/retain-release.m +++ b/test/Analysis/retain-release.m @@ -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)) diff --git a/test/Analysis/unused-ivars.m b/test/Analysis/unused-ivars.m index 42bde1004dcc..894184078039 100644 --- a/test/Analysis/unused-ivars.m +++ b/test/Analysis/unused-ivars.m @@ -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. --------------------------===// diff --git a/test/FixIt/fixit-missing-method-return-type.m b/test/FixIt/fixit-missing-method-return-type.m index 027c89572ff9..769fbe8921b3 100644 --- a/test/FixIt/fixit-missing-method-return-type.m +++ b/test/FixIt/fixit-missing-method-return-type.m @@ -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 diff --git a/test/FixIt/typo.m b/test/FixIt/typo.m index a474035021e6..381233f95c29 100644 --- a/test/FixIt/typo.m +++ b/test/FixIt/typo.m @@ -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}} diff --git a/test/Modules/redecl-merge.m b/test/Modules/redecl-merge.m index 2ddd563b1330..d7930aca2ecc 100644 --- a/test/Modules/redecl-merge.m +++ b/test/Modules/redecl-merge.m @@ -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; diff --git a/test/PCH/chain-categories2.m b/test/PCH/chain-categories2.m index 6b9708566cb1..f230bf934858 100644 --- a/test/PCH/chain-categories2.m +++ b/test/PCH/chain-categories2.m @@ -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 diff --git a/test/PCH/chain-selectors.m b/test/PCH/chain-selectors.m index c543b7106d5a..7eae094e1513 100644 --- a/test/PCH/chain-selectors.m +++ b/test/PCH/chain-selectors.m @@ -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 {} diff --git a/test/PCH/method_pool.m b/test/PCH/method_pool.m index ee537840e0eb..20010fbd1c56 100644 --- a/test/PCH/method_pool.m +++ b/test/PCH/method_pool.m @@ -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}} diff --git a/test/Parser/missing-end-4.m b/test/Parser/missing-end-4.m index e98cef45e9f8..8a96e64421c1 100644 --- a/test/Parser/missing-end-4.m +++ b/test/Parser/missing-end-4.m @@ -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 diff --git a/test/Parser/objc-forcollection-neg-2.m b/test/Parser/objc-forcollection-neg-2.m index 93118a3c6c6f..f95dd1356bc3 100644 --- a/test/Parser/objc-forcollection-neg-2.m +++ b/test/Parser/objc-forcollection-neg-2.m @@ -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; diff --git a/test/Parser/objc-forcollection-neg.m b/test/Parser/objc-forcollection-neg.m index d896c35f3f69..1a989a14464c 100644 --- a/test/Parser/objc-forcollection-neg.m +++ b/test/Parser/objc-forcollection-neg.m @@ -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; diff --git a/test/Parser/objc-foreach-syntax.m b/test/Parser/objc-foreach-syntax.m index cc82725b17d7..5d83dc69fcd9 100644 --- a/test/Parser/objc-foreach-syntax.m +++ b/test/Parser/objc-foreach-syntax.m @@ -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'}} diff --git a/test/Parser/objc-init.m b/test/Parser/objc-init.m index b2c6fa9eb798..efa1266e7b8e 100644 --- a/test/Parser/objc-init.m +++ b/test/Parser/objc-init.m @@ -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; diff --git a/test/Parser/objc-property-syntax.m b/test/Parser/objc-property-syntax.m index 6ef2ad7c527d..38d12d5905c3 100644 --- a/test/Parser/objc-property-syntax.m +++ b/test/Parser/objc-property-syntax.m @@ -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; diff --git a/test/Parser/objc-synthesized-recover.m b/test/Parser/objc-synthesized-recover.m index 3f04a8c21d39..c281c21000d0 100644 --- a/test/Parser/objc-synthesized-recover.m +++ b/test/Parser/objc-synthesized-recover.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface I1 { diff --git a/test/SemaObjC/ClassPropertyNotObject.m b/test/SemaObjC/ClassPropertyNotObject.m index df2f835932f1..02ed40ae338b 100644 --- a/test/SemaObjC/ClassPropertyNotObject.m +++ b/test/SemaObjC/ClassPropertyNotObject.m @@ -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 diff --git a/test/SemaObjC/ContClassPropertyLookup.m b/test/SemaObjC/ContClassPropertyLookup.m index 2bc376f696f7..06a0ffae588c 100644 --- a/test/SemaObjC/ContClassPropertyLookup.m +++ b/test/SemaObjC/ContClassPropertyLookup.m @@ -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; diff --git a/test/SemaObjC/DoubleMethod.m b/test/SemaObjC/DoubleMethod.m index 3452dbedb513..4eca4c701af7 100644 --- a/test/SemaObjC/DoubleMethod.m +++ b/test/SemaObjC/DoubleMethod.m @@ -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 { diff --git a/test/SemaObjC/alias-test-2.m b/test/SemaObjC/alias-test-2.m index 0c186885a3e0..6688db62e538 100644 --- a/test/SemaObjC/alias-test-2.m +++ b/test/SemaObjC/alias-test-2.m @@ -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}} diff --git a/test/SemaObjC/arc-decls.m b/test/SemaObjC/arc-decls.m index 314e532a4768..8d5cca26a74c 100644 --- a/test/SemaObjC/arc-decls.m +++ b/test/SemaObjC/arc-decls.m @@ -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 diff --git a/test/SemaObjC/arc-jump-block.m b/test/SemaObjC/arc-jump-block.m index 9b44606c59d3..fdd2dbff00a7 100644 --- a/test/SemaObjC/arc-jump-block.m +++ b/test/SemaObjC/arc-jump-block.m @@ -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; diff --git a/test/SemaObjC/arc-no-runtime.m b/test/SemaObjC/arc-no-runtime.m index 567dc68cd681..b75064f77651 100644 --- a/test/SemaObjC/arc-no-runtime.m +++ b/test/SemaObjC/arc-no-runtime.m @@ -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) { diff --git a/test/SemaObjC/arc-objc-lifetime.m b/test/SemaObjC/arc-objc-lifetime.m index ce525db7b5b9..03260e8cdd4a 100644 --- a/test/SemaObjC/arc-objc-lifetime.m +++ b/test/SemaObjC/arc-objc-lifetime.m @@ -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; diff --git a/test/SemaObjC/arc-property-lifetime.m b/test/SemaObjC/arc-property-lifetime.m index 3fd845bd9ed6..fad37ccbf463 100644 --- a/test/SemaObjC/arc-property-lifetime.m +++ b/test/SemaObjC/arc-property-lifetime.m @@ -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 { diff --git a/test/SemaObjC/arc-property.m b/test/SemaObjC/arc-property.m index 226b03b3ae12..2599fb9848f2 100644 --- a/test/SemaObjC/arc-property.m +++ b/test/SemaObjC/arc-property.m @@ -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 { diff --git a/test/SemaObjC/arc-readonly-property-ivar-1.m b/test/SemaObjC/arc-readonly-property-ivar-1.m index 38a5ab2dee98..c773f26cc113 100644 --- a/test/SemaObjC/arc-readonly-property-ivar-1.m +++ b/test/SemaObjC/arc-readonly-property-ivar-1.m @@ -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 diff --git a/test/SemaObjC/arc-readonly-property-ivar.m b/test/SemaObjC/arc-readonly-property-ivar.m index adff0e69ae83..635b9fec71d1 100644 --- a/test/SemaObjC/arc-readonly-property-ivar.m +++ b/test/SemaObjC/arc-readonly-property-ivar.m @@ -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 diff --git a/test/SemaObjC/arc-retain-block-property.m b/test/SemaObjC/arc-retain-block-property.m index c7d043004948..3b66d149302c 100644 --- a/test/SemaObjC/arc-retain-block-property.m +++ b/test/SemaObjC/arc-retain-block-property.m @@ -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(); diff --git a/test/SemaObjC/arc-setter-property-match.m b/test/SemaObjC/arc-setter-property-match.m index 0de0a11f1bbe..9158b09a47e7 100644 --- a/test/SemaObjC/arc-setter-property-match.m +++ b/test/SemaObjC/arc-setter-property-match.m @@ -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; diff --git a/test/SemaObjC/arc-unavailable-for-weakref.m b/test/SemaObjC/arc-unavailable-for-weakref.m index 97566809d9db..8498de6d9a11 100644 --- a/test/SemaObjC/arc-unavailable-for-weakref.m +++ b/test/SemaObjC/arc-unavailable-for-weakref.m @@ -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)) diff --git a/test/SemaObjC/arc-unsafe-assigns.m b/test/SemaObjC/arc-unsafe-assigns.m index 6dba18ba073b..1805b852fb18 100644 --- a/test/SemaObjC/arc-unsafe-assigns.m +++ b/test/SemaObjC/arc-unsafe-assigns.m @@ -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 { diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index a78229cf4387..9c3b298cb561 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -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; diff --git a/test/SemaObjC/assign-rvalue-message.m b/test/SemaObjC/assign-rvalue-message.m index 8cbce8e2ee54..1105d5e743a9 100644 --- a/test/SemaObjC/assign-rvalue-message.m +++ b/test/SemaObjC/assign-rvalue-message.m @@ -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 diff --git a/test/SemaObjC/atomoic-property-synnthesis-rules.m b/test/SemaObjC/atomoic-property-synnthesis-rules.m index 77e2e1a3d0bb..b681558220da 100644 --- a/test/SemaObjC/atomoic-property-synnthesis-rules.m +++ b/test/SemaObjC/atomoic-property-synnthesis-rules.m @@ -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: diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index 619203a87f9f..db0b958f8dd4 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -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 index 000000000000..195cd663acda --- /dev/null +++ b/test/SemaObjC/attr-root-class.m @@ -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}} +{ +} diff --git a/test/SemaObjC/autoreleasepool.m b/test/SemaObjC/autoreleasepool.m index 41e17681afdf..45c749e570c1 100644 --- a/test/SemaObjC/autoreleasepool.m +++ b/test/SemaObjC/autoreleasepool.m @@ -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*); diff --git a/test/SemaObjC/bad-property-synthesis-crash.m b/test/SemaObjC/bad-property-synthesis-crash.m index 577faea9dadc..ea4e0045dc4b 100644 --- a/test/SemaObjC/bad-property-synthesis-crash.m +++ b/test/SemaObjC/bad-property-synthesis-crash.m @@ -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 diff --git a/test/SemaObjC/block-on-method-param.m b/test/SemaObjC/block-on-method-param.m index bb3ad689f3b6..d5cbc8a822d4 100644 --- a/test/SemaObjC/block-on-method-param.m +++ b/test/SemaObjC/block-on-method-param.m @@ -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 diff --git a/test/SemaObjC/block-type-safety.m b/test/SemaObjC/block-type-safety.m index bfb848e01cb6..56342baae528 100644 --- a/test/SemaObjC/block-type-safety.m +++ b/test/SemaObjC/block-type-safety.m @@ -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 diff --git a/test/SemaObjC/category-1.m b/test/SemaObjC/category-1.m index d5ca0e213a09..f8422782d78b 100644 --- a/test/SemaObjC/category-1.m +++ b/test/SemaObjC/category-1.m @@ -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 diff --git a/test/SemaObjC/category-method-lookup.m b/test/SemaObjC/category-method-lookup.m index 27a10e556c28..4223a747947c 100644 --- a/test/SemaObjC/category-method-lookup.m +++ b/test/SemaObjC/category-method-lookup.m @@ -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 diff --git a/test/SemaObjC/check-dup-objc-decls-1.m b/test/SemaObjC/check-dup-objc-decls-1.m index 8dde777f7437..d6fa53a2f0b2 100644 --- a/test/SemaObjC/check-dup-objc-decls-1.m +++ b/test/SemaObjC/check-dup-objc-decls-1.m @@ -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 diff --git a/test/SemaObjC/class-extension-after-implementation.m b/test/SemaObjC/class-extension-after-implementation.m index 2d8a5b1d4d80..ccfd3ef0e39f 100644 --- a/test/SemaObjC/class-extension-after-implementation.m +++ b/test/SemaObjC/class-extension-after-implementation.m @@ -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 diff --git a/test/SemaObjC/class-getter-using-dotsyntax.m b/test/SemaObjC/class-getter-using-dotsyntax.m index 6454bc013c1a..4ff9428e9637 100644 --- a/test/SemaObjC/class-getter-using-dotsyntax.m +++ b/test/SemaObjC/class-getter-using-dotsyntax.m @@ -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; diff --git a/test/SemaObjC/class-impl-1.m b/test/SemaObjC/class-impl-1.m index 170ccb98facb..68becaf0ac87 100644 --- a/test/SemaObjC/class-impl-1.m +++ b/test/SemaObjC/class-impl-1.m @@ -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}} diff --git a/test/SemaObjC/class-message-protocol-lookup.m b/test/SemaObjC/class-message-protocol-lookup.m index 944d4698023a..37df7a641673 100644 --- a/test/SemaObjC/class-message-protocol-lookup.m +++ b/test/SemaObjC/class-message-protocol-lookup.m @@ -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 { diff --git a/test/SemaObjC/class-method-self.m b/test/SemaObjC/class-method-self.m index ba70644ebae8..b1e37bfe58f2 100644 --- a/test/SemaObjC/class-method-self.m +++ b/test/SemaObjC/class-method-self.m @@ -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 diff --git a/test/SemaObjC/class-protocol-method-match.m b/test/SemaObjC/class-protocol-method-match.m index 04243e967757..7c936e653fba 100644 --- a/test/SemaObjC/class-protocol-method-match.m +++ b/test/SemaObjC/class-protocol-method-match.m @@ -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 diff --git a/test/SemaObjC/compatible-protocol-qualified-types.m b/test/SemaObjC/compatible-protocol-qualified-types.m index 0342622a11e1..c0b929de446f 100644 --- a/test/SemaObjC/compatible-protocol-qualified-types.m +++ b/test/SemaObjC/compatible-protocol-qualified-types.m @@ -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; diff --git a/test/SemaObjC/comptypes-10.m b/test/SemaObjC/comptypes-10.m index 1a6533a600ea..5f16a6e654f1 100644 --- a/test/SemaObjC/comptypes-10.m +++ b/test/SemaObjC/comptypes-10.m @@ -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 diff --git a/test/SemaObjC/comptypes-a.m b/test/SemaObjC/comptypes-a.m index 8480f524dc72..18d546b02f60 100644 --- a/test/SemaObjC/comptypes-a.m +++ b/test/SemaObjC/comptypes-a.m @@ -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; diff --git a/test/SemaObjC/conditional-expr-5.m b/test/SemaObjC/conditional-expr-5.m index 63afca18fdd6..47aed3e6a579 100644 --- a/test/SemaObjC/conditional-expr-5.m +++ b/test/SemaObjC/conditional-expr-5.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface PBXBuildSettingsDictionary { diff --git a/test/SemaObjC/conditional-expr.m b/test/SemaObjC/conditional-expr.m index f97224fe7afc..e0a3210debd3 100644 --- a/test/SemaObjC/conditional-expr.m +++ b/test/SemaObjC/conditional-expr.m @@ -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 diff --git a/test/SemaObjC/conflict-nonfragile-abi2.m b/test/SemaObjC/conflict-nonfragile-abi2.m index 7c95d5d57b5e..819732758d27 100644 --- a/test/SemaObjC/conflict-nonfragile-abi2.m +++ b/test/SemaObjC/conflict-nonfragile-abi2.m @@ -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; diff --git a/test/SemaObjC/conflicting-ivar-test-1.m b/test/SemaObjC/conflicting-ivar-test-1.m index 01b35314aa98..a7c1d353a608 100644 --- a/test/SemaObjC/conflicting-ivar-test-1.m +++ b/test/SemaObjC/conflicting-ivar-test-1.m @@ -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 { diff --git a/test/SemaObjC/continuation-class-err.m b/test/SemaObjC/continuation-class-err.m index ad8b90955fa5..d691f124e8a5 100644 --- a/test/SemaObjC/continuation-class-err.m +++ b/test/SemaObjC/continuation-class-err.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface ReadOnly { diff --git a/test/SemaObjC/custom-atomic-property.m b/test/SemaObjC/custom-atomic-property.m index f80119e14903..53eaeb022ca9 100644 --- a/test/SemaObjC/custom-atomic-property.m +++ b/test/SemaObjC/custom-atomic-property.m @@ -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}} diff --git a/test/SemaObjC/default-synthesize-1.m b/test/SemaObjC/default-synthesize-1.m index 1e763af62c0a..c201e747090b 100644 --- a/test/SemaObjC/default-synthesize-1.m +++ b/test/SemaObjC/default-synthesize-1.m @@ -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; diff --git a/test/SemaObjC/default-synthesize-2.m b/test/SemaObjC/default-synthesize-2.m index 1ea492ef5795..b95f263c32d2 100644 --- a/test/SemaObjC/default-synthesize-2.m +++ b/test/SemaObjC/default-synthesize-2.m @@ -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 diff --git a/test/SemaObjC/default-synthesize-3.m b/test/SemaObjC/default-synthesize-3.m index 9bbc6847870f..606ece33af8d 100644 --- a/test/SemaObjC/default-synthesize-3.m +++ b/test/SemaObjC/default-synthesize-3.m @@ -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)) diff --git a/test/SemaObjC/default-synthesize.m b/test/SemaObjC/default-synthesize.m index b4ae0de71510..e6ea0a5eafb3 100644 --- a/test/SemaObjC/default-synthesize.m +++ b/test/SemaObjC/default-synthesize.m @@ -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 diff --git a/test/SemaObjC/deref-interface.m b/test/SemaObjC/deref-interface.m index 1d6ed01deaf8..3201412cbc27 100644 --- a/test/SemaObjC/deref-interface.m +++ b/test/SemaObjC/deref-interface.m @@ -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; diff --git a/test/SemaObjC/direct-synthesized-ivar-access.m b/test/SemaObjC/direct-synthesized-ivar-access.m index 7e57a29b18ac..54b71109c335 100644 --- a/test/SemaObjC/direct-synthesized-ivar-access.m +++ b/test/SemaObjC/direct-synthesized-ivar-access.m @@ -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 diff --git a/test/SemaObjC/dist-object-modifiers.m b/test/SemaObjC/dist-object-modifiers.m index 98a9ce6cdc52..aa7e3405c57b 100644 --- a/test/SemaObjC/dist-object-modifiers.m +++ b/test/SemaObjC/dist-object-modifiers.m @@ -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 diff --git a/test/SemaObjC/enhanced-proto-2.m b/test/SemaObjC/enhanced-proto-2.m index de1d56a2d773..28b03d93e2d2 100644 --- a/test/SemaObjC/enhanced-proto-2.m +++ b/test/SemaObjC/enhanced-proto-2.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -Wno-objc-root-class %s @protocol MyProto1 @optional diff --git a/test/SemaObjC/err-ivar-access-in-class-method.m b/test/SemaObjC/err-ivar-access-in-class-method.m index 5efd6224a7a5..2a5e0dca7704 100644 --- a/test/SemaObjC/err-ivar-access-in-class-method.m +++ b/test/SemaObjC/err-ivar-access-in-class-method.m @@ -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; diff --git a/test/SemaObjC/error-property-gc-attr.m b/test/SemaObjC/error-property-gc-attr.m index 25fee051174b..56802960c6b2 100644 --- a/test/SemaObjC/error-property-gc-attr.m +++ b/test/SemaObjC/error-property-gc-attr.m @@ -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 { diff --git a/test/SemaObjC/format-strings-objc.m b/test/SemaObjC/format-strings-objc.m index b9c224139998..987889bc232f 100644 --- a/test/SemaObjC/format-strings-objc.m +++ b/test/SemaObjC/format-strings-objc.m @@ -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 diff --git a/test/SemaObjC/forward-class-1.m b/test/SemaObjC/forward-class-1.m index 30a06358c5ef..85c6c875014b 100644 --- a/test/SemaObjC/forward-class-1.m +++ b/test/SemaObjC/forward-class-1.m @@ -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; diff --git a/test/SemaObjC/gcc-cast-ext.m b/test/SemaObjC/gcc-cast-ext.m index d023302bf58c..30e0dce4bdab 100644 --- a/test/SemaObjC/gcc-cast-ext.m +++ b/test/SemaObjC/gcc-cast-ext.m @@ -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; diff --git a/test/SemaObjC/ibaction.m b/test/SemaObjC/ibaction.m index bcedf8334047..9c59d7aaec5b 100644 --- a/test/SemaObjC/ibaction.m +++ b/test/SemaObjC/ibaction.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify +// RUN: %clang_cc1 -verify -Wno-objc-root-class %s @interface Foo { diff --git a/test/SemaObjC/idiomatic-parentheses.m b/test/SemaObjC/idiomatic-parentheses.m index 39e97e2df60a..417b948b8fab 100644 --- a/test/SemaObjC/idiomatic-parentheses.m +++ b/test/SemaObjC/idiomatic-parentheses.m @@ -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. // diff --git a/test/SemaObjC/incomplete-implementation.m b/test/SemaObjC/incomplete-implementation.m index b10f9f629ec6..54f66efcb22d 100644 --- a/test/SemaObjC/incomplete-implementation.m +++ b/test/SemaObjC/incomplete-implementation.m @@ -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}} \ diff --git a/test/SemaObjC/interface-scope-2.m b/test/SemaObjC/interface-scope-2.m index d8046c9c2fa7..60fd900285d0 100644 --- a/test/SemaObjC/interface-scope-2.m +++ b/test/SemaObjC/interface-scope-2.m @@ -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++ // diff --git a/test/SemaObjC/invalid-code.m b/test/SemaObjC/invalid-code.m index e06c5b566d31..290f9d519223 100644 --- a/test/SemaObjC/invalid-code.m +++ b/test/SemaObjC/invalid-code.m @@ -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() { diff --git a/test/SemaObjC/ivar-access-tests.m b/test/SemaObjC/ivar-access-tests.m index 85612209003f..cd7e09d406ad 100644 --- a/test/SemaObjC/ivar-access-tests.m +++ b/test/SemaObjC/ivar-access-tests.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface MySuperClass { diff --git a/test/SemaObjC/ivar-in-class-extension.m b/test/SemaObjC/ivar-in-class-extension.m index c9f138f40752..cf02d26e7219 100644 --- a/test/SemaObjC/ivar-in-class-extension.m +++ b/test/SemaObjC/ivar-in-class-extension.m @@ -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 diff --git a/test/SemaObjC/ivar-in-implementations.m b/test/SemaObjC/ivar-in-implementations.m index c4cfc10d5e40..7281f553e233 100644 --- a/test/SemaObjC/ivar-in-implementations.m +++ b/test/SemaObjC/ivar-in-implementations.m @@ -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 diff --git a/test/SemaObjC/ivar-lookup-resolution-builtin.m b/test/SemaObjC/ivar-lookup-resolution-builtin.m index 1254c1299d61..dd11b51459d7 100644 --- a/test/SemaObjC/ivar-lookup-resolution-builtin.m +++ b/test/SemaObjC/ivar-lookup-resolution-builtin.m @@ -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 { diff --git a/test/SemaObjC/ivar-lookup.m b/test/SemaObjC/ivar-lookup.m index f9a7b35cefe2..df9d8bac9077 100644 --- a/test/SemaObjC/ivar-lookup.m +++ b/test/SemaObjC/ivar-lookup.m @@ -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; diff --git a/test/SemaObjC/ivar-ref-misuse.m b/test/SemaObjC/ivar-ref-misuse.m index f6d9c9408445..3115f5bd2332 100644 --- a/test/SemaObjC/ivar-ref-misuse.m +++ b/test/SemaObjC/ivar-ref-misuse.m @@ -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; diff --git a/test/SemaObjC/legacy-implementation-1.m b/test/SemaObjC/legacy-implementation-1.m index e9abb87f041e..2e4c5ae06106 100644 --- a/test/SemaObjC/legacy-implementation-1.m +++ b/test/SemaObjC/legacy-implementation-1.m @@ -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 diff --git a/test/SemaObjC/message.m b/test/SemaObjC/message.m index fed3961ce111..621a18fc9bf0 100644 --- a/test/SemaObjC/message.m +++ b/test/SemaObjC/message.m @@ -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; diff --git a/test/SemaObjC/method-attributes.m b/test/SemaObjC/method-attributes.m index b2472a46bf22..f7252af1f1b7 100644 --- a/test/SemaObjC/method-attributes.m +++ b/test/SemaObjC/method-attributes.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s @class NSString; diff --git a/test/SemaObjC/method-bad-param.m b/test/SemaObjC/method-bad-param.m index c58cfcf80fb3..9505cb44a346 100644 --- a/test/SemaObjC/method-bad-param.m +++ b/test/SemaObjC/method-bad-param.m @@ -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 diff --git a/test/SemaObjC/method-conflict-1.m b/test/SemaObjC/method-conflict-1.m index 3cf2c6b5a908..ca91ebdef237 100644 --- a/test/SemaObjC/method-conflict-1.m +++ b/test/SemaObjC/method-conflict-1.m @@ -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. diff --git a/test/SemaObjC/method-conflict-2.m b/test/SemaObjC/method-conflict-2.m index 7b5a08ad9ee4..df59f242ce7a 100644 --- a/test/SemaObjC/method-conflict-2.m +++ b/test/SemaObjC/method-conflict-2.m @@ -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 diff --git a/test/SemaObjC/method-conflict.m b/test/SemaObjC/method-conflict.m index 4eb729061251..2da629e566a8 100644 --- a/test/SemaObjC/method-conflict.m +++ b/test/SemaObjC/method-conflict.m @@ -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; diff --git a/test/SemaObjC/method-def-1.m b/test/SemaObjC/method-def-1.m index bc7ea7bc449c..7b292fb36ae1 100644 --- a/test/SemaObjC/method-def-1.m +++ b/test/SemaObjC/method-def-1.m @@ -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; diff --git a/test/SemaObjC/method-lookup.m b/test/SemaObjC/method-lookup.m index 3091124e66ab..13e2d7fe4c3e 100644 --- a/test/SemaObjC/method-lookup.m +++ b/test/SemaObjC/method-lookup.m @@ -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; diff --git a/test/SemaObjC/method-prototype-scope.m b/test/SemaObjC/method-prototype-scope.m index b08faa65b22a..0bebd9b029d7 100644 --- a/test/SemaObjC/method-prototype-scope.m +++ b/test/SemaObjC/method-prototype-scope.m @@ -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 diff --git a/test/SemaObjC/method-typecheck-1.m b/test/SemaObjC/method-typecheck-1.m index 6c382d8cd956..ee068d0bfccf 100644 --- a/test/SemaObjC/method-typecheck-1.m +++ b/test/SemaObjC/method-typecheck-1.m @@ -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}} diff --git a/test/SemaObjC/method-undef-extension-warn-1.m b/test/SemaObjC/method-undef-extension-warn-1.m index aeacee16c6fb..c092f2482847 100644 --- a/test/SemaObjC/method-undef-extension-warn-1.m +++ b/test/SemaObjC/method-undef-extension-warn-1.m @@ -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 diff --git a/test/SemaObjC/method-undefined-warn-1.m b/test/SemaObjC/method-undefined-warn-1.m index 922a0347992b..27d645e73bc1 100644 --- a/test/SemaObjC/method-undefined-warn-1.m +++ b/test/SemaObjC/method-undefined-warn-1.m @@ -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; diff --git a/test/SemaObjC/method-unused-attribute.m b/test/SemaObjC/method-unused-attribute.m index a4e53210c251..d604c3975c80 100644 --- a/test/SemaObjC/method-unused-attribute.m +++ b/test/SemaObjC/method-unused-attribute.m @@ -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; diff --git a/test/SemaObjC/missing-atend-metadata.m b/test/SemaObjC/missing-atend-metadata.m index 2c60482b3577..f072981dc1bf 100644 --- a/test/SemaObjC/missing-atend-metadata.m +++ b/test/SemaObjC/missing-atend-metadata.m @@ -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 diff --git a/test/SemaObjC/missing-method-return-type.m b/test/SemaObjC/missing-method-return-type.m index a0c10f6fc954..fc6ff7b1fe80 100644 --- a/test/SemaObjC/missing-method-return-type.m +++ b/test/SemaObjC/missing-method-return-type.m @@ -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 diff --git a/test/SemaObjC/nested-typedef-decl.m b/test/SemaObjC/nested-typedef-decl.m index 70ca3a12cc0f..bb01eadba94b 100644 --- a/test/SemaObjC/nested-typedef-decl.m +++ b/test/SemaObjC/nested-typedef-decl.m @@ -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 { diff --git a/test/SemaObjC/newproperty-class-method-1.m b/test/SemaObjC/newproperty-class-method-1.m index d4ea5e54a553..0f32998ba53b 100644 --- a/test/SemaObjC/newproperty-class-method-1.m +++ b/test/SemaObjC/newproperty-class-method-1.m @@ -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); diff --git a/test/SemaObjC/no-gc-weak-test.m b/test/SemaObjC/no-gc-weak-test.m index ca8318d00fc2..dd9b73cc0de3 100644 --- a/test/SemaObjC/no-gc-weak-test.m +++ b/test/SemaObjC/no-gc-weak-test.m @@ -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 { diff --git a/test/SemaObjC/no-ivar-access-control.m b/test/SemaObjC/no-ivar-access-control.m index cf720992d479..6f00b1a367c7 100644 --- a/test/SemaObjC/no-ivar-access-control.m +++ b/test/SemaObjC/no-ivar-access-control.m @@ -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 diff --git a/test/SemaObjC/no-protocol-option-tests.m b/test/SemaObjC/no-protocol-option-tests.m index 311800f39a85..dbd2a14e91d0 100644 --- a/test/SemaObjC/no-protocol-option-tests.m +++ b/test/SemaObjC/no-protocol-option-tests.m @@ -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 diff --git a/test/SemaObjC/no-warn-qual-mismatch.m b/test/SemaObjC/no-warn-qual-mismatch.m index 1b5f184ae063..1e3c18636674 100644 --- a/test/SemaObjC/no-warn-qual-mismatch.m +++ b/test/SemaObjC/no-warn-qual-mismatch.m @@ -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 diff --git a/test/SemaObjC/no-warn-synth-protocol-meth.m b/test/SemaObjC/no-warn-synth-protocol-meth.m index fed6b27652ea..103f6bbd02ed 100644 --- a/test/SemaObjC/no-warn-synth-protocol-meth.m +++ b/test/SemaObjC/no-warn-synth-protocol-meth.m @@ -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; diff --git a/test/SemaObjC/no-warning-unavail-unimp.m b/test/SemaObjC/no-warning-unavail-unimp.m index 94093222e8c9..88d519d115c4 100644 --- a/test/SemaObjC/no-warning-unavail-unimp.m +++ b/test/SemaObjC/no-warning-unavail-unimp.m @@ -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 diff --git a/test/SemaObjC/nonnull.m b/test/SemaObjC/nonnull.m index 76c6ffa229ea..a38c0acb84f1 100644 --- a/test/SemaObjC/nonnull.m +++ b/test/SemaObjC/nonnull.m @@ -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; diff --git a/test/SemaObjC/nsobject-attribute-1.m b/test/SemaObjC/nsobject-attribute-1.m index 991246c72fd4..72d8fa693a9b 100644 --- a/test/SemaObjC/nsobject-attribute-1.m +++ b/test/SemaObjC/nsobject-attribute-1.m @@ -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; diff --git a/test/SemaObjC/nsobject-attribute.m b/test/SemaObjC/nsobject-attribute.m index bbeb31a85962..f41df8932887 100644 --- a/test/SemaObjC/nsobject-attribute.m +++ b/test/SemaObjC/nsobject-attribute.m @@ -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; diff --git a/test/SemaObjC/objc-buffered-methods.m b/test/SemaObjC/objc-buffered-methods.m index 78912aed8605..a4b83be0cd70 100644 --- a/test/SemaObjC/objc-buffered-methods.m +++ b/test/SemaObjC/objc-buffered-methods.m @@ -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; diff --git a/test/SemaObjC/objc-cstyle-args-in-methods.m b/test/SemaObjC/objc-cstyle-args-in-methods.m index 9f752959e95b..d37b5897b114 100644 --- a/test/SemaObjC/objc-cstyle-args-in-methods.m +++ b/test/SemaObjC/objc-cstyle-args-in-methods.m @@ -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; diff --git a/test/SemaObjC/objc-qualified-property-lookup.m b/test/SemaObjC/objc-qualified-property-lookup.m index daf583de334b..48b28cb05ca5 100644 --- a/test/SemaObjC/objc-qualified-property-lookup.m +++ b/test/SemaObjC/objc-qualified-property-lookup.m @@ -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 diff --git a/test/SemaObjC/pedantic-dynamic-test.m b/test/SemaObjC/pedantic-dynamic-test.m index 9b14c1d75f39..61f36b333826 100644 --- a/test/SemaObjC/pedantic-dynamic-test.m +++ b/test/SemaObjC/pedantic-dynamic-test.m @@ -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 diff --git a/test/SemaObjC/pragma-pack.m b/test/SemaObjC/pragma-pack.m index e0ee5609d731..ba39257fcd50 100644 --- a/test/SemaObjC/pragma-pack.m +++ b/test/SemaObjC/pragma-pack.m @@ -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. @interface X diff --git a/test/SemaObjC/property-2.m b/test/SemaObjC/property-2.m index 069b0cbc7132..f95af5990275 100644 --- a/test/SemaObjC/property-2.m +++ b/test/SemaObjC/property-2.m @@ -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; diff --git a/test/SemaObjC/property-9.m b/test/SemaObjC/property-9.m index a7668da04095..4bed8751b6a8 100644 --- a/test/SemaObjC/property-9.m +++ b/test/SemaObjC/property-9.m @@ -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 diff --git a/test/SemaObjC/property-and-ivar-use.m b/test/SemaObjC/property-and-ivar-use.m index 12874e7d201e..5b40d854898e 100644 --- a/test/SemaObjC/property-and-ivar-use.m +++ b/test/SemaObjC/property-and-ivar-use.m @@ -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. diff --git a/test/SemaObjC/property-category-1.m b/test/SemaObjC/property-category-1.m index fd2ae1165b6f..3788bc90ddf0 100644 --- a/test/SemaObjC/property-category-1.m +++ b/test/SemaObjC/property-category-1.m @@ -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; diff --git a/test/SemaObjC/property-category-3.m b/test/SemaObjC/property-category-3.m index 2a61d9272477..47e93a33d242 100644 --- a/test/SemaObjC/property-category-3.m +++ b/test/SemaObjC/property-category-3.m @@ -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}} diff --git a/test/SemaObjC/property-category-4.m b/test/SemaObjC/property-category-4.m index aa49a3f0b5ed..e7939b32c114 100644 --- a/test/SemaObjC/property-category-4.m +++ b/test/SemaObjC/property-category-4.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface IDELogNavigator { diff --git a/test/SemaObjC/property-category-impl.m b/test/SemaObjC/property-category-impl.m index 21fdf1b6d4be..9524c22799da 100644 --- a/test/SemaObjC/property-category-impl.m +++ b/test/SemaObjC/property-category-impl.m @@ -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. diff --git a/test/SemaObjC/property-dot-receiver.m b/test/SemaObjC/property-dot-receiver.m index 733ad4288a83..c5a928b4e892 100644 --- a/test/SemaObjC/property-dot-receiver.m +++ b/test/SemaObjC/property-dot-receiver.m @@ -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 { diff --git a/test/SemaObjC/property-expression-error.m b/test/SemaObjC/property-expression-error.m index 6b5cf047dc17..e306722e6c51 100644 --- a/test/SemaObjC/property-expression-error.m +++ b/test/SemaObjC/property-expression-error.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface AddressMyProperties { diff --git a/test/SemaObjC/property-impl-misuse.m b/test/SemaObjC/property-impl-misuse.m index 122afc1d4b5b..c3cedb05ed61 100644 --- a/test/SemaObjC/property-impl-misuse.m +++ b/test/SemaObjC/property-impl-misuse.m @@ -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; diff --git a/test/SemaObjC/property-in-class-extension.m b/test/SemaObjC/property-in-class-extension.m index 53210fc34bf8..a7b513075263 100644 --- a/test/SemaObjC/property-in-class-extension.m +++ b/test/SemaObjC/property-in-class-extension.m @@ -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 diff --git a/test/SemaObjC/property-ivar-mismatch.m b/test/SemaObjC/property-ivar-mismatch.m index 16ff33855061..6abd6e662d72 100644 --- a/test/SemaObjC/property-ivar-mismatch.m +++ b/test/SemaObjC/property-ivar-mismatch.m @@ -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 diff --git a/test/SemaObjC/property-lookup-in-id.m b/test/SemaObjC/property-lookup-in-id.m index b729a4d85d73..38aa32c50607 100644 --- a/test/SemaObjC/property-lookup-in-id.m +++ b/test/SemaObjC/property-lookup-in-id.m @@ -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; diff --git a/test/SemaObjC/property-method-lookup-impl.m b/test/SemaObjC/property-method-lookup-impl.m index 0a018b0dffd8..19d4e684944a 100644 --- a/test/SemaObjC/property-method-lookup-impl.m +++ b/test/SemaObjC/property-method-lookup-impl.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface SSyncCEList { diff --git a/test/SemaObjC/property-not-lvalue.m b/test/SemaObjC/property-not-lvalue.m index 3d95d2607f8e..12d2cc62ff47 100644 --- a/test/SemaObjC/property-not-lvalue.m +++ b/test/SemaObjC/property-not-lvalue.m @@ -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; diff --git a/test/SemaObjC/property-ns-returns-not-retained-attr.m b/test/SemaObjC/property-ns-returns-not-retained-attr.m index a209da884ed7..96ef3eddecb1 100644 --- a/test/SemaObjC/property-ns-returns-not-retained-attr.m +++ b/test/SemaObjC/property-ns-returns-not-retained-attr.m @@ -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 diff --git a/test/SemaObjC/property-redundant-decl-accessor.m b/test/SemaObjC/property-redundant-decl-accessor.m index 2a24e7e82446..3b0e825b9d8c 100644 --- a/test/SemaObjC/property-redundant-decl-accessor.m +++ b/test/SemaObjC/property-redundant-decl-accessor.m @@ -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; diff --git a/test/SemaObjC/property-typecheck-1.m b/test/SemaObjC/property-typecheck-1.m index f86e04779991..f71e4a0f1c7f 100644 --- a/test/SemaObjC/property-typecheck-1.m +++ b/test/SemaObjC/property-typecheck-1.m @@ -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}} diff --git a/test/SemaObjC/property-user-setter.m b/test/SemaObjC/property-user-setter.m index 3dd19c5f3a76..7d4e544f0332 100644 --- a/test/SemaObjC/property-user-setter.m +++ b/test/SemaObjC/property-user-setter.m @@ -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; diff --git a/test/SemaObjC/property.m b/test/SemaObjC/property.m index 29f84daef9c4..a9487412c19d 100644 --- a/test/SemaObjC/property.m +++ b/test/SemaObjC/property.m @@ -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 { diff --git a/test/SemaObjC/protocol-archane.m b/test/SemaObjC/protocol-archane.m index 992d3e4798c1..49c9851122ec 100644 --- a/test/SemaObjC/protocol-archane.m +++ b/test/SemaObjC/protocol-archane.m @@ -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 diff --git a/test/SemaObjC/protocol-id-test-1.m b/test/SemaObjC/protocol-id-test-1.m index 6b2b682a135d..19a4432de619 100644 --- a/test/SemaObjC/protocol-id-test-1.m +++ b/test/SemaObjC/protocol-id-test-1.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -Wno-objc-root-class %s @interface FF - (void) Meth; diff --git a/test/SemaObjC/protocol-id-test-2.m b/test/SemaObjC/protocol-id-test-2.m index a9365e9cb932..6bd2feeeaf1f 100644 --- a/test/SemaObjC/protocol-id-test-2.m +++ b/test/SemaObjC/protocol-id-test-2.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -Wno-objc-root-class %s @protocol P @end diff --git a/test/SemaObjC/provisional-ivar-lookup.m b/test/SemaObjC/provisional-ivar-lookup.m index 007c21b726a5..2ec23a55c37c 100644 --- a/test/SemaObjC/provisional-ivar-lookup.m +++ b/test/SemaObjC/provisional-ivar-lookup.m @@ -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 { diff --git a/test/SemaObjC/qualified-protocol-method-conflicts.m b/test/SemaObjC/qualified-protocol-method-conflicts.m index 0cff3ff46841..d1d5612ef0ed 100644 --- a/test/SemaObjC/qualified-protocol-method-conflicts.m +++ b/test/SemaObjC/qualified-protocol-method-conflicts.m @@ -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 diff --git a/test/SemaObjC/related-result-type-inference.m b/test/SemaObjC/related-result-type-inference.m index 1448dfdaa53a..124767cd6654 100644 --- a/test/SemaObjC/related-result-type-inference.m +++ b/test/SemaObjC/related-result-type-inference.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -Wno-objc-root-class %s @interface Unrelated @end diff --git a/test/SemaObjC/return.m b/test/SemaObjC/return.m index 4e70bde1edc1..f69d41eaade9 100644 --- a/test/SemaObjC/return.m +++ b/test/SemaObjC/return.m @@ -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; diff --git a/test/SemaObjC/scope-check.m b/test/SemaObjC/scope-check.m index 5b73be5851f4..e19ba47ad272 100644 --- a/test/SemaObjC/scope-check.m +++ b/test/SemaObjC/scope-check.m @@ -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; diff --git a/test/SemaObjC/selector-3.m b/test/SemaObjC/selector-3.m index b248a5d036ab..4c12a9392dc1 100644 --- a/test/SemaObjC/selector-3.m +++ b/test/SemaObjC/selector-3.m @@ -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 diff --git a/test/SemaObjC/selector-error.m b/test/SemaObjC/selector-error.m index dfd6bd053d19..f59dec812b70 100644 --- a/test/SemaObjC/selector-error.m +++ b/test/SemaObjC/selector-error.m @@ -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; diff --git a/test/SemaObjC/self-assign.m b/test/SemaObjC/self-assign.m index f05b028d6718..e0f5f43f3319 100644 --- a/test/SemaObjC/self-assign.m +++ b/test/SemaObjC/self-assign.m @@ -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 diff --git a/test/SemaObjC/self-declared-in-block.m b/test/SemaObjC/self-declared-in-block.m index 25ce8ba59933..40a03313b693 100644 --- a/test/SemaObjC/self-declared-in-block.m +++ b/test/SemaObjC/self-declared-in-block.m @@ -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 diff --git a/test/SemaObjC/severe-syntax-error.m b/test/SemaObjC/severe-syntax-error.m index 626cd98a953c..8c59151c2bdd 100644 --- a/test/SemaObjC/severe-syntax-error.m +++ b/test/SemaObjC/severe-syntax-error.m @@ -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 diff --git a/test/SemaObjC/sizeof-interface.m b/test/SemaObjC/sizeof-interface.m index dc99befeefc4..7304b6c2c8a6 100644 --- a/test/SemaObjC/sizeof-interface.m +++ b/test/SemaObjC/sizeof-interface.m @@ -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}} diff --git a/test/SemaObjC/stand-alone-implementation.m b/test/SemaObjC/stand-alone-implementation.m index c33b66a37bc3..6fa9b4bec5a2 100644 --- a/test/SemaObjC/stand-alone-implementation.m +++ b/test/SemaObjC/stand-alone-implementation.m @@ -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. diff --git a/test/SemaObjC/synchronized.m b/test/SemaObjC/synchronized.m index dac620a81829..c158815acbf8 100644 --- a/test/SemaObjC/synchronized.m +++ b/test/SemaObjC/synchronized.m @@ -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 diff --git a/test/SemaObjC/synth-provisional-ivars-1.m b/test/SemaObjC/synth-provisional-ivars-1.m index 8bf687811fd2..0e155f4840f0 100644 --- a/test/SemaObjC/synth-provisional-ivars-1.m +++ b/test/SemaObjC/synth-provisional-ivars-1.m @@ -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; diff --git a/test/SemaObjC/synth-provisional-ivars.m b/test/SemaObjC/synth-provisional-ivars.m index 696eb9b38558..9d7abd566d7a 100644 --- a/test/SemaObjC/synth-provisional-ivars.m +++ b/test/SemaObjC/synth-provisional-ivars.m @@ -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; diff --git a/test/SemaObjC/synthesize-setter-contclass.m b/test/SemaObjC/synthesize-setter-contclass.m index 36967d458e36..d75441518725 100644 --- a/test/SemaObjC/synthesize-setter-contclass.m +++ b/test/SemaObjC/synthesize-setter-contclass.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface TestClass { diff --git a/test/SemaObjC/synthesized-ivar.m b/test/SemaObjC/synthesized-ivar.m index 745fe77449ac..8c9d90587f4d 100644 --- a/test/SemaObjC/synthesized-ivar.m +++ b/test/SemaObjC/synthesized-ivar.m @@ -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 { } diff --git a/test/SemaObjC/transparent-union.m b/test/SemaObjC/transparent-union.m index cb03dfec3563..6f2dbf915ac0 100644 --- a/test/SemaObjC/transparent-union.m +++ b/test/SemaObjC/transparent-union.m @@ -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; diff --git a/test/SemaObjC/undeclared-selector.m b/test/SemaObjC/undeclared-selector.m index af52fde8806e..091451003f55 100644 --- a/test/SemaObjC/undeclared-selector.m +++ b/test/SemaObjC/undeclared-selector.m @@ -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; diff --git a/test/SemaObjC/undef-protocol-methods-1.m b/test/SemaObjC/undef-protocol-methods-1.m index 70ff22894654..15ba1a1eb2f8 100644 --- a/test/SemaObjC/undef-protocol-methods-1.m +++ b/test/SemaObjC/undef-protocol-methods-1.m @@ -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}} diff --git a/test/SemaObjC/undef-superclass-1.m b/test/SemaObjC/undef-superclass-1.m index ef2f1929716f..e8e03c5938f2 100644 --- a/test/SemaObjC/undef-superclass-1.m +++ b/test/SemaObjC/undef-superclass-1.m @@ -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}} diff --git a/test/SemaObjC/unimplemented-protocol-prop.m b/test/SemaObjC/unimplemented-protocol-prop.m index fa3ed8ef121c..1438cf595d1f 100644 --- a/test/SemaObjC/unimplemented-protocol-prop.m +++ b/test/SemaObjC/unimplemented-protocol-prop.m @@ -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 diff --git a/test/SemaObjC/unused.m b/test/SemaObjC/unused.m index 1ecf32295eae..975b9a96a773 100644 --- a/test/SemaObjC/unused.m +++ b/test/SemaObjC/unused.m @@ -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 *, ...); diff --git a/test/SemaObjC/warn-deprecated-implementations.m b/test/SemaObjC/warn-deprecated-implementations.m index 0e116fe9f346..919b2211ddc4 100644 --- a/test/SemaObjC/warn-deprecated-implementations.m +++ b/test/SemaObjC/warn-deprecated-implementations.m @@ -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 diff --git a/test/SemaObjC/warn-forward-class-attr-deprecated.m b/test/SemaObjC/warn-forward-class-attr-deprecated.m index 26e019627c47..854ff699eed4 100644 --- a/test/SemaObjC/warn-forward-class-attr-deprecated.m +++ b/test/SemaObjC/warn-forward-class-attr-deprecated.m @@ -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}} diff --git a/test/SemaObjC/warn-implicit-atomic-property.m b/test/SemaObjC/warn-implicit-atomic-property.m index 00e0c771d0f1..887a2862250a 100644 --- a/test/SemaObjC/warn-implicit-atomic-property.m +++ b/test/SemaObjC/warn-implicit-atomic-property.m @@ -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 diff --git a/test/SemaObjC/warn-missing-super.m b/test/SemaObjC/warn-missing-super.m index 0169a6157258..02b81651d7a2 100644 --- a/test/SemaObjC/warn-missing-super.m +++ b/test/SemaObjC/warn-missing-super.m @@ -1,5 +1,6 @@ @protocol NSCopying @end +__attribute__((objc_root_class)) @interface NSObject - (void)dealloc; @end @@ -40,18 +41,18 @@ - (void)finalize { @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. diff --git a/test/SemaObjC/warn-retain-cycle.m b/test/SemaObjC/warn-retain-cycle.m index a05e663c092c..00fd234a0c09 100644 --- a/test/SemaObjC/warn-retain-cycle.m +++ b/test/SemaObjC/warn-retain-cycle.m @@ -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; diff --git a/test/SemaObjC/warn-weak-field.m b/test/SemaObjC/warn-weak-field.m index ead454a04a37..e7b0fe2694d6 100644 --- a/test/SemaObjC/warn-weak-field.m +++ b/test/SemaObjC/warn-weak-field.m @@ -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}} diff --git a/test/SemaObjC/weak-property.m b/test/SemaObjC/weak-property.m index bea66281ea7b..8a2adf99b7e4 100644 --- a/test/SemaObjC/weak-property.m +++ b/test/SemaObjC/weak-property.m @@ -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 { diff --git a/test/SemaObjCXX/arc-overloading.mm b/test/SemaObjCXX/arc-overloading.mm index dad5d0f7051f..a74941721172 100644 --- a/test/SemaObjCXX/arc-overloading.mm +++ b/test/SemaObjCXX/arc-overloading.mm @@ -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}} diff --git a/test/SemaObjCXX/blocks.mm b/test/SemaObjCXX/blocks.mm index c91fd103e133..09d614d37287 100644 --- a/test/SemaObjCXX/blocks.mm +++ b/test/SemaObjCXX/blocks.mm @@ -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)); diff --git a/test/SemaObjCXX/composite-objc-pointertype.mm b/test/SemaObjCXX/composite-objc-pointertype.mm index 0d9a93897656..684f633f71cc 100644 --- a/test/SemaObjCXX/composite-objc-pointertype.mm +++ b/test/SemaObjCXX/composite-objc-pointertype.mm @@ -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 diff --git a/test/SemaObjCXX/cstyle-block-pointer-cast.mm b/test/SemaObjCXX/cstyle-block-pointer-cast.mm index 72f5283dea37..0f982bae62a7 100644 --- a/test/SemaObjCXX/cstyle-block-pointer-cast.mm +++ b/test/SemaObjCXX/cstyle-block-pointer-cast.mm @@ -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); diff --git a/test/SemaObjCXX/cxxoperator-selector.mm b/test/SemaObjCXX/cxxoperator-selector.mm index 6dd36a8c100e..f1aecab23a9d 100644 --- a/test/SemaObjCXX/cxxoperator-selector.mm +++ b/test/SemaObjCXX/cxxoperator-selector.mm @@ -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; diff --git a/test/SemaObjCXX/fragile-abi-object-assign.m b/test/SemaObjCXX/fragile-abi-object-assign.m index 953db6bbc06d..5bb3ac6f6f50 100644 --- a/test/SemaObjCXX/fragile-abi-object-assign.m +++ b/test/SemaObjCXX/fragile-abi-object-assign.m @@ -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 {} diff --git a/test/SemaObjCXX/goto.mm b/test/SemaObjCXX/goto.mm index 67df1f4c3240..55bde99da29f 100644 --- a/test/SemaObjCXX/goto.mm +++ b/test/SemaObjCXX/goto.mm @@ -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(); }; diff --git a/test/SemaObjCXX/instantiate-method-return.mm b/test/SemaObjCXX/instantiate-method-return.mm index b8ba4af09222..2a3ae3231280 100644 --- a/test/SemaObjCXX/instantiate-method-return.mm +++ b/test/SemaObjCXX/instantiate-method-return.mm @@ -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; diff --git a/test/SemaObjCXX/ivar-construct.mm b/test/SemaObjCXX/ivar-construct.mm index da066e965971..535d2a0217ff 100644 --- a/test/SemaObjCXX/ivar-construct.mm +++ b/test/SemaObjCXX/ivar-construct.mm @@ -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(); diff --git a/test/SemaObjCXX/ivar-lookup.mm b/test/SemaObjCXX/ivar-lookup.mm index bb26f48f13d5..fc99c15fd379 100644 --- a/test/SemaObjCXX/ivar-lookup.mm +++ b/test/SemaObjCXX/ivar-lookup.mm @@ -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 diff --git a/test/SemaObjCXX/message.mm b/test/SemaObjCXX/message.mm index 51a15d5773ba..5ac2f40db849 100644 --- a/test/SemaObjCXX/message.mm +++ b/test/SemaObjCXX/message.mm @@ -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 diff --git a/test/SemaObjCXX/objc-decls-inside-namespace.mm b/test/SemaObjCXX/objc-decls-inside-namespace.mm index f68078b6779d..070207195f37 100644 --- a/test/SemaObjCXX/objc-decls-inside-namespace.mm +++ b/test/SemaObjCXX/objc-decls-inside-namespace.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s namespace C { diff --git a/test/SemaObjCXX/objc-pointer-conv.mm b/test/SemaObjCXX/objc-pointer-conv.mm index 6f59de179472..611b7bc009ae 100644 --- a/test/SemaObjCXX/objc-pointer-conv.mm +++ b/test/SemaObjCXX/objc-pointer-conv.mm @@ -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; diff --git a/test/SemaObjCXX/overload.mm b/test/SemaObjCXX/overload.mm index 3139876bd2ea..6f24c59e3a73 100644 --- a/test/SemaObjCXX/overload.mm +++ b/test/SemaObjCXX/overload.mm @@ -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 diff --git a/test/SemaObjCXX/propert-dot-error.mm b/test/SemaObjCXX/propert-dot-error.mm index 5f7efdd90a04..2237411aaf0c 100644 --- a/test/SemaObjCXX/propert-dot-error.mm +++ b/test/SemaObjCXX/propert-dot-error.mm @@ -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 { diff --git a/test/SemaObjCXX/properties.mm b/test/SemaObjCXX/properties.mm index 4d107c0356e5..3c6b13858686 100644 --- a/test/SemaObjCXX/properties.mm +++ b/test/SemaObjCXX/properties.mm @@ -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; diff --git a/test/SemaObjCXX/property-reference.mm b/test/SemaObjCXX/property-reference.mm index 9cc51d53760d..18f06045a340 100644 --- a/test/SemaObjCXX/property-reference.mm +++ b/test/SemaObjCXX/property-reference.mm @@ -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 diff --git a/test/SemaObjCXX/property-synthesis-error.mm b/test/SemaObjCXX/property-synthesis-error.mm index c50756622cc6..4b726d8ca64a 100644 --- a/test/SemaObjCXX/property-synthesis-error.mm +++ b/test/SemaObjCXX/property-synthesis-error.mm @@ -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 diff --git a/test/SemaObjCXX/void_to_obj.mm b/test/SemaObjCXX/void_to_obj.mm index 7dca9faa8544..97151fd7fa49 100644 --- a/test/SemaObjCXX/void_to_obj.mm +++ b/test/SemaObjCXX/void_to_obj.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s // @class XX;