[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
================
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD,
}
return HasNoTypeMember;
}
+
+ case BTK__hlsl_spirv_type: {
+ assert(Converted.size() == 4);
+
+ if (!Context.getTargetInfo().getTriple().isSPIRV()) {
+ SemaRef.Diag(TemplateLoc, diag::err_hlsl_spirv_only)
+ << "__hlsl_spirv_type";
----------------
llvm-beanz wrote:
Can this instead be?
```suggestion
<< BTD;
```
If not, we should put this string into the error message directly. We tend to avoid hard coded strings as inputs to diagnostics.
https://github.com/llvm/llvm-project/pull/134034
More information about the cfe-commits
mailing list