Skip to content

[NFC][HLSL][RootSignature] Patch to remove unused variable #139590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

inbelic
Copy link
Contributor

@inbelic inbelic commented May 12, 2025

  • SignatureDecl is currently unused as validation is not yet implemented
  • this patch cleans-up the unused variable from when it was used during implementation

- SignatureDecl is currently unused as validation is not yet implemented
- this patch cleans-up the unused variable from when it was used during
implementation
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" HLSL HLSL Language Support labels May 12, 2025
@llvmbot
Copy link
Member

llvmbot commented May 12, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-hlsl

Author: Finn Plummer (inbelic)

Changes
  • SignatureDecl is currently unused as validation is not yet implemented
  • this patch cleans-up the unused variable from when it was used during implementation

Full diff: https://github.com/llvm/llvm-project/pull/139590.diff

1 Files Affected:

  • (modified) clang/lib/Sema/SemaHLSL.cpp (+1-2)
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index e295114d7617b..744ec439b2393 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -970,8 +970,7 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
 
   LookupResult R(SemaRef, Ident, SourceLocation(), Sema::LookupOrdinaryName);
   if (SemaRef.LookupQualifiedName(R, D->getDeclContext()))
-    if (auto *SignatureDecl =
-            dyn_cast<HLSLRootSignatureDecl>(R.getFoundDecl())) {
+    if (isa<HLSLRootSignatureDecl>(R.getFoundDecl())) {
       // Perform validation of constructs here
       D->addAttr(::new (getASTContext())
                      RootSignatureAttr(getASTContext(), AL, Ident));

@inbelic
Copy link
Contributor Author

inbelic commented May 12, 2025

e74877b beat me to it

@inbelic inbelic closed this May 12, 2025
@inbelic inbelic deleted the inbelic/rs-patch-use-sig-decl branch May 12, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category HLSL HLSL Language Support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants