Author: fjahanian
Date: Fri Dec  5 12:38:31 2008
New Revision: 60599

URL: http://llvm.org/viewvc/llvm-project?rev=60599&view=rev
Log:
Fixed a test case. Added a test case showing property setter's
type mismatch (related to my last patch).

Added:
    cfe/trunk/test/SemaObjC/property-typecheck-1.m
Modified:
    cfe/trunk/test/SemaObjC/method-typecheck-1.m

Modified: cfe/trunk/test/SemaObjC/method-typecheck-1.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-typecheck-1.m?rev=60599&r1=60598&r2=60599&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-typecheck-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-typecheck-1.m Fri Dec  5 12:38:31 2008
@@ -1,3 +1,5 @@
+// RUN: clang -fsyntax-only -verify %s
+
 @interface A
 - (void) setMoo: (int) x;      //  expected-note {{previous definition is 
here}}
 - (int) setMoo1: (int) x;      //  expected-note {{previous definition is 
here}}

Added: cfe/trunk/test/SemaObjC/property-typecheck-1.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-typecheck-1.m?rev=60599&view=auto

==============================================================================
--- cfe/trunk/test/SemaObjC/property-typecheck-1.m (added)
+++ cfe/trunk/test/SemaObjC/property-typecheck-1.m Fri Dec  5 12:38:31 2008
@@ -0,0 +1,19 @@
+// RUN: clang -fsyntax-only -verify %s
+
[EMAIL PROTECTED] A
+-(float) x;
[EMAIL PROTECTED] int x; // expected-error {{type of property 'x' does not 
match type of accessor 'x'}}
[EMAIL PROTECTED]
+
[EMAIL PROTECTED] A (Cat)
[EMAIL PROTECTED] int moo;      // expected-note {{previous definition is here}}
[EMAIL PROTECTED]
+
[EMAIL PROTECTED] A (Cat)
+-(int) moo {
+  return 0;
+}
+-(void) setMoo: (float) x { // expected-warning {{conflicting types for 
'setMoo:'}}
+}
[EMAIL PROTECTED]
+


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to