[clang] [HLSL] Implement output parameter (PR #101083)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 15:34:49 PDT 2024
================
@@ -8511,7 +8514,7 @@ static void HandleHLSLParamModifierAttr(QualType &CurType,
return;
if (Attr.getSemanticSpelling() == HLSLParamModifierAttr::Keyword_inout ||
Attr.getSemanticSpelling() == HLSLParamModifierAttr::Keyword_out)
- CurType = S.getASTContext().getLValueReferenceType(CurType);
+ CurType = S.HLSL().getInoutParameterType(CurType);
----------------
llvm-beanz wrote:
HLSL doesn't allow references or pointers (at least not explicitly). We generate references in the AST in a few places, but any attempt to write or type-deduce one results in an error in Sema.
In theory, any legal type in HLSL can be converted to an inout parameter type.
https://github.com/llvm/llvm-project/pull/101083
More information about the cfe-commits
mailing list