mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
Move location creation to instance method on context
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
public override void WriteId(TextWriter trapFile)
|
||||
{
|
||||
trapFile.WriteSubId(Context.Create(ReportingLocation));
|
||||
trapFile.WriteSubId(Context.CreateLocation(ReportingLocation));
|
||||
trapFile.Write(";namespacedeclaration");
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
var @namespace = (INamespaceSymbol)Context.GetModel(node).GetSymbolInfo(node.Name).Symbol;
|
||||
var ns = Namespace.Create(Context, @namespace);
|
||||
trapFile.namespace_declarations(this, ns);
|
||||
trapFile.namespace_declaration_location(this, Context.Create(node.Name.GetLocation()));
|
||||
trapFile.namespace_declaration_location(this, Context.CreateLocation(node.Name.GetLocation()));
|
||||
|
||||
var visitor = new Populators.TypeOrNamespaceVisitor(Context, trapFile, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user