// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -verify %s
// Check that we emit the correct warnings in various situations where the C++11
// spelling of the `address_space` attribute is applied to a declaration instead
// of a type. Also check that the attribute can instead be applied to the type.
void
int* ; // expected-warning {{applying attribute 'address_space' to a declaration is deprecated; apply it to the type instead}}
int * ;
int global1; // expected-warning {{applying attribute 'address_space' to a declaration is deprecated; apply it to the type instead}}
int global2 ; // expected-warning {{applying attribute 'address_space' to a declaration is deprecated; apply it to the type instead}}
int global3;
int global4;
;
T var_template_1; // expected-warning {{applying attribute 'address_space' to a declaration is deprecated; apply it to the type instead}}
T var_template_2;
using void_ptr = void *; // expected-warning {{applying attribute 'address_space' to a declaration is deprecated; apply it to the type instead}}
// Intentionally using the same alias name to check that the aliases define the
// same type.
using void_ptr = void *;
using namespace N; // expected-error {{'address_space' attribute cannot be applied to a declaration}}