diff options
| author | Erich Keane <erich.keane@intel.com> | 2017-02-28 20:44:39 +0000 |
|---|---|---|
| committer | Erich Keane <erich.keane@intel.com> | 2017-02-28 20:44:39 +0000 |
| commit | 2fe684bb1478ef89efd8122e442ec76efaf5f857 (patch) | |
| tree | 6ea9d1a0ddbbff7504694a42228813b530c965e9 /clang/test/CodeGen/transparent-union.c | |
| parent | 318971880e76eb8922351451a25099be2856975d (diff) | |
| download | bcm5719-llvm-2fe684bb1478ef89efd8122e442ec76efaf5f857.tar.gz bcm5719-llvm-2fe684bb1478ef89efd8122e442ec76efaf5f857.zip | |
Allow attributes before union definition
permits typedef union __attribute__((transparent_union)) {...}
Differential Revision: https://reviews.llvm.org/D28266
llvm-svn: 296518
Diffstat (limited to 'clang/test/CodeGen/transparent-union.c')
| -rw-r--r-- | clang/test/CodeGen/transparent-union.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/transparent-union.c b/clang/test/CodeGen/transparent-union.c index 2f00c2d21a0..efaef1bae98 100644 --- a/clang/test/CodeGen/transparent-union.c +++ b/clang/test/CodeGen/transparent-union.c @@ -3,10 +3,21 @@ // RUN: %clang_cc1 -Werror -triple armv7-linux -emit-llvm -o - %s | FileCheck %s --check-prefix=ARM // RUN: %clang_cc1 -Werror -triple powerpc64le-linux -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -Werror -triple aarch64-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -DINFRONT -Werror -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -DINFRONT -Werror -triple i386-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -DINFRONT -Werror -triple armv7-linux -emit-llvm -o - %s | FileCheck %s --check-prefix=ARM +// RUN: %clang_cc1 -DINFRONT -Werror -triple powerpc64le-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -DINFRONT -Werror -triple aarch64-linux -emit-llvm -o - %s | FileCheck %s +#ifdef INFRONT +typedef union __attribute__((transparent_union)) { + void *f0; +} transp_t0; +#else typedef union { void *f0; } transp_t0 __attribute__((transparent_union)); +#endif void f0(transp_t0 obj); |

