Skip to content

Commit 7217bc0

Browse files
committed
AST: Fix an unused variable warning in Decl.cpp.
1 parent c2343ee commit 7217bc0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/AST/Decl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6671,10 +6671,9 @@ bool EnumDecl::hasOnlyCasesWithoutAssociatedValues() const {
66716671
bool hasAssociatedValues = false;
66726672

66736673
for (auto elt : getAllElements()) {
6674-
for (auto Attr : elt->getSemanticAvailableAttrs()) {
6675-
// FIXME: [availability] Deprecation doesn't make an element unavailable
6674+
// FIXME: [availability] Deprecation doesn't make an element unavailable
6675+
if (!elt->getSemanticAvailableAttrs().empty())
66766676
hasAnyUnavailableValues = true;
6677-
}
66786677

66796678
if (!elt->isAvailableDuringLowering())
66806679
hasAnyUnavailableDuringLoweringValues = true;

0 commit comments

Comments
 (0)