File tree Expand file tree Collapse file tree 1 file changed +8
-23
lines changed
cpp/common/src/codingstandards/cpp/deadcode Expand file tree Collapse file tree 1 file changed +8
-23
lines changed Original file line number Diff line number Diff line change @@ -12,29 +12,14 @@ import cpp
12
12
*/
13
13
class UsableParameter extends Parameter {
14
14
UsableParameter ( ) {
15
- (
16
- /* Regular Function */
17
- // Find the function associated with the parameter
18
- exists ( Function f | this = f .getAParameter ( ) |
19
- // Must have the definition of the function, not just the declaration
20
- f .hasDefinition ( ) and
21
- // There must be a body block associated with the function, otherwise the parameter cannot
22
- // possibly be used
23
- exists ( f .getBlock ( ) )
24
- )
25
- or
26
- /* Lambda Expression */
27
- // Find the function associated with the parameter
28
- exists ( LambdaExpression lambda , Function f |
29
- this = lambda .getLambdaFunction ( ) .getParameter ( _)
30
- |
31
- // Must have the definition of the function, not just the declaration
32
- lambda .getLambdaFunction ( ) = f and
33
- f .hasDefinition ( ) and
34
- // There must be a body block associated with the function, otherwise the parameter cannot
35
- // possibly be used
36
- exists ( f .getBlock ( ) )
37
- )
15
+ /* Regular Function */
16
+ // Find the function associated with the parameter
17
+ exists ( Function f | this = f .getAParameter ( ) |
18
+ // Must have the definition of the function, not just the declaration
19
+ f .hasDefinition ( ) and
20
+ // There must be a body block associated with the function, otherwise the parameter cannot
21
+ // possibly be used
22
+ exists ( f .getBlock ( ) )
38
23
) and
39
24
// Must be a named parameter, because unnamed parameters cannot be referenced
40
25
isNamed ( )
You can’t perform that action at this time.
0 commit comments