diff options
author | Emilio Cobos Alvarez <emilio@crisal.io> | 2019-03-13 16:16:54 +0000 |
---|---|---|
committer | Emilio Cobos Alvarez <emilio@crisal.io> | 2019-03-13 16:16:54 +0000 |
commit | cd74127d28c1dc78be18cea55e6a7c65ef382c88 (patch) | |
tree | bb3a59fe5a2c0deb2c7051f565b4d8e9245a86d4 /clang/test/Index/attributes.c | |
parent | 7d546aba6c4d6e9e82885510c16a92c0185a731c (diff) | |
download | bcm5719-llvm-cd74127d28c1dc78be18cea55e6a7c65ef382c88.tar.gz bcm5719-llvm-cd74127d28c1dc78be18cea55e6a7c65ef382c88.zip |
[libclang] Expose aligned() attribute.
Summary:
This is useful because otherwise there's no easy way to distinguish #pragma
packed(N) from attribute(packed, aligned(N)) that isn't looking at field
offsets (since pragma packed() also creates a packed attribute).
Reviewers: Anastasia, arphaman, serge-sans-paille
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59299
llvm-svn: 356062
Diffstat (limited to 'clang/test/Index/attributes.c')
-rw-r--r-- | clang/test/Index/attributes.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Index/attributes.c b/clang/test/Index/attributes.c index 1db3be9bcbb..a5d10a18359 100644 --- a/clang/test/Index/attributes.c +++ b/clang/test/Index/attributes.c @@ -20,6 +20,14 @@ struct __attribute__((warn_unused)) WarnUnused { int b; }; +struct __attribute__((aligned(64))) Aligned1 { + int c; +}; + +struct Aligned2 { + int c; +} __attribute__((aligned(64))); + // CHECK: attributes.c:3:32: StructDecl=Test2:3:32 (Definition) Extent=[3:1 - 5:2] // CHECK: attributes.c:3:23: attribute(packed)=packed Extent=[3:23 - 3:29] // CHECK: attributes.c:4:8: FieldDecl=a:4:8 (Definition) Extent=[4:3 - 4:9] [access=public] @@ -39,3 +47,7 @@ struct __attribute__((warn_unused)) WarnUnused { // CHECK: attributes.c:17:44: attribute(warn_unused_result)= Extent=[17:44 - 17:62] // CHECK: attributes.c:19:37: StructDecl=WarnUnused:19:37 (Definition) Extent=[19:1 - 21:2] // CHECK: attributes.c:19:23: attribute(warn_unused)= Extent=[19:23 - 19:34] +// CHECK: attributes.c:23:37: StructDecl=Aligned1:23:37 (Definition) Extent=[23:1 - 25:2] +// CHECK: attributes.c:23:23: attribute(aligned)= Extent=[23:23 - 23:34] +// CHECK: attributes.c:27:8: StructDecl=Aligned2:27:8 (Definition) Extent=[27:1 - 29:2] +// CHECK: attributes.c:29:18: attribute(aligned)= Extent=[29:18 - 29:29] |