Skip to content

Conversation

@spall
Copy link
Collaborator

@spall spall commented Dec 18, 2025

Implements support for groupshared argument attribute.
Closes #7969

spall added 4 commits December 3, 2025 16:37
get compiler to error when types aren't exactly the same + arg not groupshared

bug fix

fix test

disallow groupshared param in export/noinline funcs

first check if there are attrs

remove accidental change

tests
@github-actions
Copy link
Contributor

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 60a1c8568b405bbe9f47ab0431f627ef64988cc4 fdca3fc4d90e4fabe4425082cadacba53ea38a05 -- lib/HLSL/HLLegalizeParameter.cpp tools/clang/include/clang/AST/Decl.h tools/clang/lib/AST/HlslTypes.cpp tools/clang/lib/AST/MicrosoftMangle.cpp tools/clang/lib/CodeGen/CGHLSLMS.cpp tools/clang/lib/Sema/SemaDeclAttr.cpp tools/clang/lib/Sema/SemaHLSL.cpp tools/clang/lib/Sema/SemaOverload.cpp
View the diff from clang-format here.
diff --git a/tools/clang/lib/Sema/SemaHLSL.cpp b/tools/clang/lib/Sema/SemaHLSL.cpp
index bb00635c..a7aa5b59 100644
--- a/tools/clang/lib/Sema/SemaHLSL.cpp
+++ b/tools/clang/lib/Sema/SemaHLSL.cpp
@@ -14485,7 +14485,9 @@ void Sema::DiagnoseHLSLDeclAttr(const Decl *D, const Attr *A) {
           switch (A->getKind()) {
           case clang::attr::HLSLGroupShared: { // todo improve this error msg
             Diag(A->getLocation(), diag::err_hlsl_varmodifiersna)
-                << "groupshared" << "export/noinline" << "parameter";
+                << "groupshared"
+                << "export/noinline"
+                << "parameter";
             return;
             break;
           }
  • Check this box to apply formatting changes to this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Implement support for groupshared arguments in 202x

1 participant