[PATCH] D131625: [HLSL] Entry functions require param annotation
Chris Bieneman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 19:25:58 PDT 2022
beanz added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:11875
+ for (const auto Param : FD->parameters()) {
+ if (!Param->hasAttr<HLSLAnnotationAttr>()) {
+ Diag(Param->getLocation(), diag::err_hlsl_missing_parameter_annotation) << Param;
----------------
python3kgae wrote:
> When param type is struct, it is OK not to have HLSL semantic as long as all fields in the struct have HLSL semantic.
My intent was to handle structs in a subsequent patch. Since we only have one semantic implemented right now we can't make a valid test for structs unless it is a single element struct which is not a robust test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131625/new/
https://reviews.llvm.org/D131625
More information about the cfe-commits
mailing list