Add an error for function parameters that have a qualified address space since this is not allowed by the embedded c extension spec.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83165 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/address_spaces.c b/test/Sema/address_spaces.c
index 616f3fc..d9d23ed 100644
--- a/test/Sema/address_spaces.c
+++ b/test/Sema/address_spaces.c
@@ -4,7 +4,11 @@
 #define _AS2 __attribute__((address_space(2)))
 #define _AS3 __attribute__((address_space(3)))
 
-void foo(_AS3 float *a) {
+void bar(_AS2 int a); // expected-error {{parameter may not be qualified with an address space}}
+
+void foo(_AS3 float *a, 
+         _AS1 float b) // expected-error {{parameter may not be qualified with an address space}}
+{
   _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}}
   _AS1 float * _AS2 *B;
 
@@ -21,7 +25,7 @@
   // chosen specifically to overflow 32 bits and come out reasonable
   __attribute__((address_space(4294967500))) int *_boundsD; // expected-error {{address space is larger than the maximum supported}}
 
-  *a = 5.0f;
+  *a = 5.0f + b;
 }
 
 struct _st {