Skip to content

Commit 3e617da

Browse files
rak3-shlcartey
andauthored
Apply suggestions from code review
Co-authored-by: Luke Cartey <5377966+lcartey@users.noreply.github.com>
1 parent d8c6a92 commit 3e617da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/autosar/src/rules/A0-1-3/UnusedLocalFunction.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ import codingstandards.cpp.deadcode.UnusedFunctions
2323
* passed in the arguments.
2424
*/
2525
predicate isCalled(Function unusedFunction) {
26-
exists (FunctionCall f | unusedFunction.getACallToThisFunction() = f)
26+
unusedFunction = getTarget(_)
2727
}
2828

2929
/** Checks if an overloaded function of
3030
* the function passed in the arguments, is called.
3131
*/
3232
predicate overloadedFunctionIsCalled(Function unusedFunction) {
33-
exists (Function f | f = unusedFunction.getAnOverload*() and isCalled(f))
33+
exists (Function f | f = unusedFunction.getAnOverload() and isCalled(f))
3434
or
3535
unusedFunction.getNamespace().isAnonymous() and
3636
exists (TopLevelFunction overloadedFunction |

0 commit comments

Comments
 (0)