mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
C++: address review comments
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user