C++: address review comments

This commit is contained in:
idrissrio
2025-06-11 10:42:33 +02:00
parent f759550e5a
commit 2bae21cbcd
6 changed files with 18 additions and 20 deletions

View File

@@ -53,14 +53,6 @@ class LambdaExpression extends Expr, @lambdaexpr {
*/
predicate hasParameterList() { lambdas(underlyingElement(this), _, _, true) }
/**
* Holds if the lambda has an empty parameter list
*/
predicate emptyParameterListIsExplicit() {
this.hasParameterList() and
this.getLambdaFunction().getNumberOfParameters() = 0
}
/**
* Gets the function which will be invoked when the resulting object is called.
*

View File

@@ -4,4 +4,4 @@ class LambdaExpr extends @lambdaexpr {
from LambdaExpr lambda, string default_capture, boolean has_explicit_return_type
where lambdas(lambda, default_capture, has_explicit_return_type)
select lambda, default_capture, has_explicit_return_type, false
select lambda, default_capture, has_explicit_return_type, true

View File

@@ -1,3 +1,3 @@
description: add predicates `hasParameterList` and `emptyParameterListIsExplicit` to capture whether a lambda has an explicitly specified parameter list and whether that list is empty, respectively.Add commentMore actionsAdd commentMore actions
description: capture whether a lambda has an explicitly specified parameter list.
compatibility: backwards
lambdas.rel: run lambdas.qlo