summaryrefslogtreecommitdiffstats
path: root/test/Sema/types.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-07 18:40:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-07 18:40:27 +0000
commit682eae243ae3d96fe3dc302091034e08c414db10 (patch)
tree722b610b9b0d0ee3f49c052f318858071bdf8ad3 /test/Sema/types.c
parent163b151809beef8f917fd16c546016e83ae3e361 (diff)
Hack in a workaround for PR11082 until we have a proper fix. This
un-breaks every glib-dependent compile with Clang. I'm not sure this is even the best workaround, so suggestions welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/types.c')
-rw-r--r--test/Sema/types.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/types.c b/test/Sema/types.c
index 33305abe02..332b525e33 100644
--- a/test/Sema/types.c
+++ b/test/Sema/types.c
@@ -41,3 +41,12 @@ int __attribute__ ((vector_size (8), vector_size (8))) v; // expected-error {{i
void test(int i) {
char c = (char __attribute__((align(8)))) i; // expected-error {{'align' attribute ignored when parsing type}}
}
+
+// http://llvm.org/PR11082
+//
+// FIXME: This may or may not be the correct approach (no warning or error),
+// but large amounts of Linux and FreeBSD code need this attribute to not be
+// a hard error in order to work correctly.
+void test2(int i) {
+ char c = (char __attribute__((may_alias))) i;
+}