diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-08-31 01:11:41 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-08-31 01:11:41 +0000 |
commit | 00e99966c4574b084b5211924f97547930995a15 (patch) | |
tree | f1f7d42931d95af9208e0058d6f0c5e0ed3449d9 /clang/test/Sema/attr-endian.c | |
parent | fb4b433bbb3f66b041585e8e7eee8ecd97a354db (diff) | |
download | bcm5719-llvm-00e99966c4574b084b5211924f97547930995a15.tar.gz bcm5719-llvm-00e99966c4574b084b5211924f97547930995a15.zip |
Consolidating the notion of a GNU attribute parameter with the attribute argument list.
llvm-svn: 189711
Diffstat (limited to 'clang/test/Sema/attr-endian.c')
-rw-r--r-- | clang/test/Sema/attr-endian.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-endian.c b/clang/test/Sema/attr-endian.c new file mode 100644 index 00000000000..09442400a55 --- /dev/null +++ b/clang/test/Sema/attr-endian.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only + +int p1 __attribute__((endian(host))); +int p2 __attribute__((endian(device))); + +int p3 __attribute__((endian)); // expected-error {{'endian' attribute requires parameter 1 to be an identifier}} +int p4 __attribute__((endian("host"))); // expected-error {{'endian' attribute requires parameter 1 to be an identifier}} +int p5 __attribute__((endian(host, 15))); // expected-error {{'endian' attribute takes one argument}} +int p6 __attribute__((endian(strange))); // expected-warning {{unknown endian 'strange'}} + +void func(void) __attribute__((endian(host))); // expected-warning {{'endian' attribute only applies to variables}} |