mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Move location creation to instance method on context
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
{
|
||||
public QueryCall(Context cx, IMethodSymbol method, SyntaxNode clause, IExpressionParentEntity parent, int child)
|
||||
: base(new ExpressionInfo(cx, method?.GetAnnotatedReturnType(),
|
||||
cx.Create(clause.GetLocation()),
|
||||
cx.CreateLocation(clause.GetLocation()),
|
||||
ExprKind.METHOD_INVOCATION, parent, child, false, null))
|
||||
{
|
||||
if (method != null)
|
||||
@@ -89,7 +89,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
variableSymbol,
|
||||
declType,
|
||||
declTypeSyntax,
|
||||
cx.Create(node.GetLocation()),
|
||||
cx.CreateLocation(node.GetLocation()),
|
||||
true,
|
||||
parent,
|
||||
child
|
||||
@@ -97,7 +97,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
|
||||
Expression.Create(cx, Expr, decl, 0);
|
||||
|
||||
var nameLoc = cx.Create(name.GetLocation());
|
||||
var nameLoc = cx.CreateLocation(name.GetLocation());
|
||||
var access = new Expression(new ExpressionInfo(cx, type, nameLoc, ExprKind.LOCAL_VARIABLE_ACCESS, decl, 1, false, null));
|
||||
cx.TrapWriter.Writer.expr_access(access, LocalVariable.Create(cx, variableSymbol));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user