[objcmt] Add test case for r157395.

llvm-svn: 157404
This commit is contained in:
Argyrios Kyrtzidis 2012-05-24 17:49:22 +00:00
parent 83e9668133
commit bb2be0dca3
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
// RUN: rm -rf %t // RUN: rm -rf %t
// RUN: %clang_cc1 -objcmt-migrate-literals -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c++ // RUN: %clang_cc1 -objcmt-migrate-literals -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c++ -verify
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s.result // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s.result
@ -81,6 +81,7 @@ void foo() {
MyEnm myenum; MyEnm myenum;
[NSNumber numberWithInteger:myenum]; [NSNumber numberWithInteger:myenum];
[NSNumber numberWithInteger:ME_foo]; [NSNumber numberWithInteger:ME_foo];
[NSNumber numberWithDouble:cppb]; // expected-warning {{converting to boxing syntax requires a cast}}
} }
void boxString() { void boxString() {

View File

@ -1,5 +1,5 @@
// RUN: rm -rf %t // RUN: rm -rf %t
// RUN: %clang_cc1 -objcmt-migrate-literals -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c++ // RUN: %clang_cc1 -objcmt-migrate-literals -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c++ -verify
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s.result // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s.result
@ -81,6 +81,7 @@ void foo() {
MyEnm myenum; MyEnm myenum;
@(myenum); @(myenum);
@(ME_foo); @(ME_foo);
[NSNumber numberWithDouble:cppb]; // expected-warning {{converting to boxing syntax requires a cast}}
} }
void boxString() { void boxString() {