[llvm-branch-commits] [cfe-branch] r123697 - in /cfe/branches/Apple/whitney: include/clang/Driver/CC1Options.td lib/Frontend/CompilerInvocation.cpp test/CodeGenObjC/debug-info-default-synth-ivar.m test/Index/complete-synthesized.m test/SemaObjC/default-synthesize-1.m test/SemaObjC/default-synthesize.m test/SemaObjC/direct-synthesized-ivar-access.m test/SemaObjC/duplicate-ivar-in-class-extension.m test/SemaObjC/provisional-ivar-lookup.m test/SemaObjC/synth-provisional-ivars.m test/SemaObjC/synthesized-ivar.m
Daniel Dunbar
daniel at zuster.org
Mon Jan 17 16:02:42 PST 2011
Author: ddunbar
Date: Mon Jan 17 18:02:41 2011
New Revision: 123697
URL: http://llvm.org/viewvc/llvm-project?rev=123697&view=rev
Log:
Unbind -fobjc-default-synthesize-properties.
Removed:
cfe/branches/Apple/whitney/test/CodeGenObjC/debug-info-default-synth-ivar.m
cfe/branches/Apple/whitney/test/Index/complete-synthesized.m
cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize-1.m
cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize.m
cfe/branches/Apple/whitney/test/SemaObjC/direct-synthesized-ivar-access.m
cfe/branches/Apple/whitney/test/SemaObjC/duplicate-ivar-in-class-extension.m
cfe/branches/Apple/whitney/test/SemaObjC/provisional-ivar-lookup.m
cfe/branches/Apple/whitney/test/SemaObjC/synth-provisional-ivars.m
cfe/branches/Apple/whitney/test/SemaObjC/synthesized-ivar.m
Modified:
cfe/branches/Apple/whitney/include/clang/Driver/CC1Options.td
cfe/branches/Apple/whitney/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/branches/Apple/whitney/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/include/clang/Driver/CC1Options.td?rev=123697&r1=123696&r2=123697&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/include/clang/Driver/CC1Options.td (original)
+++ cfe/branches/Apple/whitney/include/clang/Driver/CC1Options.td Mon Jan 17 18:02:41 2011
@@ -459,8 +459,6 @@
HelpText<"Use GC exclusively for Objective-C related memory management">;
def fobjc_dispatch_method_EQ : Joined<"-fobjc-dispatch-method=">,
HelpText<"Objective-C dispatch method to use">;
-def fobjc_default_synthesize_properties : Flag<"-fobjc-default-synthesize-properties">,
- HelpText<"enable the default synthesis of Objective-C properties">;
def print_ivar_layout : Flag<"-print-ivar-layout">,
HelpText<"Enable Objective-C Ivar layout bitmap print trace">;
def fobjc_nonfragile_abi : Flag<"-fobjc-nonfragile-abi">,
Modified: cfe/branches/Apple/whitney/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Frontend/CompilerInvocation.cpp?rev=123697&r1=123696&r2=123697&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Frontend/CompilerInvocation.cpp Mon Jan 17 18:02:41 2011
@@ -546,8 +546,6 @@
Res.push_back("-fobjc-nonfragile-abi");
if (Opts.ObjCNonFragileABI2)
Res.push_back("-fobjc-nonfragile-abi");
- if (Opts.ObjCDefaultSynthProperties)
- Res.push_back("-fobjc-default-synthesize-properties");
// NoInline is implicit.
if (!Opts.CXXOperatorNames)
Res.push_back("-fno-operator-names");
@@ -1381,8 +1379,6 @@
Opts.ObjCNonFragileABI = Args.hasArg(OPT_fobjc_nonfragile_abi);
if (Opts.ObjCNonFragileABI)
Opts.ObjCNonFragileABI2 = true;
- Opts.ObjCDefaultSynthProperties =
- Args.hasArg(OPT_fobjc_default_synthesize_properties);
Opts.CatchUndefined = Args.hasArg(OPT_fcatch_undefined_behavior);
Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls);
Opts.PICLevel = Args.getLastArgIntValue(OPT_pic_level, 0, Diags);
Removed: cfe/branches/Apple/whitney/test/CodeGenObjC/debug-info-default-synth-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/CodeGenObjC/debug-info-default-synth-ivar.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/CodeGenObjC/debug-info-default-synth-ivar.m (original)
+++ cfe/branches/Apple/whitney/test/CodeGenObjC/debug-info-default-synth-ivar.m (removed)
@@ -1,35 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -emit-llvm -g %s -o %t
-// RUN: grep DW_TAG_member %t | count 5
-// rdar://8493239
-
- at class NSString;
-
- at interface InstanceVariablesEverywhereButTheInterface
- at end
-
- at interface InstanceVariablesEverywhereButTheInterface()
-{
- NSString *_someString;
-}
-
- at property(readonly) NSString *someString;
- at property(readonly) unsigned long someNumber;
- at end
-
- at implementation InstanceVariablesEverywhereButTheInterface
-{
- unsigned long _someNumber;
-}
- at synthesize someString = _someString, someNumber = _someNumber;
- at end
-
- at interface AutomaticSynthesis
-{
- int real_ivar;
-}
- at property(copy) NSString *someString;
- at property unsigned long someNumber;
- at end
-
- at implementation AutomaticSynthesis
- at end
Removed: cfe/branches/Apple/whitney/test/Index/complete-synthesized.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/Index/complete-synthesized.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/Index/complete-synthesized.m (original)
+++ cfe/branches/Apple/whitney/test/Index/complete-synthesized.m (removed)
@@ -1,56 +0,0 @@
-// Note: this test is line- and column-sensitive. Test commands are at
-// the end.
-
-
- at interface A
- at property int prop1;
- at end
-
- at interface B : A {
- float _prop2;
-}
- at property float prop2;
- at property short prop3;
- at end
-
- at interface B ()
- at property double prop4;
- at end
-
- at implementation B
- at synthesize prop2 = _prop2;
-
-- (int)method {
- return _prop2;
-}
-
- at dynamic prop3;
-
-- (short)method2 {
- return prop4;
-}
-
-- (short)method3 {
- return prop3;
-}
- at end
-
-// RUN: c-index-test -code-completion-at=%s:24:1 -Xclang -fobjc-nonfragile-abi -Xclang -fobjc-default-synthesize-properties %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: NotImplemented:{TypedText _Bool} (50)
-// CHECK-CC1: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
-// CHECK-CC1-NOT: prop2
-// CHECK-CC1: ObjCPropertyDecl:{ResultType short}{TypedText prop3} (35)
-// CHECK-CC1: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
-
-// RUN: c-index-test -code-completion-at=%s:30:2 -Xclang -fobjc-nonfragile-abi -Xclang -fobjc-default-synthesize-properties %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: NotImplemented:{TypedText _Bool} (50)
-// CHECK-CC2: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
-// CHECK-CC2-NOT: prop3
-// CHECK-CC2: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
-
-// RUN: c-index-test -code-completion-at=%s:34:2 -Xclang -fobjc-nonfragile-abi -Xclang -fobjc-default-synthesize-properties %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: NotImplemented:{TypedText _Bool} (50)
-// CHECK-CC3: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
-// CHECK-CC3: ObjCIvarDecl:{ResultType double}{TypedText prop4}
-// CHECK-CC3-NOT: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
-// CHECK-CC1: restrict
Removed: cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize-1.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize-1.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize-1.m (removed)
@@ -1,116 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -verify %s
-
- at interface NSObject
-- (void) release;
-- (id) retain;
- at end
- at class NSString;
-
- at interface SynthItAll : NSObject
- at property int howMany;
- at property (retain) NSString* what;
- at end
-
- at implementation SynthItAll
-//@synthesize howMany, what;
- at end
-
-
- at interface SynthSetter : NSObject
- at property (nonatomic) int howMany; // REM: nonatomic to avoid warnings about only implementing one of the pair
- at property (nonatomic, retain) NSString* what;
- at end
-
- at implementation SynthSetter
-//@synthesize howMany, what;
-
-- (int) howMany {
- return howMany;
-}
-// - (void) setHowMany: (int) value
-
-- (NSString*) what {
- return what;
-}
-// - (void) setWhat: (NSString*) value
- at end
-
-
- at interface SynthGetter : NSObject
- at property (nonatomic) int howMany; // REM: nonatomic to avoid warnings about only implementing one of the pair
- at property (nonatomic, retain) NSString* what;
- at end
-
- at implementation SynthGetter
-//@synthesize howMany, what;
-
-// - (int) howMany
-- (void) setHowMany: (int) value {
- howMany = value;
-}
-
-// - (NSString*) what
-- (void) setWhat: (NSString*) value {
- if (what != value) {
- [what release];
- what = [value retain];
- }
-}
- at end
-
-
- at interface SynthNone : NSObject
- at property int howMany;
- at property (retain) NSString* what;
- at end
-
- at implementation SynthNone
-//@synthesize howMany, what; // REM: Redundant anyway
-
-- (int) howMany {
- return howMany;
-}
-- (void) setHowMany: (int) value {
- howMany = value;
-}
-
-- (NSString*) what {
- return what;
-}
-- (void) setWhat: (NSString*) value {
- if (what != value) {
- [what release];
- what = [value retain];
- }
-}
- at end
-
-// rdar://8349319
-// No default synthesis if implementation has getter (readonly) and setter(readwrite) methods.
- at interface DSATextSearchResult
- at property(assign,readonly) float relevance;
- at property(assign,readonly) char isTitleMatch;
- at end
-
- at interface DSANodeSearchResult : DSATextSearchResult {}
- at end
-
-
- at implementation DSATextSearchResult
--(char)isTitleMatch {
- return (char)0;
-}
-
--(float)relevance {
- return 0.0;
-}
- at end
-
- at implementation DSANodeSearchResult
--(id)initWithNode:(id )node relevance:(float)relevance isTitleMatch:(char)isTitleMatch {
- relevance = 0.0;
- isTitleMatch = 'a';
- return self;
-}
- at end
-
Removed: cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/default-synthesize.m (removed)
@@ -1,117 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -verify %s
-
- at interface NSString @end
-
- at interface NSObject @end
-
- at interface SynthItAll
- at property int howMany;
- at property (retain) NSString* what;
- at end
-
- at implementation SynthItAll
-//@synthesize howMany, what;
- at end
-
-
- at interface SynthSetter : NSObject
- at property (nonatomic) int howMany; // REM: nonatomic to avoid warnings about only implementing one of the pair
- at property (nonatomic, retain) NSString* what;
- at end
-
- at implementation SynthSetter
-//@synthesize howMany, what;
-
-- (int) howMany {
- return self.howMany;
-}
-// - (void) setHowMany: (int) value
-
-- (NSString*) what {
- return self.what;
-}
-// - (void) setWhat: (NSString*) value
- at end
-
-
- at interface SynthGetter : NSObject
- at property (nonatomic) int howMany; // REM: nonatomic to avoid warnings about only implementing one of the pair
- at property (nonatomic, retain) NSString* what;
- at end
-
- at implementation SynthGetter
-//@synthesize howMany, what;
-
-// - (int) howMany
-- (void) setHowMany: (int) value {
- self.howMany = value;
-}
-
-// - (NSString*) what
-- (void) setWhat: (NSString*) value {
- if (self.what != value) {
- }
-}
- at end
-
-
- at interface SynthNone : NSObject
- at property int howMany;
- at property (retain) NSString* what;
- at end
-
- at implementation SynthNone
-//@synthesize howMany, what; // REM: Redundant anyway
-
-- (int) howMany {
- return self.howMany;
-}
-- (void) setHowMany: (int) value {
- self.howMany = value;
-}
-
-- (NSString*) what {
- return self.what;
-}
-- (void) setWhat: (NSString*) value {
- if (self.what != value) {
- }
-}
- at end
-
- at protocol TopProtocol
- @property (readonly) id myString;
- at end
-
- at interface TopClass <TopProtocol>
-{
- id myString;
-}
- at end
-
- at interface SubClass : TopClass <TopProtocol>
- at end
-
- at implementation SubClass @end
-
-// rdar: // 7920807
- at interface C @end
- at interface C (Category)
- at property int p; // expected-warning {{property 'p' requires method 'p' to be defined }} \
- // expected-warning {{property 'p' requires method 'setP:' to be defined}}
- at end
- at implementation C (Category) // expected-note 2 {{implementation is here}}
- at end
-
-// Don't complain if a property is already @synthesized by usr.
- at interface D
-{
-}
- at property int PROP;
- at end
-
- at implementation D
-- (int) Meth { return self.PROP; }
- at synthesize PROP=IVAR;
- at end
-
Removed: cfe/branches/Apple/whitney/test/SemaObjC/direct-synthesized-ivar-access.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/direct-synthesized-ivar-access.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/direct-synthesized-ivar-access.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/direct-synthesized-ivar-access.m (removed)
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -Wnonfragile-abi2 -fsyntax-only -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -verify %s
-// rdar://8673791
-
- at interface I {
-}
-
- at property int IVAR; // expected-note {{property declared here}}
-- (int) OK;
- at end
-
- at implementation I
-- (int) Meth { return IVAR; } // expected-warning {{direct access of synthesized ivar by using property access 'IVAR'}}
-- (int) OK { return self.IVAR; }
- at end
Removed: cfe/branches/Apple/whitney/test/SemaObjC/duplicate-ivar-in-class-extension.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/duplicate-ivar-in-class-extension.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/duplicate-ivar-in-class-extension.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/duplicate-ivar-in-class-extension.m (removed)
@@ -1,32 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -verify %s
-
- at interface Root @end
-
- at interface SuperClass : Root
-{
- int iSuper; // expected-note {{previous declaration is here}}
-}
- at end
-
- at interface SubClass : SuperClass {
- int ivar; // expected-error {{duplicate member 'ivar'}}
- int another_ivar; // expected-error {{duplicate member 'another_ivar'}}
- int iSuper; // expected-error {{duplicate member 'iSuper'}}
-}
- at end
-
- at interface SuperClass () {
- int ivar; // expected-note {{previous declaration is here}}
-}
- at end
-
- at interface Root () {
- int another_ivar; // expected-note {{previous declaration is here}}
-}
- at end
-
- at implementation SubClass
--(int) method {
- return self->ivar; // would be ambiguous if the duplicate ivar were allowed
-}
- at end
Removed: cfe/branches/Apple/whitney/test/SemaObjC/provisional-ivar-lookup.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/provisional-ivar-lookup.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/provisional-ivar-lookup.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/provisional-ivar-lookup.m (removed)
@@ -1,43 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -fobjc-nonfragile-abi -verify %s
-
-// rdar:// 8565343
- at interface Foo {
- at private
- int _foo;
- int _foo2;
-}
- at property (readwrite, nonatomic) int foo, foo1, foo2, foo3;
- at property (readwrite, nonatomic) int PROP;
- at end
-
- at implementation Foo
-
- at synthesize foo = _foo;
- at synthesize foo1;
-
-- (void)setFoo:(int)value {
- _foo = foo; // expected-error {{use of undeclared identifier 'foo'}}
-}
-
-- (void)setFoo1:(int)value {
- _foo = foo1; // OK
-}
-
-- (void)setFoo2:(int)value {
- _foo = foo2; // expected-error {{use of undeclared identifier 'foo2'}}
-}
-
-- (void)setFoo3:(int)value {
- _foo = foo3; // OK
-}
-
- at synthesize foo2 = _foo2;
- at synthesize foo3;
-
- at synthesize PROP=PROP;
-- (void)setPROP:(int)value {
- PROP = PROP; // OK
-}
-
- at end
-
Removed: cfe/branches/Apple/whitney/test/SemaObjC/synth-provisional-ivars.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/synth-provisional-ivars.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/synth-provisional-ivars.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/synth-provisional-ivars.m (removed)
@@ -1,50 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -verify %s
-
-int bar;
-
- at interface I
-{
- int _bar;
-}
- at property int PROP;
- at property int PROP1;
- at property int PROP2;
- at property int PROP3;
- at property int PROP4;
-
- at property int bar;
- at property int bar1;
-
- at end
-
- at implementation I
-- (int) Meth { return PROP; } // expected-note 2{{'PROP' declared here}}
-
- at dynamic PROP1;
-- (int) Meth1 { return PROP1; } // expected-error {{use of undeclared identifier 'PROP1'}}
-
-- (int) Meth2 { return PROP2; } // expected-error {{use of undeclared identifier 'PROP2'}}
- at dynamic PROP2;
-
-- (int) Meth3 { return PROP3; } // expected-error {{use of undeclared identifier 'PROP3'}}
- at synthesize PROP3=IVAR;
-
-- (int) Meth4 { return PROP4; }
- at synthesize PROP4=PROP4;
-
-- (int) Meth5 { return bar; } // expected-error {{use of undeclared identifier 'bar'}}
- at synthesize bar = _bar;
-
-- (int) Meth6 { return bar1; }
-
- at end
-
- at implementation I(CAT)
-- (int) Meth { return PROP1; } // expected-error {{use of undeclared identifier 'PROP1'}}
- at end
-
- at implementation I(r8251648)
-- (int) Meth1: (int) bar {
- return bar; // expected-warning {{local declaration of 'bar' hides instance variable}}
-}
- at end
Removed: cfe/branches/Apple/whitney/test/SemaObjC/synthesized-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaObjC/synthesized-ivar.m?rev=123696&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaObjC/synthesized-ivar.m (original)
+++ cfe/branches/Apple/whitney/test/SemaObjC/synthesized-ivar.m (removed)
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -fobjc-default-synthesize-properties -verify %s
- at interface I
-{
-}
- at property int IP;
- at end
-
- at implementation I
- at synthesize IP;
-- (int) Meth {
- return IP;
-}
- at end
-
-// rdar: // 7823675
-int f0(I *a) { return a->IP; } // expected-error {{instance variable 'IP' is private}}
-
-// rdar://8769582
-
- at interface I1 {
- int protected_ivar;
-}
- at property int PROP_INMAIN;
- at end
-
- at interface I1() {
- int private_ivar;
-}
- at property int PROP_INCLASSEXT;
- at end
-
- at implementation I1
-- (int) Meth {
- PROP_INMAIN = 1;
- PROP_INCLASSEXT = 2;
- protected_ivar = 1; // OK
- return private_ivar; // OK
-}
- at end
-
-
- at interface DER : I1
- at end
-
- at implementation DER
-- (int) Meth {
- protected_ivar = 1; // OK
- PROP_INMAIN = 1; // expected-error {{instance variable 'PROP_INMAIN' is private}}
- PROP_INCLASSEXT = 2; // expected-error {{instance variable 'PROP_INCLASSEXT' is private}}
- return private_ivar; // expected-error {{instance variable 'private_ivar' is private}}
-}
- at end
-
More information about the llvm-branch-commits
mailing list