Skip to content

Commit b38ca94

Browse files
committed
C++: Work around CPP-331
This change suppresses results from "Declaration hides parameter" where the ParameterDeclarationEntry does not link up to the right FunctionDeclarationEntry.
1 parent 2268f1f commit b38ca94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ParameterDeclarationEntry functionParameterNames(Function f, string name) {
2323
result.getFunctionDeclarationEntry() = fe and
2424
fe.getFunction() = f and
2525
fe.getLocation() = f.getDefinitionLocation() and
26+
result.getFile() = fe.getFile() and // Work around CPP-331
2627
strictcount(f.getDefinitionLocation()) = 1 and
2728
result.getName() = name
2829
)

0 commit comments

Comments
 (0)