[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-24 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbdf1327fea63: [HLSL] Entry functions require param annotation (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl:1 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s + beanz wrote: > aaron.ballman wrote: > > That's

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl:1 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s + aaron.ballman wrote: > That's not needed,

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM though I had a question about the test's RUN line. Comment at: clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl:1 +// RUN: %clang_cc1 -triple

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454892. beanz added a comment. Updates based on review feedback: - Wraped diagnostic text in td - Added FIXME for return type annotations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131625/new/

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: beanz wrote: > aaron.ballman wrote: > > beanz wrote: > > > aaron.ballman wrote: > > > > Is this intended to be

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: aaron.ballman wrote: > beanz wrote: > > aaron.ballman wrote: > > > Is this intended to be used only for parameters

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454676. beanz added a comment. Updating based on PR feedback from @Aaron.ballman. I changed around the diagnostics so that the error is on the function decl with a note pointing at the parameter declaration. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: beanz wrote: > aaron.ballman wrote: > > Is this intended to be used only for parameters (that's how I read the

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: aaron.ballman wrote: > Is this intended to be used only for parameters (that's how I read the > summary for the

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: Is this intended to be used only for parameters (that's how I read the summary for the patch)? If so, why is

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11875 + for (const auto Param : FD->parameters()) { +if (!Param->hasAttr()) { + Diag(Param->getLocation(), diag::err_hlsl_missing_parameter_annotation) << Param; python3kgae wrote: >

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11875 + for (const auto Param : FD->parameters()) { +if (!Param->hasAttr()) { + Diag(Param->getLocation(), diag::err_hlsl_missing_parameter_annotation) << Param; When param

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: bogner, aaron.ballman, python3kgae, pow2clk, tex3d. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL entry function parameters must have parameter