[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

Cassandra Beckley via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 16:38:47 PDT 2025


================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.0-compute %s \
+// RUN:   -fsyntax-only -verify
+
+typedef vk::SpirvType<12, 2, 4, float> InvalidType1;  // expected-error {{use of undeclared identifier 'vk'}}
+vk::Literal<nullptr> Unused;                          // expected-error {{use of undeclared identifier 'vk'}}
+vk::integral_constant<uint, 456> Unused2;             // expected-error {{use of undeclared identifier 'vk'}}
+typedef vk::SpirvOpaqueType<12, float> InvalidType2;  // expected-error {{use of undeclared identifier 'vk'}}
----------------
cassiebeckley wrote:

Yeah, makes sense. Done.

https://github.com/llvm/llvm-project/pull/134034


More information about the cfe-commits mailing list