We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
fillClosureExpr
1 parent 8086ef4 commit a5a21b1Copy full SHA for a5a21b1
1 file changed
swift/extractor/translators/ExprTranslator.cpp
@@ -477,7 +477,11 @@ codeql::ErrorExpr ExprTranslator::translateErrorExpr(const swift::ErrorExpr& exp
477
void ExprTranslator::fillClosureExpr(const swift::AbstractClosureExpr& expr,
478
codeql::ClosureExpr& entry) {
479
entry.body = dispatcher.fetchLabel(expr.getBody());
480
- entry.captures = dispatcher.fetchRepeatedLabels(expr.getCaptureInfo().getCaptures());
+ if (expr.getCaptureInfo().hasBeenComputed()) {
481
+ entry.captures = dispatcher.fetchRepeatedLabels(expr.getCaptureInfo().getCaptures());
482
+ } else {
483
+ LOG_ERROR("Unable to get CaptureInfo");
484
+ }
485
CODEQL_EXPECT_OR(return, expr.getParameters(), "AbstractClosureExpr has null getParameters()");
486
entry.params = dispatcher.fetchRepeatedLabels(*expr.getParameters());
487
}
0 commit comments