Author: Kazu Hirata
Date: 2025-05-12T10:16:00-07:00
New Revision: e74877bafebeff40f7213c199c8125bb49818fc1

URL: 
https://github.com/llvm/llvm-project/commit/e74877bafebeff40f7213c199c8125bb49818fc1
DIFF: 
https://github.com/llvm/llvm-project/commit/e74877bafebeff40f7213c199c8125bb49818fc1.diff

LOG: [Sema] Fix a warning

This patch fixes:

  clang/lib/Sema/SemaHLSL.cpp:973:15: error: variable 'SignatureDecl'
  set but not used [-Werror,-Wunused-but-set-variable]

Added: 
    

Modified: 
    clang/lib/Sema/SemaHLSL.cpp

Removed: 
    


################################################################################
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));


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to