Skip to content

Commit

Permalink
Fix as per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rak3-sh committed Nov 26, 2024
1 parent 2623c22 commit 56d886e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import cpp
import codingstandards.cpp.autosar
import codingstandards.cpp.FunctionEquivalence

class Candidate extends TemplateFunction {
Candidate() {
Expand All @@ -29,9 +30,8 @@ where
OperatorsPackage::functionThatContainsForwardingReferenceAsItsArgumentOverloadedQuery()) and
not f.isDeleted() and
f = c.getAnOverload() and
// CodeQL sometimes fetches an overloaded function at the same location.
// Thus, a check is added explicitly (refer #796).
f.getLocation() != c.getLocation() and
// Ensure the functions are not equivalent to each other (refer #796).
not f = getAnEquivalentFunction(c) and
// allow for overloading with different number of parameters, because there is no
// confusion on what function will be called.
f.getNumberOfParameters() = c.getNumberOfParameters() and
Expand Down

0 comments on commit 56d886e

Please sign in to comment.