Skip to content

Commit 77e2cd3

Browse files
committed
Clean up a little code and add a small note.
1 parent a86d338 commit 77e2cd3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/AST/CaptureInfo.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ VarDecl *CaptureInfo::getIsolatedParamCapture() const {
8888
return nullptr;
8989

9090
for (const auto &capture : getCaptures()) {
91-
// Check for dynamic self metadata before checking if we have a local
92-
// capture since dynamic self metadata doesn't have a decl.
93-
if (capture.isDynamicSelfMetadata())
94-
continue;
95-
91+
// NOTE: isLocalCapture() returns false if we have dynamic self metadata
92+
// since dynamic self metadata is never an isolated capture. So we can just
93+
// call isLocalCapture without checking for dynamic self metadata.
9694
if (!capture.isLocalCapture())
9795
continue;
9896

0 commit comments

Comments
 (0)