summaryrefslogtreecommitdiffstats
path: root/test/Sema/address_spaces.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerdim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commit39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/Sema/address_spaces.c
parent69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff)
downloadFreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip
FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/Sema/address_spaces.c')
-rw-r--r--test/Sema/address_spaces.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Sema/address_spaces.c b/test/Sema/address_spaces.c
index 23c1405..a53bb4d 100644
--- a/test/Sema/address_spaces.c
+++ b/test/Sema/address_spaces.c
@@ -36,7 +36,11 @@ struct _st {
// rdar://6774906
__attribute__((address_space(256))) void * * const base = 0;
void * get_0(void) {
- return base[0]; // expected-error {{illegal implicit conversion between two pointers with different address spaces}} \
- expected-warning {{returning 'void __attribute__((address_space(256))) *' from a function with result type 'void *' discards qualifiers}}
+ return base[0]; // expected-error {{returning '__attribute__((address_space(256))) void *' from a function with result type 'void *' changes address space of pointer}}
}
+__attribute__((address_space(1))) char test3_array[10];
+void test3(void) {
+ extern void test3_helper(char *p); // expected-note {{passing argument to parameter 'p' here}}
+ test3_helper(test3_array); // expected-error {{changes address space of pointer}}
+}
OpenPOWER on IntegriCloud