Skip to content

Commit dca93f5

Browse files
authored
Merge pull request #196 from pavgust/fix/param-effective-decl-entry
Parameter.qll: Tweak how effective declaration entries are computed
2 parents c9cb2a0 + 2b4da8d commit dca93f5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cpp/ql/src/semmle/code/cpp/Parameter.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ class Parameter extends LocalScopeVariable, @parameter {
6868
*/
6969
private VariableDeclarationEntry getAnEffectiveDeclarationEntry() {
7070
if getFunction().isConstructedFrom(_)
71-
then exists (Parameter prototype
72-
| prototype = result.getVariable() and
73-
prototype.getIndex() = getIndex() and
74-
getFunction().isConstructedFrom(prototype.getFunction()))
71+
then exists (Function prototypeInstantiation
72+
| prototypeInstantiation.getParameter(getIndex()) = result.getVariable() and
73+
getFunction().isConstructedFrom(prototypeInstantiation))
7574
else result = getADeclarationEntry()
7675
}
7776

0 commit comments

Comments
 (0)