[Gardening] Fix some set but not used variables

This commit is contained in:
Anthony Latsis
2025-01-19 23:11:51 +00:00
parent 71015c674b
commit a84dfc8387
89 changed files with 169 additions and 181 deletions

View File

@@ -4062,7 +4062,7 @@ public:
auto *SA = cast<SpecializeAttr>(A);
if (!SA->isExported())
continue;
if (auto *targetFunctionDecl = SA->getTargetFunctionDecl(afd)) {
if (SA->getTargetFunctionDecl(afd)) {
if (!hasNoted)
exportedPrespecializationDecls.push_back(S.addDeclRef(afd));
hasNoted = true;
@@ -5211,7 +5211,7 @@ public:
static bool canSkipWhenInvalid(const Decl *D) {
// There's no point writing out the deinit when its context is not a class
// as nothing would be able to reference it
if (auto *deinit = dyn_cast<DestructorDecl>(D)) {
if (isa<DestructorDecl>(D)) {
if (!isa<ClassDecl>(D->getDeclContext()))
return true;
}