mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Gardening] Fix some set but not used variables
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user