[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 07:12:41 PDT 2025
================
@@ -949,6 +950,23 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr *RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1) {
+ Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1;
+ return;
+ }
+
----------------
llvm-beanz wrote:
We should only allow the attribute to appear more than once if it is the same root signature. Mismatching root signature attributes should be an error (err_disallowed_duplicate_attribute), and duplicate but identical attributes a warning (warn_duplicate_attribute_exact).
https://github.com/llvm/llvm-project/pull/137690
More information about the cfe-commits
mailing list