mirror of
https://github.com/github/codeql.git
synced 2026-04-21 06:55:31 +02:00
Remove unnecessary check for the name parameter as parameter 1
This commit is contained in:
@@ -11,9 +11,9 @@ private class ViewCall extends MethodCall {
|
||||
|
||||
/** Gets the `name` argument to this call, if any. */
|
||||
string getNameArgument() {
|
||||
exists(StringLiteral lit, int i | i in [0 .. 1] |
|
||||
this.getTarget().getParameter(i).getType() instanceof StringType and
|
||||
DataFlow::localExprFlow(lit, this.getArgument(i)) and
|
||||
exists(StringLiteral lit |
|
||||
this.getTarget().getParameter(0).getType() instanceof StringType and
|
||||
DataFlow::localExprFlow(lit, this.getArgument(0)) and
|
||||
result = lit.getValue()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user