aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CIR/CodeGen/CIRGenModule.cpp
diff options
context:
space:
mode:
authorAmr Hesham <amr96@programmer.net>2025-06-26 18:32:38 +0200
committerGitHub <noreply@github.com>2025-06-26 18:32:38 +0200
commit720d7e09b322f017f7c089f87ddc3ed077df619c (patch)
tree3297d2e32beb5888f6366f31dc916a9a2f4d45ec /clang/lib/CIR/CodeGen/CIRGenModule.cpp
parent69bbf2135e7dcd685acf6111e148e620cfe10280 (diff)
downloadllvm-720d7e09b322f017f7c089f87ddc3ed077df619c.zip
llvm-720d7e09b322f017f7c089f87ddc3ed077df619c.tar.gz
llvm-720d7e09b322f017f7c089f87ddc3ed077df619c.tar.bz2
[CIR][NFC] Fix an unused variable warning (#145922)
This fixes a warning where a variable assigned in 'if' statement wasn't referenced again.
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenModule.cpp')
-rw-r--r--clang/lib/CIR/CodeGen/CIRGenModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
index f24bee4..44ec99b 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
@@ -427,9 +427,9 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd,
setNonAliasAttributes(gd, funcOp);
assert(!cir::MissingFeatures::opFuncAttributesForDefinition());
- if (const ConstructorAttr *ca = funcDecl->getAttr<ConstructorAttr>())
+ if (funcDecl->getAttr<ConstructorAttr>())
errorNYI(funcDecl->getSourceRange(), "constructor attribute");
- if (const DestructorAttr *da = funcDecl->getAttr<DestructorAttr>())
+ if (funcDecl->getAttr<DestructorAttr>())
errorNYI(funcDecl->getSourceRange(), "destructor attribute");
if (funcDecl->getAttr<AnnotateAttr>())
@@ -1055,7 +1055,7 @@ cir::GlobalLinkageKind CIRGenModule::getFunctionLinkage(GlobalDecl gd) {
GVALinkage linkage = astContext.GetGVALinkageForFunction(fd);
- if (const auto *dtor = dyn_cast<CXXDestructorDecl>(fd))
+ if (isa<CXXDestructorDecl>(fd))
errorNYI(fd->getSourceRange(), "getFunctionLinkage: CXXDestructorDecl");
return getCIRLinkageForDeclarator(fd, linkage, /*IsConstantVariable=*/false);