[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

Chris Bieneman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 18:53:01 PDT 2022


beanz created this revision.
beanz added reviewers: aaron.ballman, rnk, jdoerfert, MaskRay, rsmith.
Herald added a subscriber: StephenFan.
Herald added a project: All.
beanz requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: clang.

HLSL uses Microsoft-style attributes `[attr]`, which clang mostly
ignores. For HLSL we need to handle known Microsoft attributes, and to
maintain C/C++ as-is we ignore unknown attributes.

To utilize this new code path, this change adds the HLSL `numthreads`
attribute.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122627

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Parse/Parser.h
  clang/lib/Parse/ParseDeclCXX.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/test/SemaHLSL/lit.local.cfg
  clang/test/SemaHLSL/num_threads.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122627.418753.patch
Type: text/x-patch
Size: 11208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220329/7bb0cb9f/attachment.bin>


More information about the cfe-commits mailing list