Nathan =?utf-8?q?Gauër?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -1010,14 +1010,26 @@ void SemaHLSL::diagnoseSemanticStageMismatch(
if (Case.Stage != Stage)
continue;
- if (IsInput && Case.Direction & IOType::In)
+ if (IsInput && Case.AllowedIOTypesMask & IOType::In)
return;
- if (!IsInput && Case.Direction & IOType::Out)
+ if (!IsInput && Case.AllowedIOTypesMask & IOType::Out)
return;
- Diag(A->getLoc(), diag::err_hlsl_semantic_unsupported_direction_for_stage)
+ SmallVector<std::string, 8> ValidCases;
+ llvm::transform(
+ Allowed, std::back_inserter(ValidCases), [](SemanticStageInfo Case) {
+ std::string Type =
+ Case.AllowedIOTypesMask == IOType::InOut
+ ? " inout"
----------------
s-perron wrote:
`inout` is a keyword in HLSL, and the message might come across as the
parameter has to be `inout` (both an input and an output), not that it can be
an input or an output.
https://github.com/llvm/llvm-project/pull/168743
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits