[all-commits] [llvm/llvm-project] 94189b: [HLSL] Fix MSFT Attribute parsing, add numthreads

Chris B via All-commits all-commits at lists.llvm.org
Tue Mar 29 15:17:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94189b42cc51b5fa8355957a976f0d8b4f8c312b
      https://github.com/llvm/llvm-project/commit/94189b42cc51b5fa8355957a976f0d8b4f8c312b
  Author: Chris Bieneman <chris.bieneman at me.com>
  Date:   2022-03-29 (Tue, 29 Mar 2022)

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

  Log Message:
  -----------
  [HLSL] Fix MSFT Attribute parsing, add numthreads

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.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D122627




More information about the All-commits mailing list