[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 05:12:13 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/test/SemaHLSL/num_threads.hlsl:48
+#endif
+
+
----------------
There are a few test cases that are missing here:

1) Writing the attribute on the wrong subject.
2) Passing no args to the attribute, passing too many args to the attribute.
3) Function merging where the redeclaration has attributes that don't match. e.g.,
```
[numthreads(1, 2, 3)] void func();
[numthreads(4, 5, 6)] void func() {}
```
4) Should the user be able to pick the values via NTTP or other constant expressions? e.g.,
```
template <int X, int Y, int Z>
[numthreads(X, Y, Z)] void func();

constexpr int foo();
[numthreads(foo(), 2, 3)] void other_func();
```
5) Can you write this attribute on a member function? Can the member function be virtual?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122627/new/

https://reviews.llvm.org/D122627



More information about the cfe-commits mailing list