================
@@ -817,8 +821,12 @@ static void DiagnoseHLSLRegisterAttribute(Sema &S, 
SourceLocation &ArgLoc,
       S.Diag(TheDecl->getLocation(),
              diag::warn_hlsl_user_defined_type_missing_member)
           << regTypeNum;
-
-    return;
+    // Space argument cannot be specified for global constants
+    if (!isDeclaredWithinCOrTBuffer(TheDecl)) {
----------------
damyanp wrote:

What's the `!isDeclaredWithinCOrTBuffer()` test for?  If I comment that out 
then the tests still pass.

https://github.com/llvm/llvm-project/pull/106782
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to