Skip to content

Commit 72b8d8a

Browse files
authored
stdlib/Reflection: remove unused nodeKind in visitBoundGenericTypeRef (swiftlang#40975)
This fixes a warning triggered when building stdlib: ``` stdlib/public/Reflection/TypeRef.cpp:548:16: warning: variable 'nodeKind' set but not used [-Wunused-but-set-variable] Node::Kind nodeKind; ^ ```
1 parent 261a9df commit 72b8d8a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

stdlib/public/Reflection/TypeRef.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -545,19 +545,14 @@ class DemanglingForTypeRef
545545

546546
Demangle::NodePointer
547547
visitBoundGenericTypeRef(const BoundGenericTypeRef *BG) {
548-
Node::Kind nodeKind;
549548
Node::Kind genericNodeKind;
550549
if (BG->isStruct()) {
551-
nodeKind = Node::Kind::Structure;
552550
genericNodeKind = Node::Kind::BoundGenericStructure;
553551
} else if (BG->isEnum()) {
554-
nodeKind = Node::Kind::Enum;
555552
genericNodeKind = Node::Kind::BoundGenericEnum;
556553
} else if (BG->isClass()) {
557-
nodeKind = Node::Kind::Class;
558554
genericNodeKind = Node::Kind::BoundGenericClass;
559555
} else {
560-
nodeKind = Node::Kind::OtherNominalType;
561556
genericNodeKind = Node::Kind::BoundGenericOtherNominalType;
562557
}
563558
auto unspecializedType = Dem.demangleType(BG->getMangledName());

0 commit comments

Comments
 (0)