Skip to content

Commit e74877b

Browse files
[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]
1 parent 5e7ad63 commit e74877b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,7 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
970970

971971
LookupResult R(SemaRef, Ident, SourceLocation(), Sema::LookupOrdinaryName);
972972
if (SemaRef.LookupQualifiedName(R, D->getDeclContext()))
973-
if (auto *SignatureDecl =
974-
dyn_cast<HLSLRootSignatureDecl>(R.getFoundDecl())) {
973+
if (isa<HLSLRootSignatureDecl>(R.getFoundDecl())) {
975974
// Perform validation of constructs here
976975
D->addAttr(::new (getASTContext())
977976
RootSignatureAttr(getASTContext(), AL, Ident));

0 commit comments

Comments
 (0)