Home | History | Annotate | Download | only in ARCMT
      1 // REQUIRES: x86-registered-target
      2 // RUN: rm -rf %t
      3 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s -verify
      4 // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -objcmt-migrate-literals -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c
      5 // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
      6 
      7 // Make sure there is no crash.
      8 
      9 @interface NSObject @end
     10 @interface NSNumber : NSObject
     11 @end
     12 
     13 @interface NSNumber (NSNumberCreation)
     14 + (NSNumber *)numberWithInt:(int)value;
     15 @end
     16 
     17 void foo(int x = undeclared) { // expected-error {{undeclared}}
     18   NSNumber *n = [NSNumber numberWithInt:1];
     19 }
     20