Skip to content

Commit f9e71d6

Browse files
committed
[NFC] Silence unused variable warning in assert()
Clang complains that paramIndicesLength is unused. This block is already guarded by CONDITIONAL_ASSERT_enabled(), so promoting assert() to ASSERT() should not affect the behavior of assertions-disabled builds.
1 parent 68524a8 commit f9e71d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ class LifetimeDependenceInfo {
236236
paramIndicesLength = inheritLifetimeParamIndices->getCapacity();
237237
}
238238
if (scopeLifetimeParamIndices) {
239-
assert(paramIndicesLength == 0 ||
239+
ASSERT(paramIndicesLength == 0 ||
240240
paramIndicesLength == scopeLifetimeParamIndices->getCapacity());
241241
paramIndicesLength = scopeLifetimeParamIndices->getCapacity();
242242
}
243243
if (addressableParamIndices) {
244-
assert(paramIndicesLength == 0 ||
244+
ASSERT(paramIndicesLength == 0 ||
245245
paramIndicesLength == addressableParamIndices->getCapacity());
246246
paramIndicesLength = addressableParamIndices->getCapacity();
247247
}

0 commit comments

Comments
 (0)