-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[Clang] Allow parsing arbitrary order of attributes for declarations #133107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
c46eda6
517ba9e
2b06658
04415ee
7388c93
4d0a4f0
e517ff6
ebd962d
453f5b2
c5bc577
5c8ec3c
a693469
0223b3e
121b800
d0df126
4922d9e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ int templateFunction(T value) __attribute__((annotate("works"))); | |
|
|
||
| // CHECK: ClassDecl=Test:3:7 (Definition) Extent=[3:1 - 17:2] | ||
| // CHECK-NEXT: CXXAccessSpecifier=:4:1 (Definition) Extent=[4:1 - 4:8] | ||
| // CHECK-NEXT: CXXMethod=aMethod:5:51 Extent=[5:3 - 5:60] | ||
| // CHECK-NEXT: CXXMethod=aMethod:5:51 Extent=[5:46 - 5:60] | ||
|
||
| // CHECK-NEXT: attribute(annotate)=spiffy_method Extent=[5:18 - 5:43] | ||
| // CHECK-NEXT: CXXAccessSpecifier=:7:1 (Definition) Extent=[7:1 - 7:43] | ||
| // CHECK-NEXT: attribute(annotate)=works Extent=[7:23 - 7:40] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Verify that we can parse a simple CUDA file with different attributes order. | ||
| // RUN: %clang_cc1 "-triple" "nvptx-nvidia-cuda" -fsyntax-only -verify %s | ||
| // expected-no-diagnostics | ||
| #include "Inputs/cuda.h" | ||
|
|
||
| struct alignas(16) float4 { | ||
| float x, y, z, w; | ||
| }; | ||
|
|
||
| __attribute__((device)) float func() { | ||
| __shared__ alignas(alignof(float4)) float As[4][4]; // Both combinations | ||
| alignas(alignof(float4)) __shared__ float Bs[4][4]; // must be legal | ||
|
|
||
| return As[0][0] + Bs[0][0]; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.