[clang] [HLSL] Support packoffset attribute in AST (PR #89836)
Xiang Li via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 09:42:33 PDT 2024
================
@@ -7314,6 +7314,41 @@ static void handleHLSLSV_DispatchThreadIDAttr(Sema &S, Decl *D,
D->addAttr(::new (S.Context) HLSLSV_DispatchThreadIDAttr(S.Context, AL));
}
+static void handleHLSLPackOffsetAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ if (!isa<VarDecl>(D) || !isa<HLSLBufferDecl>(D->getDeclContext())) {
+ S.Diag(AL.getLoc(), diag::err_hlsl_attr_invalid_ast_node)
+ << AL << "cbuffer constant";
----------------
python3kgae wrote:
Updated.
https://github.com/llvm/llvm-project/pull/89836
More information about the cfe-commits
mailing list