[cfe-commits] r155569 - /cfe/trunk/test/Rewriter/rewrite-modern-block.mm
Fariborz Jahanian
fjahanian at apple.com
Wed Apr 25 11:11:58 PDT 2012
Author: fjahanian
Date: Wed Apr 25 13:11:57 2012
New Revision: 155569
URL: http://llvm.org/viewvc/llvm-project?rev=155569&view=rev
Log:
improve a modern objc translator test.
Modified:
cfe/trunk/test/Rewriter/rewrite-modern-block.mm
Modified: cfe/trunk/test/Rewriter/rewrite-modern-block.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-block.mm?rev=155569&r1=155568&r2=155569&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-block.mm (original)
+++ cfe/trunk/test/Rewriter/rewrite-modern-block.mm Wed Apr 25 13:11:57 2012
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
-// RUN: %clang_cc1 -fsyntax-only -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*" -D"__declspec(X)=" %t-rw.cpp
// rdar://11230308
typedef struct {
@@ -20,11 +20,12 @@
// rdar://11236342
int foo() {
__block int hello;
+ return hello;
}
// rdar://7547630
// rewriting multiple __block decls on wintin same decl stmt.
-int radar7547630() {
+void radar7547630() {
__block int BI1, BI2;
__block float FLOAT1, FT2, FFFFFFFF3,
@@ -35,11 +36,13 @@
// rewriting multiple __block decls on wintin same decl stmt
// with initializers.
-void rdar7547630(const char *keybuf, const char *valuebuf) {
+int rdar7547630(const char *keybuf, const char *valuebuf) {
__block int BI1 = 1, BI2 = 2;
double __block BYREFVAR = 1.34, BYREFVAR_NO_INIT, BYREFVAR2 = 1.37;
__block const char *keys = keybuf, *values = valuebuf, *novalues;
+
+ return BI2;
}
More information about the cfe-commits
mailing list