[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 21 15:27:41 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'}}
----------------
llvm-beanz wrote:
I don't think it is super useful to test name lookup (because that's not really something you changed). It is probably fine to have one test here verifying that these aren't getting included, but let's not add more of them as they'll just slow down testing without adding meaningful coverage.
https://github.com/llvm/llvm-project/pull/134034
More information about the cfe-commits
mailing list