================
@@ -973,6 +1076,8 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const 
ParsedAttr &AL) {
     if (auto *SignatureDecl =
             dyn_cast<HLSLRootSignatureDecl>(R.getFoundDecl())) {
       // Perform validation of constructs here
+      if (handleRootSignatureDecl(SignatureDecl, AL.getLoc()))
+        return;
----------------
inbelic wrote:

I would like feedback here.

This will actually be invoked for each unique `RootSignatureAttr` and not for 
each unique `RootSignatureDecl`. So if multiple `RootSignatureAttr`s reference 
the same decl then it will be run redundant times.

Is there a sema "pass" of sorts that will just run on the AST declarations? 
This would probably be better hooked in there.

Otherwise, we could implement a simple set of Decl * to track which ones have 
already be validated?

https://github.com/llvm/llvm-project/pull/140962
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to