Skip to content

Commit b90d0fd

Browse files
authored
Merge pull request #20854 from MathiasVP/no-magic-get-param
C++: Add `nomagic` to `Function::getParameter`
2 parents f27271d + 47ac4dd commit b90d0fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/ql/lib/semmle/code/cpp/Function.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,14 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
171171
* Gets the nth parameter of this function. There is no result for the
172172
* implicit `this` parameter, and there is no `...` varargs pseudo-parameter.
173173
*/
174+
pragma[nomagic]
174175
Parameter getParameter(int n) { params(unresolveElement(result), underlyingElement(this), n, _) }
175176

176177
/**
177178
* Gets a parameter of this function. There is no result for the implicit
178179
* `this` parameter, and there is no `...` varargs pseudo-parameter.
179180
*/
181+
pragma[nomagic]
180182
Parameter getAParameter() { params(unresolveElement(result), underlyingElement(this), _, _) }
181183

182184
/**

0 commit comments

Comments
 (0)