Skip to content

Commit dcce93a

Browse files
committed
C#: Address more review comments.
1 parent c68f9b0 commit dcce93a

File tree

1 file changed

+10
-14
lines changed
  • csharp/ql/lib/semmle/code/csharp/exprs

1 file changed

+10
-14
lines changed

csharp/ql/lib/semmle/code/csharp/exprs/Call.qll

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,12 @@ class Call extends DotNet::Call, Expr, @call {
6060
*/
6161
cached
6262
override Expr getArgumentForParameter(DotNet::Parameter p) {
63+
// Appears in the positional part of the call
64+
result = this.getImplicitArgument(p)
65+
or
66+
// Appears in the named part of the call
6367
this.getTarget().getAParameter() = p and
64-
(
65-
// Appears in the positional part of the call
66-
result = this.getImplicitArgument(p)
67-
or
68-
// Appears in the named part of the call
69-
result = this.getExplicitArgument(p.getName())
70-
)
68+
result = this.getExplicitArgument(p.getName())
7169
}
7270

7371
pragma[noinline]
@@ -189,14 +187,12 @@ class Call extends DotNet::Call, Expr, @call {
189187
*/
190188
cached
191189
Expr getRuntimeArgumentForParameter(Parameter p) {
190+
// Appears in the positional part of the call
191+
result = this.getImplicitRuntimeArgument(p)
192+
or
193+
// Appears in the named part of the call
192194
this.getARuntimeTarget().getAParameter() = p and
193-
(
194-
// Appears in the positional part of the call
195-
result = this.getImplicitRuntimeArgument(p)
196-
or
197-
// Appears in the named part of the call
198-
result = this.getExplicitRuntimeArgument(p.getName())
199-
)
195+
result = this.getExplicitRuntimeArgument(p.getName())
200196
}
201197

202198
pragma[noinline]

0 commit comments

Comments
 (0)