summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/block-return.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-05 00:04:01 +0000
committerChris Lattner <sabre@nondot.org>2010-09-05 00:04:01 +0000
commit53fa04909cd51ee3cbcf09ad4f8dcb9b03d3f199 (patch)
tree923b389404e28498cf67e0cb89078ebae7d08b78 /clang/test/Sema/block-return.c
parent959cf8aede1755fb7df3aafd7dff9fa9ce172f8f (diff)
downloadbcm5719-llvm-53fa04909cd51ee3cbcf09ad4f8dcb9b03d3f199.tar.gz
bcm5719-llvm-53fa04909cd51ee3cbcf09ad4f8dcb9b03d3f199.zip
make clang print types as "const int *" instead of "int const*",
which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
Diffstat (limited to 'clang/test/Sema/block-return.c')
-rw-r--r--clang/test/Sema/block-return.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c
index 5a4ec010d3a..c6fcbe78eed 100644
--- a/clang/test/Sema/block-return.c
+++ b/clang/test/Sema/block-return.c
@@ -78,10 +78,10 @@ static int funk(char *s) {
}
void next();
void foo4() {
- int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(char const *)' with an expression of type 'int (^)(char *)'}}
- int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (*)(char const *)' with an expression of type 'int (char *)'}}
+ int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(const char *)' with an expression of type 'int (^)(char *)'}}
+ int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (*)(const char *)' with an expression of type 'int (char *)'}}
- int (^nested)(char *s) = ^(char *str) { void (^nest)(void) = ^(void) { printf("%s\n", str); }; next(); return 1; }; // expected-warning{{implicitly declaring C library function 'printf' with type 'int (char const *, ...)'}} \
+ int (^nested)(char *s) = ^(char *str) { void (^nest)(void) = ^(void) { printf("%s\n", str); }; next(); return 1; }; // expected-warning{{implicitly declaring C library function 'printf' with type 'int (const char *, ...)'}} \
// expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
}
@@ -109,7 +109,7 @@ void foo6() {
void foo7()
{
- const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'int const (^)(void)' with an expression of type 'int (^)(void)'}}
+ const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'const int (^)(void)' with an expression of type 'int (^)(void)'}}
const int (^CC) (void) = ^const int{ const int i = 1; return i; };
OpenPOWER on IntegriCloud