annotate clang/test/Sema/gnu-attributes.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2 // expected-no-diagnostics
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 struct s {};
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // FIXME: should warn that declaration attribute in type position is
anatofuz
parents:
diff changeset
7 // being applied to the declaration instead?
anatofuz
parents:
diff changeset
8 struct s __attribute__((used)) foo;
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 // FIXME: Should warn that type attribute in declaration position is
anatofuz
parents:
diff changeset
11 // being applied to the type instead?
anatofuz
parents:
diff changeset
12 struct s *bar __attribute__((address_space(1)));
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 // Should not warn because type attribute is in type position.
anatofuz
parents:
diff changeset
15 struct s *__attribute__((address_space(1))) baz;
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 // Should not warn because declaration attribute is in declaration position.
anatofuz
parents:
diff changeset
18 struct s *quux __attribute__((used));