[HLSL] Further improve to numthreads diagnostics
authorChris Bieneman <chris.bieneman@me.com>
Thu, 31 Mar 2022 14:38:47 +0000 (09:38 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Thu, 31 Mar 2022 16:34:01 +0000 (11:34 -0500)
commit19054163e11a6632b4973c936e5aa93ec742c866
tree09a034ebb778ac0d7752295a0a0a6ea415c6679a
parent898d5776ec3ab8a35047e735c9c9059a4d189759
[HLSL] Further improve to numthreads diagnostics

This adds diagnostics for conflicting attributes on the same
declarataion, conflicting attributes on a forward and final
declaration, and defines a more narrowly scoped HLSLEntry attribute
target.

Big shout out to @aaron.ballman for the great feedback and review on
this!
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/SemaHLSL/num_threads.hlsl