1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | // expected-no-diagnostics |
3 | |
4 | struct s {}; |
5 | |
6 | // FIXME: should warn that declaration attribute in type position is |
7 | // being applied to the declaration instead? |
8 | struct s __attribute__((used)) foo; |
9 | |
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))); |
13 | |
14 | // Should not warn because type attribute is in type position. |
15 | struct s *__attribute__((address_space(1))) baz; |
16 | |
17 | // Should not warn because declaration attribute is in declaration position. |
18 | struct s *quux __attribute__((used)); |
19 | |