From 9a66002356c2f09d72746a0360f293b14d823c21 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 1 May 2012 10:52:06 +0000 Subject: [PATCH] clang/test/Rewriter: Remove XFAIL and add -U__declspec to other 9 tests. mingw32 tends to define built-in __declspec. llvm-svn: 155911 --- clang/test/Rewriter/objc-modern-boxing.mm | 6 +----- clang/test/Rewriter/rewrite-byref-in-nested-blocks.mm | 5 ++--- clang/test/Rewriter/rewrite-modern-block-consts.mm | 3 +-- clang/test/Rewriter/rewrite-modern-block.mm | 3 +-- clang/test/Rewriter/rewrite-modern-ivar-access.mm | 5 +---- clang/test/Rewriter/rewrite-modern-ivars-1.mm | 2 +- clang/test/Rewriter/rewrite-modern-struct-ivar.mm | 2 +- clang/test/Rewriter/rewrite-rewritten-initializer.mm | 5 ++--- 8 files changed, 10 insertions(+), 21 deletions(-) diff --git a/clang/test/Rewriter/objc-modern-boxing.mm b/clang/test/Rewriter/objc-modern-boxing.mm index ed042e056e42..3374f3047664 100644 --- a/clang/test/Rewriter/objc-modern-boxing.mm +++ b/clang/test/Rewriter/objc-modern-boxing.mm @@ -1,11 +1,7 @@ // RUN: %clang_cc1 -E %s -o %t.mm // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp -Wno-attributes - -// FIXME: It is incompatible to mingw due to __declspec. -// See also r155278 -// XFAIL: mingw32 +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp -Wno-attributes extern char *strdup(const char *str); extern "C" void *sel_registerName(const char *); diff --git a/clang/test/Rewriter/rewrite-byref-in-nested-blocks.mm b/clang/test/Rewriter/rewrite-byref-in-nested-blocks.mm index dc8e737fc038..1583945b2c91 100644 --- a/clang/test/Rewriter/rewrite-byref-in-nested-blocks.mm +++ b/clang/test/Rewriter/rewrite-byref-in-nested-blocks.mm @@ -1,9 +1,8 @@ // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-modern-rw.cpp // radar 7692350 -// XFAIL: mingw32 void f(void (^block)(void)); diff --git a/clang/test/Rewriter/rewrite-modern-block-consts.mm b/clang/test/Rewriter/rewrite-modern-block-consts.mm index bc0e50bd9514..7ff39a58c379 100644 --- a/clang/test/Rewriter/rewrite-modern-block-consts.mm +++ b/clang/test/Rewriter/rewrite-modern-block-consts.mm @@ -1,7 +1,6 @@ // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"__declspec(X)=" %t-modern-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -U__declspec -D"__declspec(X)=" %t-modern-rw.cpp // rdar:// 8243071 -// XFAIL: mingw32 void x(int y) {} void f() { diff --git a/clang/test/Rewriter/rewrite-modern-block.mm b/clang/test/Rewriter/rewrite-modern-block.mm index dcb1c84a076a..cc9710efe934 100644 --- a/clang/test/Rewriter/rewrite-modern-block.mm +++ b/clang/test/Rewriter/rewrite-modern-block.mm @@ -1,7 +1,6 @@ // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp // rdar://11230308 -// XFAIL: mingw32 typedef struct { char byte0; diff --git a/clang/test/Rewriter/rewrite-modern-ivar-access.mm b/clang/test/Rewriter/rewrite-modern-ivar-access.mm index 6599236e71c2..4bde1a401312 100644 --- a/clang/test/Rewriter/rewrite-modern-ivar-access.mm +++ b/clang/test/Rewriter/rewrite-modern-ivar-access.mm @@ -1,8 +1,5 @@ // RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %s -o %t-rw.cpp -// RUN: %clang_cc1 -Werror -fsyntax-only -Wno-address-of-temporary -Wno-c++11-narrowing -std=c++11 -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp - -// FIXME: It is incompatible to mingw due to __declspec. -// XFAIL: mingw32 +// RUN: %clang_cc1 -Werror -fsyntax-only -Wno-address-of-temporary -Wno-c++11-narrowing -std=c++11 -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp struct OUTSIDE { int i_OUTSIDE; diff --git a/clang/test/Rewriter/rewrite-modern-ivars-1.mm b/clang/test/Rewriter/rewrite-modern-ivars-1.mm index f05d8091d05f..dbd28d121ee0 100644 --- a/clang/test/Rewriter/rewrite-modern-ivars-1.mm +++ b/clang/test/Rewriter/rewrite-modern-ivars-1.mm @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp @interface NSCheapMutableString { @private diff --git a/clang/test/Rewriter/rewrite-modern-struct-ivar.mm b/clang/test/Rewriter/rewrite-modern-struct-ivar.mm index bb6098c268ca..9f56cd8b1b83 100644 --- a/clang/test/Rewriter/rewrite-modern-struct-ivar.mm +++ b/clang/test/Rewriter/rewrite-modern-struct-ivar.mm @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -E %s -o %t.mm // RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %t.mm -o %t-rw.cpp // RUN: FileCheck --input-file=%t-rw.cpp %s -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -Wno-c++11-narrowing -std=c++11 -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -Wno-c++11-narrowing -std=c++11 -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp struct S { int i1; diff --git a/clang/test/Rewriter/rewrite-rewritten-initializer.mm b/clang/test/Rewriter/rewrite-rewritten-initializer.mm index 6277b5c9b147..b73d3e952e13 100644 --- a/clang/test/Rewriter/rewrite-rewritten-initializer.mm +++ b/clang/test/Rewriter/rewrite-rewritten-initializer.mm @@ -1,9 +1,8 @@ // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp -// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw-modern.cpp -// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw-modern.cpp +// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw-modern.cpp // radar 7669784 -// XFAIL: mingw32 typedef void * id; void *sel_registerName(const char *);