summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-mode.c
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2016-01-19 22:54:26 +0000
committerAaron Ballman <aaron@aaronballman.com>2016-01-19 22:54:26 +0000
commit6c8848abe6931015306f53714deffb7fa7c1fbe8 (patch)
tree92950f58c413d369d6066fa0ef28c85dbdd734f8 /clang/test/Sema/attr-mode.c
parent13fe2a9517e93ae10cca848b5ebf87a1de17bffb (diff)
downloadbcm5719-llvm-6c8848abe6931015306f53714deffb7fa7c1fbe8.tar.gz
bcm5719-llvm-6c8848abe6931015306f53714deffb7fa7c1fbe8.zip
Allow __attribute__((mode)) to appertain to field declarations again. Corrects compile issues with LibreOffice.
Patch by Stephan Bergmann llvm-svn: 258213
Diffstat (limited to 'clang/test/Sema/attr-mode.c')
-rw-r--r--clang/test/Sema/attr-mode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/Sema/attr-mode.c b/clang/test/Sema/attr-mode.c
index 77bd2f737a4..179b1819b1f 100644
--- a/clang/test/Sema/attr-mode.c
+++ b/clang/test/Sema/attr-mode.c
@@ -24,8 +24,8 @@ typedef unsigned unwind_word __attribute((mode(unwind_word)));
int **__attribute((mode(QI)))* i32; // expected-error{{mode attribute}}
-__attribute__((mode(QI))) int invalid_func() { return 1; } // expected-error{{'mode' attribute only applies to variables and typedefs}}
-enum invalid_enum { A1 __attribute__((mode(QI))) }; // expected-error{{'mode' attribute only applies to variables and typedefs}}
+__attribute__((mode(QI))) int invalid_func() { return 1; } // expected-error{{'mode' attribute only applies to variables, fields and typedefs}}
+enum invalid_enum { A1 __attribute__((mode(QI))) }; // expected-error{{'mode' attribute only applies to variables, fields and typedefs}}
typedef _Complex double c32 __attribute((mode(SC)));
int c32_test[sizeof(c32) == 8 ? 1 : -1];
@@ -76,3 +76,7 @@ void test_TCtype(c128ibm *a) { f_ft128_complex_arg (a); }
#else
#error Unknown test architecture.
#endif
+
+struct S {
+ int n __attribute((mode(HI)));
+};
OpenPOWER on IntegriCloud