[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Sema / gnu-attributes.c
blob653fae826a74a9e72c8af1599c8bf3c6373c60ff
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 struct s {};
6 // FIXME: should warn that declaration attribute in type position is
7 // being applied to the declaration instead?
8 struct s __attribute__((used)) foo;
10 // FIXME: Should warn that type attribute in declaration position is
11 // being applied to the type instead?
12 struct s *bar __attribute__((address_space(1)));
14 // Should not warn because type attribute is in type position.
15 struct s *__attribute__((address_space(1))) baz;
17 // Should not warn because declaration attribute is in declaration position.
18 struct s *quux __attribute__((used));