Compare commits

..

2 Commits

Author SHA1 Message Date
Chris Smowton
463db799ba Update test expectations 2026-02-06 03:52:14 -08:00
Chris Smowton
d2636aad68 JS: Add missing rule to security-and-quality query list
Has header block

```
 * @id js/unhandled-error-in-stream-pipeline
 * @name Unhandled error in stream pipeline
 * @description Calling `pipe()` on a stream without error handling will drop errors coming from the input stream
 * @kind problem
 * @problem.severity warning
 * @precision high
 * @tags quality
 *       reliability
 *       error-handling
 *       frameworks/nodejs
```

... which would get selected by the security-and-quality selectors if we were using them. Any reason to exclude?
2026-02-06 11:24:30 +00:00
196 changed files with 11334 additions and 32717 deletions

View File

@@ -254,11 +254,11 @@ use_repo(
)
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.26.0")
go_sdk.download(version = "1.25.0")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//go/extractor:go.mod")
use_repo(go_deps, "com_github_stretchr_testify", "org_golang_x_mod", "org_golang_x_tools")
use_repo(go_deps, "org_golang_x_mod", "org_golang_x_tools")
ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archive")

View File

@@ -1,5 +0,0 @@
description: Add trap_filename, source_file_uses_trap and in_trap relations
compatibility: full
trap_filename.rel: delete
source_file_uses_trap.rel: delete
in_trap.rel: delete

View File

@@ -1726,7 +1726,9 @@ private module Cached {
SsaImpl::ssaFlow(n, succ) and
bb1 = n.getBasicBlock() and
bb2 = succ.getBasicBlock() and
bb2.strictlyDominates(bb1)
bb1 != bb2 and
bb2.dominates(bb1) and
bb1.getASuccessor+() = bb2
)
}

View File

@@ -390,7 +390,7 @@ class TranslatedDeclStmt extends TranslatedStmt {
override TranslatedElement getLastChild() { result = this.getChild(this.getChildCount() - 1) }
private int getChildCount() { result = count(int i | exists(this.getDeclarationEntry(i))) }
private int getChildCount() { result = count(this.getDeclarationEntry(_)) }
IRDeclarationEntry getIRDeclarationEntry(int index) {
result.hasIndex(index) and

View File

@@ -236,34 +236,6 @@ extractor_version(
string frontend_version: string ref
)
/**
* Gives the TRAP filename that `trap` is associated with.
* For debugging only.
*/
trap_filename(
int trap: @trap,
string filename: string ref
);
/**
* In `build-mode: none` overlay mode, indicates that `source_file`
* (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the
* TRAP file corresponding to `foo.c`, something it transitively
* includes, or a template instantiation it transitively uses.
*/
source_file_uses_trap(
string source_file: string ref,
int trap_file: @trap ref
);
/**
* Holds if there is a definition of `element` in TRAP file `trap_file`.
*/
in_trap(
int element: @element ref,
int trap_file: @trap ref
);
pch_uses(
int pch: @pch ref,
int compilation: @compilation ref,

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
description: Add trap_filename, source_file_uses_trap and in_trap relations
compatibility: full

View File

@@ -44,5 +44,5 @@ NHibernate,3,,,,,,,,,,,,3,,,,,,,,,,
Newtonsoft.Json,,,91,,,,,,,,,,,,,,,,,,,73,18
ServiceStack,194,,7,27,,,,,75,,,,92,,,,,,,,,7,
SourceGenerators,,,5,,,,,,,,,,,,,,,,,,,,5
System,59,47,12495,,6,5,12,,,4,1,,31,2,,6,15,17,4,3,,6382,6113
System,59,47,12491,,6,5,12,,,4,1,,31,2,,6,15,17,4,3,,6378,6113
Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,,,,,,
1 package sink source summary sink:code-injection sink:encryption-decryptor sink:encryption-encryptor sink:encryption-keyprop sink:encryption-symmetrickey sink:file-content-store sink:html-injection sink:js-injection sink:log-injection sink:sql-injection source:commandargs source:database source:environment source:file source:file-write source:remote source:stdin source:windows-registry summary:taint summary:value
44 Newtonsoft.Json 91 73 18
45 ServiceStack 194 7 27 75 92 7
46 SourceGenerators 5 5
47 System 59 47 12495 12491 6 5 12 4 1 31 2 6 15 17 4 3 6382 6378 6113
48 Windows.Security.Cryptography.Core 1 1

View File

@@ -8,7 +8,7 @@ C# framework & library support
Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting`
`ServiceStack <https://servicestack.net/>`_,"``ServiceStack.*``, ``ServiceStack``",,7,194,
System,"``System.*``, ``System``",47,12495,59,5
System,"``System.*``, ``System``",47,12491,59,5
Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.AspNetCore.Components``, ``Microsoft.AspNetCore.Http``, ``Microsoft.AspNetCore.Mvc``, ``Microsoft.AspNetCore.WebUtilities``, ``Microsoft.CSharp``, ``Microsoft.Data.SqlClient``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.DotNet.PlatformAbstractions``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.JSInterop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``NHibernate``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",60,2406,162,4
Totals,,107,14908,415,9
Totals,,107,14904,415,9

View File

@@ -1,3 +0,0 @@
description: Remove the relation `extension_receiver_type` and remove the `extension_type` type kind.
compatibility: backwards
extension_receiver_type.rel: delete

View File

@@ -5,7 +5,6 @@ using System.Security.Cryptography.X509Certificates;
using Semmle.Util;
using Semmle.Util.Logging;
using Newtonsoft.Json;
using System.Linq;
namespace Semmle.Extraction.CSharp.DependencyFetching
{
@@ -38,8 +37,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
/// </summary>
internal X509Certificate2? Certificate { get; private set; }
internal static DependabotProxy? GetDependabotProxy(
ILogger logger, IDiagnosticsWriter diagnosticsWriter, TemporaryDirectory tempWorkingDirectory)
internal static DependabotProxy? GetDependabotProxy(ILogger logger, TemporaryDirectory tempWorkingDirectory)
{
// Setting HTTP(S)_PROXY and SSL_CERT_FILE have no effect on Windows or macOS,
// but we would still end up using the Dependabot proxy to check for feed reachability.
@@ -114,23 +112,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
}
}
// Emit a diagnostic for the discovered private registries, so that it is easy
// for users to see that they were picked up.
if (result.RegistryURLs.Count > 0)
{
diagnosticsWriter.AddEntry(new DiagnosticMessage(
Language.CSharp,
"buildless/analysis-using-private-registries",
severity: DiagnosticMessage.TspSeverity.Note,
visibility: new DiagnosticMessage.TspVisibility(true, true, true),
name: "C# extraction used private package registries",
markdownMessage: string.Format(
"C# was extracted using the following private package registries:\n\n{0}\n",
string.Join("\n", result.RegistryURLs.Select(url => string.Format("- `{0}`", url)))
)
));
}
return result;
}

View File

@@ -106,7 +106,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
return BuildScript.Success;
}).Run(SystemBuildActions.Instance, startCallback, exitCallback);
dependabotProxy = DependabotProxy.GetDependabotProxy(logger, diagnosticsWriter, tempWorkingDirectory);
dependabotProxy = DependabotProxy.GetDependabotProxy(logger, tempWorkingDirectory);
try
{

View File

@@ -4,7 +4,6 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using Microsoft.CodeAnalysis;
using Semmle.Util;
using Semmle.Extraction.CSharp.Entities;
namespace Semmle.Extraction.CSharp
@@ -165,7 +164,6 @@ namespace Semmle.Extraction.CSharp
case TypeKind.Enum:
case TypeKind.Delegate:
case TypeKind.Error:
case TypeKind.Extension:
var named = (INamedTypeSymbol)type;
named.BuildNamedTypeId(cx, trapFile, symbolBeingDefined, constructUnderlyingTupleType);
return;
@@ -277,20 +275,6 @@ namespace Semmle.Extraction.CSharp
public static IEnumerable<IFieldSymbol?> GetTupleElementsMaybeNull(this INamedTypeSymbol type) =>
type.TupleElements;
private static void BuildExtensionTypeId(this INamedTypeSymbol named, Context cx, EscapingTextWriter trapFile)
{
trapFile.Write("extension(");
if (named.ExtensionMarkerName is not null)
{
trapFile.Write(named.ExtensionMarkerName);
}
else
{
trapFile.Write("unknown");
}
trapFile.Write(")");
}
private static void BuildQualifierAndName(INamedTypeSymbol named, Context cx, EscapingTextWriter trapFile, ISymbol symbolBeingDefined)
{
if (named.ContainingType is not null)
@@ -305,18 +289,8 @@ namespace Semmle.Extraction.CSharp
named.ContainingNamespace.BuildNamespace(cx, trapFile);
}
if (named.IsFileLocal)
{
trapFile.Write(named.MetadataName);
}
else if (named.IsExtension)
{
named.BuildExtensionTypeId(cx, trapFile);
}
else
{
trapFile.Write(named.Name);
}
var name = named.IsFileLocal ? named.MetadataName : named.Name;
trapFile.Write(name);
}
private static void BuildTupleId(INamedTypeSymbol named, Context cx, EscapingTextWriter trapFile, ISymbol symbolBeingDefined)
@@ -417,7 +391,6 @@ namespace Semmle.Extraction.CSharp
case TypeKind.Enum:
case TypeKind.Delegate:
case TypeKind.Error:
case TypeKind.Extension:
var named = (INamedTypeSymbol)type;
named.BuildNamedTypeDisplayName(cx, trapFile, constructUnderlyingTupleType);
return;
@@ -492,20 +465,6 @@ namespace Semmle.Extraction.CSharp
private static void BuildFunctionPointerTypeDisplayName(this IFunctionPointerTypeSymbol funptr, Context cx, TextWriter trapFile) =>
BuildFunctionPointerSignature(funptr, trapFile, s => s.BuildDisplayName(cx, trapFile));
private static void BuildExtensionTypeDisplayName(this INamedTypeSymbol named, Context cx, TextWriter trapFile)
{
trapFile.Write("extension(");
if (named.ExtensionParameter?.Type is ITypeSymbol type)
{
type.BuildDisplayName(cx, trapFile);
}
else
{
trapFile.Write("unknown");
}
trapFile.Write(")");
}
private static void BuildNamedTypeDisplayName(this INamedTypeSymbol namedType, Context cx, TextWriter trapFile, bool constructUnderlyingTupleType)
{
if (!constructUnderlyingTupleType && namedType.IsTupleType)
@@ -525,12 +484,6 @@ namespace Semmle.Extraction.CSharp
return;
}
if (namedType.IsExtension)
{
namedType.BuildExtensionTypeDisplayName(cx, trapFile);
return;
}
if (namedType.IsAnonymousType)
{
namedType.BuildAnonymousName(cx, trapFile);
@@ -643,84 +596,6 @@ namespace Semmle.Extraction.CSharp
return true;
}
/// <summary>
/// Return true if this method is a compiler-generated extension method.
/// </summary>
public static bool IsCompilerGeneratedExtensionMethod(this IMethodSymbol method) =>
method.TryGetExtensionMethod() is not null;
/// <summary>
/// Returns the extension method corresponding to this compiler-generated extension method, if it exists.
/// </summary>
public static IMethodSymbol? TryGetExtensionMethod(this IMethodSymbol method)
{
if (method.IsImplicitlyDeclared && method.ContainingSymbol is INamedTypeSymbol containingType)
{
// Extension types are declared within the same type as the generated
// extension method implementation.
var extensions = containingType.GetMembers()
.OfType<INamedTypeSymbol>()
.Where(t => t.IsExtension);
// Find the (possibly unbound) original extension method that maps to this implementation (if any).
var unboundDeclaration = extensions.SelectMany(e => e.GetMembers())
.OfType<IMethodSymbol>()
.FirstOrDefault(m => SymbolEqualityComparer.Default.Equals(m.AssociatedExtensionImplementation, method.ConstructedFrom));
var isFullyConstructed = method.IsBoundGenericMethod();
if (isFullyConstructed && unboundDeclaration?.ContainingType is INamedTypeSymbol extensionType)
{
try
{
// Use the type arguments from the constructed extension method to construct the extension type.
var arguments = method.TypeArguments.ToArray();
var (extensionTypeArguments, extensionMethodArguments) = arguments.SplitAt(extensionType.TypeParameters.Length);
// Construct the extension type.
var boundExtensionType = extensionType.IsUnboundGenericType()
? extensionType.Construct(extensionTypeArguments.ToArray())
: extensionType;
// Find the extension method declaration within the constructed extension type.
var extensionDeclaration = boundExtensionType.GetMembers()
.OfType<IMethodSymbol>()
.First(c => SymbolEqualityComparer.Default.Equals(c.OriginalDefinition, unboundDeclaration));
// If the extension declaration is unbound apply the remaning type arguments and construct it.
return extensionDeclaration.IsUnboundGenericMethod()
? extensionDeclaration.Construct(extensionMethodArguments.ToArray())
: extensionDeclaration;
}
catch
{
// If anything goes wrong, fall back to the unbound declaration.
return unboundDeclaration;
}
}
else
{
return unboundDeclaration;
}
}
return null;
}
/// <summary>
/// Returns true if this method is an unbound generic method.
/// </summary>
public static bool IsUnboundGenericMethod(this IMethodSymbol method) =>
method.IsGenericMethod && SymbolEqualityComparer.Default.Equals(method.ConstructedFrom, method);
/// <summary>
/// Returns true if this method is a bound generic method.
/// </summary>
public static bool IsBoundGenericMethod(this IMethodSymbol method) => method.IsGenericMethod && !method.IsUnboundGenericMethod();
/// <summary>
/// Returns true if this type is an unbound generic type.
/// </summary>
public static bool IsUnboundGenericType(this INamedTypeSymbol type) =>
type.IsGenericType && SymbolEqualityComparer.Default.Equals(type.ConstructedFrom, type);
/// <summary>
/// Gets the base type of `symbol`. Unlike `symbol.BaseType`, this excludes effective base
/// types of type parameters as well as `object` base types.
@@ -817,35 +692,5 @@ namespace Semmle.Extraction.CSharp
/// </summary>
public static IEnumerable<T> ExtractionCandidates<T>(this IEnumerable<T> symbols) where T : ISymbol =>
symbols.Where(symbol => symbol.ShouldExtractSymbol());
/// <summary>
/// Returns the parameter kind for this parameter symbol, e.g. `ref`, `out`, `params`, etc.
/// </summary>
public static Parameter.Kind GetParameterKind(this IParameterSymbol parameter)
{
switch (parameter.RefKind)
{
case RefKind.Out:
return Parameter.Kind.Out;
case RefKind.Ref:
return Parameter.Kind.Ref;
case RefKind.In:
return Parameter.Kind.In;
case RefKind.RefReadOnlyParameter:
return Parameter.Kind.RefReadOnly;
default:
if (parameter.IsParams)
return Parameter.Kind.Params;
if (parameter.Ordinal == 0)
{
if (parameter.ContainingSymbol is IMethodSymbol method && method.IsExtensionMethod)
{
return Parameter.Kind.This;
}
}
return Parameter.Kind.None;
}
}
}
}

View File

@@ -54,6 +54,22 @@ namespace Semmle.Extraction.CSharp.Entities
}
}
protected static void WriteLocationToTrap<T1>(Action<T1, Location> writeAction, T1 entity, Location l)
{
if (l is not EmptyLocation)
{
writeAction(entity, l);
}
}
protected static void WriteLocationsToTrap<T1>(Action<T1, Location> writeAction, T1 entity, IEnumerable<Location> locations)
{
foreach (var loc in locations)
{
WriteLocationToTrap(writeAction, entity, loc);
}
}
public override bool NeedsPopulation { get; }
public override int GetHashCode() => Symbol is null ? 0 : Symbol.GetHashCode();

View File

@@ -32,6 +32,32 @@ namespace Semmle.Extraction.CSharp.Entities
Attribute.ExtractAttributes(Context, Symbol, this);
}
protected void PopulateNullability(TextWriter trapFile, AnnotatedTypeSymbol type)
{
var n = NullabilityEntity.Create(Context, Nullability.Create(type));
if (!type.HasObliviousNullability())
{
trapFile.type_nullability(this, n);
}
}
protected void PopulateRefKind(TextWriter trapFile, RefKind kind)
{
switch (kind)
{
case RefKind.Out:
trapFile.type_annotation(this, Kinds.TypeAnnotation.Out);
break;
case RefKind.Ref:
trapFile.type_annotation(this, Kinds.TypeAnnotation.Ref);
break;
case RefKind.RefReadOnly:
case RefKind.RefReadOnlyParameter:
trapFile.type_annotation(this, Kinds.TypeAnnotation.ReadonlyRef);
break;
}
}
protected void PopulateScopedKind(TextWriter trapFile, ScopedKind kind)
{
switch (kind)

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.CodeAnalysis;
using Semmle.Extraction.CSharp.Entities;
namespace Semmle.Extraction.CSharp
{
@@ -26,7 +24,7 @@ namespace Semmle.Extraction.CSharp
trapFile.WriteUnescaped('\"');
}
public abstract Microsoft.CodeAnalysis.Location? ReportingLocation { get; }
public abstract Location? ReportingLocation { get; }
public abstract TrapStackBehaviour TrapStackBehaviour { get; }
@@ -67,48 +65,6 @@ namespace Semmle.Extraction.CSharp
}
#endif
protected void PopulateRefKind(TextWriter trapFile, RefKind kind)
{
switch (kind)
{
case RefKind.Out:
trapFile.type_annotation(this, Kinds.TypeAnnotation.Out);
break;
case RefKind.Ref:
trapFile.type_annotation(this, Kinds.TypeAnnotation.Ref);
break;
case RefKind.RefReadOnly:
case RefKind.RefReadOnlyParameter:
trapFile.type_annotation(this, Kinds.TypeAnnotation.ReadonlyRef);
break;
}
}
protected void PopulateNullability(TextWriter trapFile, AnnotatedTypeSymbol type)
{
var n = NullabilityEntity.Create(Context, Nullability.Create(type));
if (!type.HasObliviousNullability())
{
trapFile.type_nullability(this, n);
}
}
protected static void WriteLocationToTrap<T1>(Action<T1, Entities.Location> writeAction, T1 entity, Entities.Location l)
{
if (l is not EmptyLocation)
{
writeAction(entity, l);
}
}
protected static void WriteLocationsToTrap<T1>(Action<T1, Entities.Location> writeAction, T1 entity, IEnumerable<Entities.Location> locations)
{
foreach (var loc in locations)
{
WriteLocationToTrap(writeAction, entity, loc);
}
}
public override string ToString() => Label.ToString();
}
}

View File

@@ -24,16 +24,6 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
private bool IsExplicitDelegateInvokeCall() => Kind == ExprKind.DELEGATE_INVOCATION && Context.GetModel(Syntax.Expression).GetSymbolInfo(Syntax.Expression).Symbol is IMethodSymbol m && m.MethodKind == MethodKind.DelegateInvoke;
private bool IsOperatorCall() => Kind == ExprKind.OPERATOR_INVOCATION;
private bool IsValidMemberAccessKind()
{
return Kind == ExprKind.METHOD_INVOCATION ||
IsEventDelegateCall() ||
IsExplicitDelegateInvokeCall() ||
IsOperatorCall();
}
protected override void PopulateExpression(TextWriter trapFile)
{
if (IsNameof(Syntax))
@@ -47,7 +37,7 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
var target = TargetSymbol;
switch (Syntax.Expression)
{
case MemberAccessExpressionSyntax memberAccess when IsValidMemberAccessKind():
case MemberAccessExpressionSyntax memberAccess when Kind == ExprKind.METHOD_INVOCATION || IsEventDelegateCall() || IsExplicitDelegateInvokeCall():
memberName = memberAccess.Name.Identifier.Text;
if (Syntax.Expression.Kind() == SyntaxKind.SimpleMemberAccessExpression)
// Qualified method call; `x.M()`
@@ -123,24 +113,14 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
public SymbolInfo SymbolInfo => info.SymbolInfo;
private static bool IsOperatorLikeCall(ExpressionNodeInfo info)
{
return info.SymbolInfo.Symbol is IMethodSymbol method &&
method.TryGetExtensionMethod()?.MethodKind == MethodKind.UserDefinedOperator;
}
public IMethodSymbol? TargetSymbol
{
get
{
var si = SymbolInfo;
if (si.Symbol is ISymbol symbol)
{
var method = symbol as IMethodSymbol;
// Case for compiler-generated extension methods.
return method?.TryGetExtensionMethod() ?? method;
}
if (si.Symbol is not null)
return si.Symbol as IMethodSymbol;
if (si.CandidateReason == CandidateReason.OverloadResolutionFailure)
{
@@ -216,25 +196,15 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
private static ExprKind GetKind(ExpressionNodeInfo info)
{
if (IsNameof((InvocationExpressionSyntax)info.Node))
{
return ExprKind.NAMEOF;
}
if (IsDelegateLikeCall(info))
{
return IsDelegateInvokeCall(info)
? ExprKind.DELEGATE_INVOCATION
: ExprKind.FUNCTION_POINTER_INVOCATION;
}
if (IsLocalFunctionInvocation(info))
{
return ExprKind.LOCAL_FUNCTION_INVOCATION;
}
if (IsOperatorLikeCall(info))
{
return ExprKind.OPERATOR_INVOCATION;
}
return ExprKind.METHOD_INVOCATION;
return IsNameof((InvocationExpressionSyntax)info.Node)
? ExprKind.NAMEOF
: IsDelegateLikeCall(info)
? IsDelegateInvokeCall(info)
? ExprKind.DELEGATE_INVOCATION
: ExprKind.FUNCTION_POINTER_INVOCATION
: IsLocalFunctionInvocation(info)
? ExprKind.LOCAL_FUNCTION_INVOCATION
: ExprKind.METHOD_INVOCATION;
}
private static bool IsNameof(InvocationExpressionSyntax syntax)

View File

@@ -1,9 +0,0 @@
namespace Semmle.Extraction.CSharp.Entities
{
/// <summary>
/// Marker interface for parameter entities.
/// </summary>
internal interface IParameter : IEntity
{
}
}

View File

@@ -14,28 +14,9 @@ namespace Semmle.Extraction.CSharp.Entities
protected Method(Context cx, IMethodSymbol init)
: base(cx, init) { }
private SyntheticExtensionParameter? SyntheticParameter { get; set; }
private int SynthesizeExtensionParameter()
{
// Synthesize implicit parameter for extension methods declared using extension(...) syntax.
if (Symbol.ContainingSymbol is INamedTypeSymbol type &&
type.IsExtension && type.ExtensionParameter is IParameterSymbol parameter &&
!string.IsNullOrEmpty(parameter.Name) && !Symbol.IsStatic)
{
var originalSyntheticParam = OriginalDefinition.SyntheticParameter;
SyntheticParameter = SyntheticExtensionParameter.Create(Context, this, parameter, originalSyntheticParam);
return 1;
}
return 0;
}
protected void PopulateParameters()
{
var originalMethod = OriginalDefinition;
var positionOffset = SynthesizeExtensionParameter();
IEnumerable<IParameterSymbol> parameters = Symbol.Parameters;
IEnumerable<IParameterSymbol> originalParameters = originalMethod.Symbol.Parameters;
@@ -43,8 +24,8 @@ namespace Semmle.Extraction.CSharp.Entities
{
var original = SymbolEqualityComparer.Default.Equals(p.paramSymbol, p.originalParam)
? null
: Parameter.Create(Context, p.originalParam, originalMethod, null, positionOffset);
Parameter.Create(Context, p.paramSymbol, this, original, positionOffset);
: Parameter.Create(Context, p.originalParam, originalMethod);
Parameter.Create(Context, p.paramSymbol, this, original);
}
if (Symbol.IsVararg)
@@ -321,9 +302,9 @@ namespace Semmle.Extraction.CSharp.Entities
/// <summary>
/// Whether this method has unbound type parameters.
/// </summary>
public bool IsUnboundGeneric => Symbol.IsUnboundGenericMethod();
public bool IsUnboundGeneric => IsGeneric && SymbolEqualityComparer.Default.Equals(Symbol.ConstructedFrom, Symbol);
public bool IsBoundGeneric => Symbol.IsBoundGenericMethod();
public bool IsBoundGeneric => IsGeneric && !IsUnboundGeneric;
protected IMethodSymbol ConstructedFromSymbol => Symbol.ConstructedFrom;

View File

@@ -23,11 +23,7 @@ namespace Semmle.Extraction.CSharp.Entities
? Symbol.ContainingType.GetSymbolLocation()
: BodyDeclaringSymbol.GetSymbolLocation();
public override bool NeedsPopulation =>
(base.NeedsPopulation || IsCompilerGeneratedDelegate()) &&
// Exclude compiler-generated extension methods. A call to such a method
// is replaced by a call to the defining extension method.
!Symbol.IsCompilerGeneratedExtensionMethod();
public override bool NeedsPopulation => base.NeedsPopulation || IsCompilerGeneratedDelegate();
public override void Populate(TextWriter trapFile)
{

View File

@@ -7,23 +7,16 @@ using Semmle.Extraction.CSharp.Populators;
namespace Semmle.Extraction.CSharp.Entities
{
internal class Parameter : CachedSymbol<IParameterSymbol>, IExpressionParentEntity, IParameter
internal class Parameter : CachedSymbol<IParameterSymbol>, IExpressionParentEntity
{
protected IEntity? Parent { get; set; }
protected Parameter Original { get; }
private int PositionOffset { get; set; }
private Parameter(Context cx, IParameterSymbol init, IEntity? parent, Parameter? original, int positionOffset)
protected Parameter(Context cx, IParameterSymbol init, IEntity? parent, Parameter? original)
: base(cx, init)
{
Parent = parent;
Original = original ?? this;
PositionOffset = positionOffset;
}
protected Parameter(Context cx, IParameterSymbol init, IEntity? parent, Parameter? original)
: this(cx, init, parent, original, 0)
{
}
public override Microsoft.CodeAnalysis.Location ReportingLocation => Symbol.GetSymbolLocation();
@@ -39,18 +32,46 @@ namespace Semmle.Extraction.CSharp.Entities
RefReadOnly = 6
}
protected virtual int Ordinal => Symbol.Ordinal + PositionOffset;
protected virtual int Ordinal => Symbol.Ordinal;
public static Parameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null, int positionOffset = 0)
private Kind ParamKind
{
get
{
switch (Symbol.RefKind)
{
case RefKind.Out:
return Kind.Out;
case RefKind.Ref:
return Kind.Ref;
case RefKind.In:
return Kind.In;
case RefKind.RefReadOnlyParameter:
return Kind.RefReadOnly;
default:
if (Symbol.IsParams)
return Kind.Params;
if (Ordinal == 0)
{
if (Symbol.ContainingSymbol is IMethodSymbol method && method.IsExtensionMethod)
return Kind.This;
}
return Kind.None;
}
}
}
public static Parameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null)
{
var cachedSymbol = cx.GetPossiblyCachedParameterSymbol(param);
return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, parent, original, positionOffset));
return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, parent, original));
}
public static Parameter Create(Context cx, IParameterSymbol param)
{
var cachedSymbol = cx.GetPossiblyCachedParameterSymbol(param);
return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, null, null, 0));
return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, null, null));
}
public override void WriteId(EscapingTextWriter trapFile)
@@ -58,9 +79,6 @@ namespace Semmle.Extraction.CSharp.Entities
if (Parent is null)
Parent = Method.Create(Context, Symbol.ContainingSymbol as IMethodSymbol);
if (Parent is null && Symbol.ContainingSymbol is INamedTypeSymbol type && type.IsExtension)
Parent = Type.Create(Context, type);
if (Parent is null)
throw new InternalError(Symbol, "Couldn't get parent of symbol.");
@@ -95,8 +113,7 @@ namespace Semmle.Extraction.CSharp.Entities
Context.ModelError(Symbol, "Inconsistent parameter declaration");
var type = Type.Create(Context, Symbol.Type);
var kind = Symbol.GetParameterKind();
trapFile.@params(this, Name, type.TypeRef, Ordinal, kind, Parent!, Original);
trapFile.@params(this, Name, type.TypeRef, Ordinal, ParamKind, Parent!, Original);
if (Context.OnlyScaffold)
{
@@ -177,11 +194,11 @@ namespace Semmle.Extraction.CSharp.Entities
return syntax?.Default;
}
private class ParameterFactory : CachedEntityFactory<(IParameterSymbol, IEntity?, Parameter?, int), Parameter>
private class ParameterFactory : CachedEntityFactory<(IParameterSymbol, IEntity?, Parameter?), Parameter>
{
public static ParameterFactory Instance { get; } = new ParameterFactory();
public override Parameter Create(Context cx, (IParameterSymbol, IEntity?, Parameter?, int) init) => new Parameter(cx, init.Item1, init.Item2, init.Item3, init.Item4);
public override Parameter Create(Context cx, (IParameterSymbol, IEntity?, Parameter?) init) => new Parameter(cx, init.Item1, init.Item2, init.Item3);
}
public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.OptionalLabel;

View File

@@ -1,77 +0,0 @@
using System.IO;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Semmle.Extraction.CSharp.Entities
{
/// <summary>
/// Synthetic parameter for extension methods declared using the extension syntax.
/// That is, we add a synthetic parameter `s` to `IsValid` in the following example:
/// extension(string s) {
/// public bool IsValid() { ... }
/// }
///
/// Note, that we use the characteristics of the parameter of the extension type
/// to populate the database.
/// </summary>
internal class SyntheticExtensionParameter : FreshEntity, IParameter
{
private Method ExtensionMethod { get; }
private IParameterSymbol ExtensionParameter { get; }
private SyntheticExtensionParameter Original { get; }
private SyntheticExtensionParameter(Context cx, Method method, IParameterSymbol parameter, SyntheticExtensionParameter? original) : base(cx)
{
ExtensionMethod = method;
ExtensionParameter = parameter;
Original = original ?? this;
}
private static int Ordinal => 0;
private string Name => ExtensionParameter.Name;
private bool IsSourceDeclaration => ExtensionMethod.Symbol.IsSourceDeclaration();
protected override void Populate(TextWriter trapFile)
{
PopulateNullability(trapFile, ExtensionParameter.GetAnnotatedType());
PopulateRefKind(trapFile, ExtensionParameter.RefKind);
var type = Type.Create(Context, ExtensionParameter.Type);
var kind = ExtensionParameter.GetParameterKind();
trapFile.@params(this, Name, type.TypeRef, Ordinal, kind, ExtensionMethod, Original);
if (Context.OnlyScaffold)
{
return;
}
if (Context.ExtractLocation(ExtensionParameter))
{
var locations = Context.GetLocations(ExtensionParameter);
WriteLocationsToTrap(trapFile.param_location, this, locations);
}
if (IsSourceDeclaration)
{
foreach (var syntax in ExtensionParameter.DeclaringSyntaxReferences
.Select(d => d.GetSyntax())
.OfType<ParameterSyntax>()
.Where(s => s.Type is not null))
{
TypeMention.Create(Context, syntax.Type!, this, type);
}
}
}
public static SyntheticExtensionParameter Create(Context cx, Method method, IParameterSymbol parameter, SyntheticExtensionParameter? original)
{
var p = new SyntheticExtensionParameter(cx, method, parameter, original);
p.TryPopulate();
return p;
}
}
}

View File

@@ -20,8 +20,6 @@ namespace Semmle.Extraction.CSharp.Entities
public static NamedType Create(Context cx, INamedTypeSymbol type) =>
NamedTypeFactory.Instance.CreateEntityFromSymbol(cx, type);
public NamedType OriginalDefinition => Create(Context, Symbol.OriginalDefinition);
/// <summary>
/// Creates a named type entity from a tuple type. Unlike <see cref="Create"/>, this
/// will create an entity for the underlying `System.ValueTuple` struct.
@@ -92,25 +90,6 @@ namespace Semmle.Extraction.CSharp.Entities
{
trapFile.anonymous_types(this);
}
if (Symbol.IsExtension && Symbol.ExtensionParameter is IParameterSymbol parameter)
{
// For some reason an extension type has a receiver parameter with an empty name
// even when there is no parameter.
if (!string.IsNullOrEmpty(parameter.Name))
{
var originalType = OriginalDefinition;
// In case this is a constructed generic, we also need to create the unbound parameter.
var originalParameter = SymbolEqualityComparer.Default.Equals(Symbol, originalType.Symbol.ExtensionParameter) || originalType.Symbol.ExtensionParameter is null
? null
: Parameter.Create(Context, originalType.Symbol.ExtensionParameter, originalType);
Parameter.Create(Context, parameter, this, originalParameter);
}
// Use the parameter type as the receiver type.
var receiverType = Type.Create(Context, parameter.Type).TypeRef;
trapFile.extension_receiver_type(this, receiverType);
}
}
private readonly Lazy<Type[]> typeArgumentsLazy;

View File

@@ -105,7 +105,6 @@ namespace Semmle.Extraction.CSharp.Entities
case TypeKind.Pointer: return Kinds.TypeKind.POINTER;
case TypeKind.FunctionPointer: return Kinds.TypeKind.FUNCTION_POINTER;
case TypeKind.Error: return Kinds.TypeKind.UNKNOWN;
case TypeKind.Extension: return Kinds.TypeKind.EXTENSION;
default:
cx.ModelError(Symbol, $"Unhandled type kind '{Symbol.TypeKind}'");
return Kinds.TypeKind.UNKNOWN;
@@ -367,7 +366,7 @@ namespace Semmle.Extraction.CSharp.Entities
private DelegateTypeParameter(Context cx, IParameterSymbol init, IEntity parent, Parameter? original)
: base(cx, init, parent, original) { }
public static DelegateTypeParameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null) =>
public static new DelegateTypeParameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null) =>
// We need to use a different cache key than `param` to avoid mixing up
// `DelegateTypeParameter`s and `Parameter`s
DelegateTypeParameterFactory.Instance.CreateEntity(cx, (typeof(DelegateTypeParameter), new SymbolEqualityWrapper(param)), (param, parent, original));

View File

@@ -38,6 +38,5 @@ namespace Semmle.Extraction.Kinds
TUPLE = 32,
FUNCTION_POINTER = 33,
INLINE_ARRAY = 34,
EXTENSION = 35
}
}

View File

@@ -202,9 +202,6 @@ namespace Semmle.Extraction.CSharp
internal static void extend(this TextWriter trapFile, Type type, Type super) =>
trapFile.WriteTuple("extend", type, super);
internal static void extension_receiver_type(this TextWriter trapFile, Type @extension, Type receiverType) =>
trapFile.WriteTuple("extension_receiver_type", extension, receiverType);
internal static void anonymous_types(this TextWriter trapFile, Type type) =>
trapFile.WriteTuple("anonymous_types", type);
@@ -295,10 +292,10 @@ namespace Semmle.Extraction.CSharp
internal static void overrides(this TextWriter trapFile, Method overriding, Method overridden) =>
trapFile.WriteTuple("overrides", overriding, overridden);
internal static void param_location(this TextWriter trapFile, IParameter param, Location location) =>
internal static void param_location(this TextWriter trapFile, Parameter param, Location location) =>
trapFile.WriteTuple("param_location", param, location);
internal static void @params(this TextWriter trapFile, IParameter param, string name, Type type, int child, Parameter.Kind mode, IEntity method, IParameter originalDefinition) =>
internal static void @params(this TextWriter trapFile, Parameter param, string name, Type type, int child, Parameter.Kind mode, IEntity method, Parameter originalDefinition) =>
trapFile.WriteTuple("params", param, name, type, child, (int)mode, method, originalDefinition);
internal static void parent_namespace(this TextWriter trapFile, IEntity type, Namespace parent) =>

View File

@@ -119,28 +119,5 @@ namespace Semmle.Util
/// </summary>
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> items) where T : class =>
items.Where(i => i is not null)!;
/// <summary>
/// Splits the sequence at the given index.
/// </summary>
public static (IEnumerable<T>, IEnumerable<T>) SplitAt<T>(this IEnumerable<T> items, int index)
{
var left = new List<T>();
var right = new List<T>();
var i = 0;
foreach (var item in items)
{
if (i < index)
{
left.Add(item);
}
else
{
right.Add(item);
}
i++;
}
return (left, right);
}
}
}

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* C# 14: Added support for `extension` members in the extractor, QL library, data flow, and Models as Data, covering extension methods, properties, and operators.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* The model for `System.Web.HttpUtility` has been modified to better model the flow of tainted URIs.

View File

@@ -29,10 +29,6 @@ extensions:
- ["System.Web", "HttpUtility", False, "JavaScriptStringEncode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "JavaScriptStringEncode", "(System.String,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "ParseQueryString", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlDecode", "(System.Byte[],System.Int32,System.Int32,System.Text.Encoding)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlDecode", "(System.Byte[],System.Text.Encoding)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlDecode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlDecode", "(System.String,System.Text.Encoding)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlEncode", "(System.Byte[])", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlEncode", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.Web", "HttpUtility", False, "UrlEncode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]

View File

@@ -10,7 +10,6 @@ import exprs.Call
private import commons.QualifiedName
private import commons.Collections
private import semmle.code.csharp.ExprOrStmtParent
private import semmle.code.csharp.internal.Callable
private import semmle.code.csharp.metrics.Complexity
private import TypeRef
@@ -224,8 +223,6 @@ class Callable extends Parameterizable, ExprOrStmtParent, @callable {
Call getACall() { this = result.getTarget() }
}
final class ExtensionCallable = ExtensionCallableImpl;
/**
* A method, for example
*
@@ -270,11 +267,8 @@ class Method extends Callable, Virtualizable, Attributable, @method {
override Location getALocation() { method_location(this.getUnboundDeclaration(), result) }
/** Holds if this method is a classic extension method. */
predicate isClassicExtensionMethod() { this.getParameter(0).hasExtensionMethodModifier() }
/** Holds if this method is an extension method. */
predicate isExtensionMethod() { this.isClassicExtensionMethod() or this.isInExtension() }
predicate isExtensionMethod() { this.getParameter(0).hasExtensionMethodModifier() }
/** Gets the type of the `params` parameter of this method, if any. */
Type getParamsType() {
@@ -301,10 +295,8 @@ class Method extends Callable, Virtualizable, Attributable, @method {
override string getAPrimaryQlClass() { result = "Method" }
}
final class ExtensionMethod = ExtensionMethodImpl;
/**
* An extension method, for example
* An extension method, for example
*
* ```csharp
* static bool IsDefined(this Widget w) {
@@ -312,28 +304,16 @@ final class ExtensionMethod = ExtensionMethodImpl;
* }
* ```
*/
class ClassicExtensionMethod extends ExtensionMethodImpl {
ClassicExtensionMethod() { this.isClassicExtensionMethod() }
pragma[noinline]
override Type getExtendedType() { result = this.getParameter(0).getType() }
class ExtensionMethod extends Method {
ExtensionMethod() { this.isExtensionMethod() }
override predicate isStatic() { any() }
}
/**
* An extension method declared in an extension type, for example `IsNullOrEmpty` in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public bool IsNullOrEmpty() { ... }
* }
* }
* ```
*/
class ExtensionTypeExtensionMethod extends ExtensionMethodImpl {
ExtensionTypeExtensionMethod() { this.isInExtension() }
/** Gets the type being extended by this method. */
pragma[noinline]
Type getExtendedType() { result = this.getParameter(0).getType() }
override string getAPrimaryQlClass() { result = "ExtensionMethod" }
}
/**
@@ -556,21 +536,6 @@ class RecordCloneMethod extends Method {
}
}
/**
* An extension operator, for example `*` in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public static string operator *(int s1, string s2) { ... }
* }
* }
* ```
*/
class ExtensionOperator extends ExtensionCallableImpl, Operator {
ExtensionOperator() { this.isInExtension() }
}
/**
* A user-defined unary operator - an operator taking one operand.
*

View File

@@ -102,9 +102,6 @@ class Declaration extends NamedElement, @declaration {
* implicit constructors or accessors.
*/
predicate isCompilerGenerated() { compiler_generated(this) }
/** Holds if this declaration is in an extension type. */
predicate isInExtension() { this.getDeclaringType() instanceof ExtensionType }
}
/** A declaration that can have a modifier. */
@@ -472,7 +469,7 @@ class Virtualizable extends Overridable, Member, @virtualizable {
/**
* A parameterizable declaration. Either a callable (`Callable`), a delegate
* type (`DelegateType`), an indexer (`Indexer`), or an extension (`ExtensionType`).
* type (`DelegateType`), or an indexer (`Indexer`).
*/
class Parameterizable extends Declaration, @parameterizable {
/** Gets raw parameter `i`, including the `this` parameter at index 0. */

View File

@@ -6,7 +6,6 @@ import Member
import Stmt
import Type
private import semmle.code.csharp.ExprOrStmtParent
private import semmle.code.csharp.internal.Callable
private import TypeRef
/**
@@ -261,21 +260,6 @@ class Property extends DeclarationWithGetSetAccessors, @property {
override string getAPrimaryQlClass() { result = "Property" }
}
/**
* An extension property, for example `FirstChar` in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public char FirstChar { get { ... } }
* }
* }
* ```
*/
class ExtensionProperty extends Property {
ExtensionProperty() { this.isInExtension() }
}
/**
* An indexer, for example `string this[int i]` on line 2 in
*
@@ -429,22 +413,6 @@ class Accessor extends Callable, Modifiable, Attributable, Overridable, @callabl
override string toString() { result = this.getName() }
}
/**
* An extension accessor. Either a getter (`Getter`) or a setter (`Setter`) of an
* extension property, for example `get` in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public char FirstChar { get { ... } }
* }
* }
* ```
*/
class ExtensionAccessor extends ExtensionCallableImpl, Accessor {
ExtensionAccessor() { this.isInExtension() }
}
/**
* A `get` accessor, for example `get { return p; }` in
*

View File

@@ -17,8 +17,7 @@ private import semmle.code.csharp.frameworks.system.runtime.CompilerServices
*
* Either a value or reference type (`ValueOrRefType`), the `void` type (`VoidType`),
* a pointer type (`PointerType`), the arglist type (`ArglistType`), an unknown
* type (`UnknownType`), a type parameter (`TypeParameter`) or
* an extension type (`ExtensionType`).
* type (`UnknownType`), or a type parameter (`TypeParameter`).
*/
class Type extends Member, TypeContainer, @type {
/** Gets the name of this type without additional syntax such as `[]` or `*`. */
@@ -1327,35 +1326,3 @@ class TypeMention extends @type_mention {
/** Gets the location of this type mention. */
Location getLocation() { type_mention_location(this, result) }
}
/**
* A type extension declaration, for example `extension(string s) { ... }` in
*
* ```csharp
* static class MyExtensions {
* extension(string s) { ... }
* ```
*/
class ExtensionType extends Parameterizable, @extension_type {
/**
* Gets the receiver parameter of this extension type, if any.
*/
Parameter getReceiverParameter() { result = this.getParameter(0) }
/**
* Holds if this extension type has a receiver parameter.
*/
predicate hasReceiverParameter() { exists(this.getReceiverParameter()) }
/**
* Gets the type being extended by this extension type.
*/
Type getExtendedType() {
extension_receiver_type(this, result)
or
not extension_receiver_type(this, any(Type t)) and
extension_receiver_type(this, getTypeRef(result))
}
override string getAPrimaryQlClass() { result = "ExtensionType" }
}

View File

@@ -67,12 +67,6 @@ module QualifiedName<QualifiedNameInputSig Input> {
)
}
private string getName(ValueOrRefType t) {
not t instanceof ExtensionType and result = t.getUndecoratedName()
or
result = "extension(" + getFullName(t.(ExtensionType).getExtendedType()) + ")"
}
/** Holds if declaration `d` has the qualified name `qualifier`.`name`. */
predicate hasQualifiedName(Declaration d, string qualifier, string name) {
d =
@@ -92,12 +86,12 @@ module QualifiedName<QualifiedNameInputSig Input> {
exists(string name0 | name = name0 + Input::getUnboundGenericSuffix(ugt) |
exists(string enclosing |
hasQualifiedName(ugt.getDeclaringType(), qualifier, enclosing) and
name0 = enclosing + "+" + getName(ugt)
name0 = enclosing + "+" + ugt.getUndecoratedName()
)
or
not exists(ugt.getDeclaringType()) and
qualifier = ugt.getNamespace().getFullName() and
name0 = getName(ugt)
name0 = ugt.getUndecoratedName()
)
)
or
@@ -106,12 +100,12 @@ module QualifiedName<QualifiedNameInputSig Input> {
exists(string name0 | name = name0 + "<" + getTypeArgumentsQualifiedNames(ct) + ">" |
exists(string enclosing |
hasQualifiedName(ct.getDeclaringType(), qualifier, enclosing) and
name0 = enclosing + "+" + getName(ct)
name0 = enclosing + "+" + ct.getUndecoratedName()
)
or
not exists(ct.getDeclaringType()) and
qualifier = ct.getNamespace().getFullName() and
name0 = getName(ct)
name0 = ct.getUndecoratedName()
)
)
or
@@ -122,12 +116,12 @@ module QualifiedName<QualifiedNameInputSig Input> {
(
exists(string enclosing |
hasQualifiedName(vort.getDeclaringType(), qualifier, enclosing) and
name = enclosing + "+" + getName(vort)
name = enclosing + "+" + vort.getUndecoratedName()
)
or
not exists(vort.getDeclaringType()) and
qualifier = vort.getNamespace().getFullName() and
name = getName(vort)
name = vort.getUndecoratedName()
)
)
or

View File

@@ -214,7 +214,7 @@ module ModelValidation {
not namespace.regexpMatch("[a-zA-Z0-9_\\.]+") and
result = "Dubious namespace \"" + namespace + "\" in " + pred + " model."
or
not type.regexpMatch("[a-zA-Z0-9_<>,\\(\\)\\+\\.]+") and
not type.regexpMatch("[a-zA-Z0-9_<>,\\+]+") and
result = "Dubious type \"" + type + "\" in " + pred + " model."
or
not name.regexpMatch("[a-zA-Z0-9_<>,\\.]*") and

View File

@@ -87,8 +87,7 @@ private module Internal {
newtype TDispatchCall =
TDispatchMethodCall(MethodCall mc) {
not isReflectionCall(mc, _, _, _, _) and
not mc.isLateBound() and
not isExtensionAccessorCall(mc)
not mc.isLateBound()
} or
TDispatchAccessorCall(AccessorCall ac) or
TDispatchOperatorCall(OperatorCall oc) { not oc.isLateBound() } or
@@ -111,8 +110,7 @@ private module Internal {
c instanceof ConstructorInitializer
or
c instanceof LocalFunctionCall
} or
TDispatchExtensionAccessorCall(MethodCall mc) { isExtensionAccessorCall(mc) }
}
cached
Expr getCall(DispatchCall dc) { result = dc.(DispatchCallImpl).getCall() }
@@ -144,8 +142,6 @@ private module Internal {
import Cached
private predicate isExtensionAccessorCall(MethodCall mc) { exists(mc.getTargetAccessor()) }
/**
* Holds if `mc` is a reflection call to a method named `name`, where
* `object` is the object on which to invoke the method (`null` if a
@@ -823,33 +819,6 @@ private module Internal {
override Method getAStaticTarget() { result = this.getCall().getTarget() }
}
/**
* A call to an extension accessor method.
*/
private class DispatchExtensionAccessorCall extends DispatchCallImpl,
TDispatchExtensionAccessorCall
{
override MethodCall getCall() { this = TDispatchExtensionAccessorCall(result) }
private Expr getArgumentForParameter(Parameter p) {
this.getCall().getTargetAccessor().getAParameter() = p and
result = this.getCall().getArgument(p.getPosition())
}
override Expr getArgument(int i) {
exists(MethodCall call, Parameter p | call = this.getCall() |
p = call.getTargetAccessor().getParameter(i) and
result = this.getArgumentForParameter(p)
)
}
override Expr getQualifier() { result = this.getCall().getQualifier() }
override Accessor getAStaticTarget() { result = this.getCall().getTargetAccessor() }
override RuntimeCallable getADynamicTarget() { result = this.getAStaticTarget() }
}
/**
* An ordinary operator call.
*

View File

@@ -223,40 +223,6 @@ class ParameterAccess extends LocalScopeVariableAccess, @parameter_access_expr {
override string getAPrimaryQlClass() { result = "ParameterAccess" }
}
/**
* An access to a synthetic parameter for an extension method, for example the
* access to `s` on line 3 in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public bool IsEmpty() { return s == string.Empty; }
* }
* }
* ```
*/
class SyntheticExtensionParameterAccess extends ParameterAccess {
SyntheticExtensionParameterAccess() {
exists(ExtensionType et, Parameter p |
p = et.getReceiverParameter() and
expr_access(this, p)
)
}
override Parameter getTarget() {
exists(ExtensionCallable c |
this.getEnclosingCallable+() = c and
result = c.getParameter(0)
)
}
override string toString() {
result = "access to extension synthetic parameter " + this.getTarget().getName()
}
override string getAPrimaryQlClass() { result = "SyntheticExtensionParameterAccess" }
}
/**
* An access to a parameter that reads the underlying value, for example
* the access to `p` on line 2 in

View File

@@ -267,33 +267,9 @@ class Call extends Expr, @call {
class MethodCall extends Call, QualifiableExpr, LateBindableExpr, @method_invocation_expr {
override Method getTarget() { expr_call(this, result) }
/**
* Gets the accessor that was used to generate this method, if any. For example, the
* method call `MyExtensions.get_FirstChar(s)` on line 9 is generated from the property
* accessor `get_FirstChar` on line 3 in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public char FirstChar { get { ... } }
* }
* }
*
* class A {
* char M(string s) {
* return MyExtensions.get_FirstChar(s);
* }
* }
*/
Accessor getTargetAccessor() { expr_call(this, result) }
override Method getQualifiedDeclaration() { result = this.getTarget() }
override string toString() {
if exists(this.getTargetAccessor())
then result = "call to extension accessor " + concat(this.getTargetAccessor().getName())
else result = "call to method " + concat(this.getTarget().getName())
}
override string toString() { result = "call to method " + concat(this.getTarget().getName()) }
override string getAPrimaryQlClass() { result = "MethodCall" }
@@ -503,30 +479,6 @@ class OperatorCall extends Call, LateBindableExpr, @operator_invocation_expr {
override string getAPrimaryQlClass() { result = "OperatorCall" }
}
/**
* A call to an extension operator, for example `3 * s` on
* line 9 in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public static string operator *(int i, string s) { ... }
* }
* }
*
* class A {
* string M(string s) {
* return 3 * s;
* }
* }
* ```
*/
class ExtensionOperatorCall extends OperatorCall {
ExtensionOperatorCall() { this.getTarget() instanceof ExtensionOperator }
override string getAPrimaryQlClass() { result = "ExtensionOperatorCall" }
}
/**
* A call to a user-defined mutator operator, for example `a++` on
* line 7 in
@@ -706,44 +658,6 @@ class IndexerCall extends AccessorCall, IndexerAccessExpr {
override string getAPrimaryQlClass() { result = "IndexerCall" }
}
/**
* A call to an extension property accessor (via the property), for example
* `s.FirstChar` on line 9 in
*
* ```csharp
* static class MyExtensions {
* extension(string s) {
* public char FirstChar { get { ... } }
* }
* }
*
* class A {
* char M(string s) {
* return s.FirstChar;
* }
* }
* ```
*/
class ExtensionPropertyCall extends PropertyCall {
private ExtensionProperty prop;
ExtensionPropertyCall() { this.getProperty() = prop }
override Expr getArgument(int i) {
if prop.isStatic()
then result = super.getArgument(i)
else (
// Shift arguments as the qualifier is an explicit argument in the getter/setter.
i = 0 and
result = this.getQualifier()
or
result = super.getArgument(i - 1)
)
}
override string getAPrimaryQlClass() { result = "ExtensionPropertyCall" }
}
/**
* A call to an event accessor, for example the call to `add_Click`
* (defined on line 5) on line 12 in

View File

@@ -144,6 +144,7 @@ class SystemIComparableInterface extends SystemInterface {
result.getDeclaringType() = this and
result.hasName("CompareTo") and
result.getNumberOfParameters() = 1 and
result.getParameter(0).getType() instanceof ObjectType and
result.getReturnType() instanceof IntType
}
}
@@ -262,6 +263,7 @@ class SystemObjectClass extends SystemClass instanceof ObjectType {
result.getDeclaringType() = this and
result.hasName("Equals") and
result.getNumberOfParameters() = 1 and
result.getParameter(0).getType() instanceof ObjectType and
result.getReturnType() instanceof BoolType
}
@@ -271,6 +273,8 @@ class SystemObjectClass extends SystemClass instanceof ObjectType {
result.getDeclaringType() = this and
result.hasName("Equals") and
result.getNumberOfParameters() = 2 and
result.getParameter(0).getType() instanceof ObjectType and
result.getParameter(1).getType() instanceof ObjectType and
result.getReturnType() instanceof BoolType
}
@@ -280,6 +284,8 @@ class SystemObjectClass extends SystemClass instanceof ObjectType {
result.getDeclaringType() = this and
result.hasName("ReferenceEquals") and
result.getNumberOfParameters() = 2 and
result.getParameter(0).getType() instanceof ObjectType and
result.getParameter(1).getType() instanceof ObjectType and
result.getReturnType() instanceof BoolType
}

View File

@@ -1,33 +0,0 @@
/**
* INTERNAL: Do not use.
*
* Provides `Callable` classes, which are things that can be called
* such as methods and operators.
*/
private import semmle.code.csharp.Callable
private import semmle.code.csharp.Property
/**
* A callable that is declared as an extension.
*
* Either an extension method (`ExtensionMethod`), an extension operator
* (`ExtensionOperator`) or an extension accessor (`ExtensionAccessor`).
*/
abstract class ExtensionCallableImpl extends Callable {
/** Gets the type being extended by this method. */
pragma[noinline]
Type getExtendedType() { result = this.getDeclaringType().(ExtensionType).getExtendedType() }
override string getAPrimaryQlClass() { result = "ExtensionCallable" }
}
/**
* An extension method.
*
* Either a classic extension method (`ClassicExtensionMethod`) or an extension
* type extension method (`ExtensionTypeExtensionMethod`).
*/
abstract class ExtensionMethodImpl extends ExtensionCallableImpl, Method {
override string getAPrimaryQlClass() { result = "ExtensionMethod" }
}

View File

@@ -492,7 +492,6 @@ case @type.kind of
| 32 = @tuple_type
| 33 = @function_pointer_type
| 34 = @inline_array_type
| 35 = @extension_type
;
@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type;
@@ -503,7 +502,7 @@ case @type.kind of
@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type
| @uint_ptr_type | @tuple_type | @void_type | @inline_array_type;
@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type
| @dynamic_type | @extension_type;
| @dynamic_type;
@value_or_ref_type = @value_type | @ref_type;
typerefs(
@@ -542,10 +541,6 @@ function_pointer_return_type(
unique int function_pointer_id: @function_pointer_type ref,
int return_type_id: @type_or_ref ref);
extension_receiver_type(
unique int extension: @extension_type ref,
int receiver_type_id: @type_or_ref ref);
extend(
int sub: @type ref,
int super: @type_or_ref ref);
@@ -908,7 +903,7 @@ localvar_location(
unique int id: @local_variable ref,
int loc: @location ref);
@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type;
@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type;
#keyset[name, parent_id]
#keyset[index, parent_id]

View File

@@ -1,2 +0,0 @@
description: Add the relation `extension_receiver_type` and add the `extension_type` type kind.
compatibility: full

View File

@@ -1,502 +0,0 @@
models
edges
| extensions.cs:5:22:5:24 | obj : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | provenance | |
| extensions.cs:5:22:5:24 | obj : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | provenance | |
| extensions.cs:5:22:5:24 | obj : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | provenance | |
| extensions.cs:5:22:5:24 | obj : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | provenance | |
| extensions.cs:5:22:5:24 | obj : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | provenance | |
| extensions.cs:5:22:5:24 | obj : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | provenance | |
| extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:108:18:108:26 | access to property Prop1 : B | provenance | |
| extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:108:18:108:26 | access to property Prop1 : B | provenance | |
| extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | provenance | |
| extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | provenance | |
| extensions.cs:13:13:13:15 | value : B | extensions.cs:15:24:15:28 | access to parameter value | provenance | |
| extensions.cs:13:13:13:15 | value : B | extensions.cs:15:24:15:28 | access to parameter value | provenance | |
| extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:194:18:194:35 | access to property StaticProp1 : B | provenance | |
| extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:194:18:194:35 | access to property StaticProp1 : B | provenance | |
| extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | provenance | |
| extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | provenance | |
| extensions.cs:38:13:38:15 | value : B | extensions.cs:40:24:40:28 | access to parameter value | provenance | |
| extensions.cs:38:13:38:15 | value : B | extensions.cs:40:24:40:28 | access to parameter value | provenance | |
| extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:127:18:127:25 | call to method M1 : B | provenance | |
| extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:127:18:127:25 | call to method M1 : B | provenance | |
| extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:130:18:130:37 | call to method M1 : B | provenance | |
| extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:130:18:130:37 | call to method M1 : B | provenance | |
| extensions.cs:59:48:59:48 | a : B | extensions.cs:61:20:61:20 | access to parameter a | provenance | |
| extensions.cs:59:48:59:48 | a : B | extensions.cs:61:20:61:20 | access to parameter a | provenance | |
| extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:185:18:185:24 | call to operator - : B | provenance | |
| extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:185:18:185:24 | call to operator - : B | provenance | |
| extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:188:18:188:52 | call to operator - : B | provenance | |
| extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:188:18:188:52 | call to operator - : B | provenance | |
| extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | provenance | |
| extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | provenance | |
| extensions.cs:76:17:76:17 | b : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | provenance | |
| extensions.cs:76:17:76:17 | b : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | provenance | |
| extensions.cs:89:20:89:20 | t : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | provenance | |
| extensions.cs:89:20:89:20 | t : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | provenance | |
| extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | provenance | |
| extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | provenance | |
| extensions.cs:108:13:108:14 | access to local variable b1 : B | extensions.cs:109:14:109:15 | access to local variable b1 | provenance | |
| extensions.cs:108:13:108:14 | access to local variable b1 : B | extensions.cs:109:14:109:15 | access to local variable b1 | provenance | |
| extensions.cs:108:18:108:26 | access to property Prop1 : B | extensions.cs:108:13:108:14 | access to local variable b1 : B | provenance | |
| extensions.cs:108:18:108:26 | access to property Prop1 : B | extensions.cs:108:13:108:14 | access to local variable b1 : B | provenance | |
| extensions.cs:111:13:111:14 | access to local variable b2 : B | extensions.cs:112:14:112:15 | access to local variable b2 | provenance | |
| extensions.cs:111:13:111:14 | access to local variable b2 : B | extensions.cs:112:14:112:15 | access to local variable b2 | provenance | |
| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | extensions.cs:111:13:111:14 | access to local variable b2 : B | provenance | |
| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | extensions.cs:111:13:111:14 | access to local variable b2 : B | provenance | |
| extensions.cs:118:21:118:32 | call to method Source<B> : B | extensions.cs:13:13:13:15 | value : B | provenance | |
| extensions.cs:118:21:118:32 | call to method Source<B> : B | extensions.cs:13:13:13:15 | value : B | provenance | |
| extensions.cs:120:13:120:13 | access to local variable b : B | extensions.cs:121:37:121:37 | access to local variable b : B | provenance | |
| extensions.cs:120:13:120:13 | access to local variable b : B | extensions.cs:121:37:121:37 | access to local variable b : B | provenance | |
| extensions.cs:120:17:120:30 | call to method Source<B> : B | extensions.cs:120:13:120:13 | access to local variable b : B | provenance | |
| extensions.cs:120:17:120:30 | call to method Source<B> : B | extensions.cs:120:13:120:13 | access to local variable b : B | provenance | |
| extensions.cs:121:37:121:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | |
| extensions.cs:121:37:121:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | |
| extensions.cs:127:13:127:14 | access to local variable b1 : B | extensions.cs:128:14:128:15 | access to local variable b1 | provenance | |
| extensions.cs:127:13:127:14 | access to local variable b1 : B | extensions.cs:128:14:128:15 | access to local variable b1 | provenance | |
| extensions.cs:127:18:127:25 | call to method M1 : B | extensions.cs:127:13:127:14 | access to local variable b1 : B | provenance | |
| extensions.cs:127:18:127:25 | call to method M1 : B | extensions.cs:127:13:127:14 | access to local variable b1 : B | provenance | |
| extensions.cs:130:13:130:14 | access to local variable b2 : B | extensions.cs:131:14:131:15 | access to local variable b2 | provenance | |
| extensions.cs:130:13:130:14 | access to local variable b2 : B | extensions.cs:131:14:131:15 | access to local variable b2 | provenance | |
| extensions.cs:130:18:130:37 | call to method M1 : B | extensions.cs:130:13:130:14 | access to local variable b2 : B | provenance | |
| extensions.cs:130:18:130:37 | call to method M1 : B | extensions.cs:130:13:130:14 | access to local variable b2 : B | provenance | |
| extensions.cs:136:13:136:14 | access to local variable b1 : B | extensions.cs:137:9:137:10 | access to local variable b1 : B | provenance | |
| extensions.cs:136:13:136:14 | access to local variable b1 : B | extensions.cs:137:9:137:10 | access to local variable b1 : B | provenance | |
| extensions.cs:136:18:136:29 | call to method Source<B> : B | extensions.cs:136:13:136:14 | access to local variable b1 : B | provenance | |
| extensions.cs:136:18:136:29 | call to method Source<B> : B | extensions.cs:136:13:136:14 | access to local variable b1 : B | provenance | |
| extensions.cs:137:9:137:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:137:9:137:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:139:13:139:14 | access to local variable b2 : B | extensions.cs:140:25:140:26 | access to local variable b2 : B | provenance | |
| extensions.cs:139:13:139:14 | access to local variable b2 : B | extensions.cs:140:25:140:26 | access to local variable b2 : B | provenance | |
| extensions.cs:139:18:139:31 | call to method Source<B> : B | extensions.cs:139:13:139:14 | access to local variable b2 : B | provenance | |
| extensions.cs:139:18:139:31 | call to method Source<B> : B | extensions.cs:139:13:139:14 | access to local variable b2 : B | provenance | |
| extensions.cs:140:25:140:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:140:25:140:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:146:18:146:19 | access to local variable b1 : B | provenance | |
| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:146:18:146:19 | access to local variable b1 : B | provenance | |
| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:149:34:149:35 | access to local variable b1 : B | provenance | |
| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:149:34:149:35 | access to local variable b1 : B | provenance | |
| extensions.cs:145:18:145:29 | call to method Source<B> : B | extensions.cs:145:13:145:14 | access to local variable b1 : B | provenance | |
| extensions.cs:145:18:145:29 | call to method Source<B> : B | extensions.cs:145:13:145:14 | access to local variable b1 : B | provenance | |
| extensions.cs:146:13:146:14 | access to local variable b2 : B | extensions.cs:147:14:147:15 | access to local variable b2 | provenance | |
| extensions.cs:146:13:146:14 | access to local variable b2 : B | extensions.cs:147:14:147:15 | access to local variable b2 | provenance | |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:146:18:146:24 | call to method B1 : B | provenance | |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:146:18:146:24 | call to method B1 : B | provenance | |
| extensions.cs:146:18:146:24 | call to method B1 : B | extensions.cs:146:13:146:14 | access to local variable b2 : B | provenance | |
| extensions.cs:146:18:146:24 | call to method B1 : B | extensions.cs:146:13:146:14 | access to local variable b2 : B | provenance | |
| extensions.cs:149:13:149:14 | access to local variable b3 : B | extensions.cs:150:14:150:15 | access to local variable b3 | provenance | |
| extensions.cs:149:13:149:14 | access to local variable b3 : B | extensions.cs:150:14:150:15 | access to local variable b3 | provenance | |
| extensions.cs:149:18:149:36 | call to method B1 : B | extensions.cs:149:13:149:14 | access to local variable b3 : B | provenance | |
| extensions.cs:149:18:149:36 | call to method B1 : B | extensions.cs:149:13:149:14 | access to local variable b3 : B | provenance | |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:149:18:149:36 | call to method B1 : B | provenance | |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:149:18:149:36 | call to method B1 : B | provenance | |
| extensions.cs:155:13:155:14 | access to local variable b1 : B | extensions.cs:156:18:156:19 | access to local variable b1 : B | provenance | |
| extensions.cs:155:13:155:14 | access to local variable b1 : B | extensions.cs:156:18:156:19 | access to local variable b1 : B | provenance | |
| extensions.cs:155:18:155:29 | call to method Source<B> : B | extensions.cs:155:13:155:14 | access to local variable b1 : B | provenance | |
| extensions.cs:155:18:155:29 | call to method Source<B> : B | extensions.cs:155:13:155:14 | access to local variable b1 : B | provenance | |
| extensions.cs:156:18:156:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:156:18:156:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:158:13:158:14 | access to local variable b3 : B | extensions.cs:159:41:159:42 | access to local variable b3 : B | provenance | |
| extensions.cs:158:13:158:14 | access to local variable b3 : B | extensions.cs:159:41:159:42 | access to local variable b3 : B | provenance | |
| extensions.cs:158:18:158:31 | call to method Source<B> : B | extensions.cs:158:13:158:14 | access to local variable b3 : B | provenance | |
| extensions.cs:158:18:158:31 | call to method Source<B> : B | extensions.cs:158:13:158:14 | access to local variable b3 : B | provenance | |
| extensions.cs:159:41:159:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:159:41:159:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:164:13:164:14 | access to local variable b1 : B | extensions.cs:165:9:165:10 | access to local variable b1 : B | provenance | |
| extensions.cs:164:13:164:14 | access to local variable b1 : B | extensions.cs:165:9:165:10 | access to local variable b1 : B | provenance | |
| extensions.cs:164:18:164:29 | call to method Source<B> : B | extensions.cs:164:13:164:14 | access to local variable b1 : B | provenance | |
| extensions.cs:164:18:164:29 | call to method Source<B> : B | extensions.cs:164:13:164:14 | access to local variable b1 : B | provenance | |
| extensions.cs:165:9:165:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:165:9:165:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:167:13:167:14 | access to local variable b2 : B | extensions.cs:168:32:168:33 | access to local variable b2 : B | provenance | |
| extensions.cs:167:13:167:14 | access to local variable b2 : B | extensions.cs:168:32:168:33 | access to local variable b2 : B | provenance | |
| extensions.cs:167:18:167:31 | call to method Source<B> : B | extensions.cs:167:13:167:14 | access to local variable b2 : B | provenance | |
| extensions.cs:167:18:167:31 | call to method Source<B> : B | extensions.cs:167:13:167:14 | access to local variable b2 : B | provenance | |
| extensions.cs:168:32:168:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:168:32:168:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | |
| extensions.cs:173:13:173:14 | access to local variable b1 : B | extensions.cs:175:18:175:19 | access to local variable b1 : B | provenance | |
| extensions.cs:173:13:173:14 | access to local variable b1 : B | extensions.cs:175:18:175:19 | access to local variable b1 : B | provenance | |
| extensions.cs:173:18:173:29 | call to method Source<B> : B | extensions.cs:173:13:173:14 | access to local variable b1 : B | provenance | |
| extensions.cs:173:18:173:29 | call to method Source<B> : B | extensions.cs:173:13:173:14 | access to local variable b1 : B | provenance | |
| extensions.cs:175:18:175:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | |
| extensions.cs:175:18:175:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | |
| extensions.cs:177:13:177:14 | access to local variable b4 : B | extensions.cs:178:43:178:44 | access to local variable b4 : B | provenance | |
| extensions.cs:177:13:177:14 | access to local variable b4 : B | extensions.cs:178:43:178:44 | access to local variable b4 : B | provenance | |
| extensions.cs:177:18:177:31 | call to method Source<B> : B | extensions.cs:177:13:177:14 | access to local variable b4 : B | provenance | |
| extensions.cs:177:18:177:31 | call to method Source<B> : B | extensions.cs:177:13:177:14 | access to local variable b4 : B | provenance | |
| extensions.cs:178:43:178:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | |
| extensions.cs:178:43:178:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | |
| extensions.cs:185:13:185:14 | access to local variable b3 : B | extensions.cs:186:14:186:15 | access to local variable b3 | provenance | |
| extensions.cs:185:13:185:14 | access to local variable b3 : B | extensions.cs:186:14:186:15 | access to local variable b3 | provenance | |
| extensions.cs:185:18:185:24 | call to operator - : B | extensions.cs:185:13:185:14 | access to local variable b3 : B | provenance | |
| extensions.cs:185:18:185:24 | call to operator - : B | extensions.cs:185:13:185:14 | access to local variable b3 : B | provenance | |
| extensions.cs:188:13:188:14 | access to local variable b4 : B | extensions.cs:189:14:189:15 | access to local variable b4 | provenance | |
| extensions.cs:188:13:188:14 | access to local variable b4 : B | extensions.cs:189:14:189:15 | access to local variable b4 | provenance | |
| extensions.cs:188:18:188:52 | call to operator - : B | extensions.cs:188:13:188:14 | access to local variable b4 : B | provenance | |
| extensions.cs:188:18:188:52 | call to operator - : B | extensions.cs:188:13:188:14 | access to local variable b4 : B | provenance | |
| extensions.cs:194:13:194:14 | access to local variable b1 : B | extensions.cs:195:14:195:15 | access to local variable b1 | provenance | |
| extensions.cs:194:13:194:14 | access to local variable b1 : B | extensions.cs:195:14:195:15 | access to local variable b1 | provenance | |
| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | extensions.cs:194:13:194:14 | access to local variable b1 : B | provenance | |
| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | extensions.cs:194:13:194:14 | access to local variable b1 : B | provenance | |
| extensions.cs:197:13:197:14 | access to local variable b2 : B | extensions.cs:198:14:198:15 | access to local variable b2 | provenance | |
| extensions.cs:197:13:197:14 | access to local variable b2 : B | extensions.cs:198:14:198:15 | access to local variable b2 | provenance | |
| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:197:13:197:14 | access to local variable b2 : B | provenance | |
| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:197:13:197:14 | access to local variable b2 : B | provenance | |
| extensions.cs:203:13:203:14 | access to local variable b1 : B | extensions.cs:204:30:204:31 | access to local variable b1 : B | provenance | |
| extensions.cs:203:13:203:14 | access to local variable b1 : B | extensions.cs:204:30:204:31 | access to local variable b1 : B | provenance | |
| extensions.cs:203:18:203:30 | call to method Source<B> : B | extensions.cs:203:13:203:14 | access to local variable b1 : B | provenance | |
| extensions.cs:203:18:203:30 | call to method Source<B> : B | extensions.cs:203:13:203:14 | access to local variable b1 : B | provenance | |
| extensions.cs:204:30:204:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | |
| extensions.cs:204:30:204:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | |
| extensions.cs:206:13:206:14 | access to local variable b2 : B | extensions.cs:207:38:207:39 | access to local variable b2 : B | provenance | |
| extensions.cs:206:13:206:14 | access to local variable b2 : B | extensions.cs:207:38:207:39 | access to local variable b2 : B | provenance | |
| extensions.cs:206:18:206:31 | call to method Source<B> : B | extensions.cs:206:13:206:14 | access to local variable b2 : B | provenance | |
| extensions.cs:206:18:206:31 | call to method Source<B> : B | extensions.cs:206:13:206:14 | access to local variable b2 : B | provenance | |
| extensions.cs:207:38:207:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | |
| extensions.cs:207:38:207:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | |
| extensions.cs:212:13:212:14 | access to local variable b1 : B | extensions.cs:213:9:213:10 | access to local variable b1 : B | provenance | |
| extensions.cs:212:13:212:14 | access to local variable b1 : B | extensions.cs:213:9:213:10 | access to local variable b1 : B | provenance | |
| extensions.cs:212:18:212:30 | call to method Source<B> : B | extensions.cs:212:13:212:14 | access to local variable b1 : B | provenance | |
| extensions.cs:212:18:212:30 | call to method Source<B> : B | extensions.cs:212:13:212:14 | access to local variable b1 : B | provenance | |
| extensions.cs:213:9:213:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:213:9:213:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:215:13:215:14 | access to local variable b2 : B | extensions.cs:216:25:216:26 | access to local variable b2 : B | provenance | |
| extensions.cs:215:13:215:14 | access to local variable b2 : B | extensions.cs:216:25:216:26 | access to local variable b2 : B | provenance | |
| extensions.cs:215:18:215:31 | call to method Source<B> : B | extensions.cs:215:13:215:14 | access to local variable b2 : B | provenance | |
| extensions.cs:215:18:215:31 | call to method Source<B> : B | extensions.cs:215:13:215:14 | access to local variable b2 : B | provenance | |
| extensions.cs:216:25:216:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:216:25:216:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | |
| extensions.cs:221:13:221:14 | access to local variable b1 : B | extensions.cs:222:9:222:10 | access to local variable b1 : B | provenance | |
| extensions.cs:221:13:221:14 | access to local variable b1 : B | extensions.cs:222:9:222:10 | access to local variable b1 : B | provenance | |
| extensions.cs:221:18:221:30 | call to method Source<B> : B | extensions.cs:221:13:221:14 | access to local variable b1 : B | provenance | |
| extensions.cs:221:18:221:30 | call to method Source<B> : B | extensions.cs:221:13:221:14 | access to local variable b1 : B | provenance | |
| extensions.cs:222:9:222:10 | access to local variable b1 : B | extensions.cs:89:20:89:20 | t : B | provenance | |
| extensions.cs:222:9:222:10 | access to local variable b1 : B | extensions.cs:89:20:89:20 | t : B | provenance | |
| extensions.cs:224:13:224:14 | access to local variable b2 : B | extensions.cs:225:32:225:33 | access to local variable b2 : B | provenance | |
| extensions.cs:224:13:224:14 | access to local variable b2 : B | extensions.cs:225:32:225:33 | access to local variable b2 : B | provenance | |
| extensions.cs:224:18:224:31 | call to method Source<B> : B | extensions.cs:224:13:224:14 | access to local variable b2 : B | provenance | |
| extensions.cs:224:18:224:31 | call to method Source<B> : B | extensions.cs:224:13:224:14 | access to local variable b2 : B | provenance | |
| extensions.cs:225:32:225:33 | access to local variable b2 : B | extensions.cs:89:20:89:20 | t : B | provenance | |
| extensions.cs:225:32:225:33 | access to local variable b2 : B | extensions.cs:89:20:89:20 | t : B | provenance | |
| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:232:32:232:33 | access to local variable b1 : B | provenance | |
| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:232:32:232:33 | access to local variable b1 : B | provenance | |
| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:235:46:235:47 | access to local variable b1 : B | provenance | |
| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:235:46:235:47 | access to local variable b1 : B | provenance | |
| extensions.cs:231:18:231:30 | call to method Source<B> : B | extensions.cs:231:13:231:14 | access to local variable b1 : B | provenance | |
| extensions.cs:231:18:231:30 | call to method Source<B> : B | extensions.cs:231:13:231:14 | access to local variable b1 : B | provenance | |
| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:14:233:15 | access to local variable b2 | provenance | |
| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:14:233:15 | access to local variable b2 | provenance | |
| extensions.cs:232:18:232:34 | call to method GenericM2<B> : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | |
| extensions.cs:232:18:232:34 | call to method GenericM2<B> : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:232:18:232:34 | call to method GenericM2<B> : B | provenance | |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:232:18:232:34 | call to method GenericM2<B> : B | provenance | |
| extensions.cs:235:13:235:14 | access to local variable b3 : B | extensions.cs:236:14:236:15 | access to local variable b3 | provenance | |
| extensions.cs:235:13:235:14 | access to local variable b3 : B | extensions.cs:236:14:236:15 | access to local variable b3 | provenance | |
| extensions.cs:235:18:235:48 | call to method GenericM2<B> : B | extensions.cs:235:13:235:14 | access to local variable b3 : B | provenance | |
| extensions.cs:235:18:235:48 | call to method GenericM2<B> : B | extensions.cs:235:13:235:14 | access to local variable b3 : B | provenance | |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:235:18:235:48 | call to method GenericM2<B> : B | provenance | |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:235:18:235:48 | call to method GenericM2<B> : B | provenance | |
nodes
| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B |
| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B |
| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B |
| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B |
| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B |
| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B |
| extensions.cs:11:24:11:37 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:11:24:11:37 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:13:13:13:15 | value : B | semmle.label | value : B |
| extensions.cs:13:13:13:15 | value : B | semmle.label | value : B |
| extensions.cs:15:24:15:28 | access to parameter value | semmle.label | access to parameter value |
| extensions.cs:15:24:15:28 | access to parameter value | semmle.label | access to parameter value |
| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj |
| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj |
| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj |
| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj |
| extensions.cs:36:24:36:38 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:36:24:36:38 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:38:13:38:15 | value : B | semmle.label | value : B |
| extensions.cs:38:13:38:15 | value : B | semmle.label | value : B |
| extensions.cs:40:24:40:28 | access to parameter value | semmle.label | access to parameter value |
| extensions.cs:40:24:40:28 | access to parameter value | semmle.label | access to parameter value |
| extensions.cs:46:20:46:33 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:46:20:46:33 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj |
| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj |
| extensions.cs:59:48:59:48 | a : B | semmle.label | a : B |
| extensions.cs:59:48:59:48 | a : B | semmle.label | a : B |
| extensions.cs:61:20:61:20 | access to parameter a | semmle.label | access to parameter a |
| extensions.cs:61:20:61:20 | access to parameter a | semmle.label | access to parameter a |
| extensions.cs:67:20:67:33 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:67:20:67:33 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B |
| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B |
| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B |
| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B |
| extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | semmle.label | access to extension synthetic parameter b : B |
| extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | semmle.label | access to extension synthetic parameter b : B |
| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | semmle.label | access to extension synthetic parameter b |
| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | semmle.label | access to extension synthetic parameter b |
| extensions.cs:89:20:89:20 | t : B | semmle.label | t : B |
| extensions.cs:89:20:89:20 | t : B | semmle.label | t : B |
| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t |
| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t |
| extensions.cs:96:33:96:37 | other : B | semmle.label | other : B |
| extensions.cs:96:33:96:37 | other : B | semmle.label | other : B |
| extensions.cs:98:20:98:24 | access to parameter other : B | semmle.label | access to parameter other : B |
| extensions.cs:98:20:98:24 | access to parameter other : B | semmle.label | access to parameter other : B |
| extensions.cs:108:13:108:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:108:13:108:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:108:18:108:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B |
| extensions.cs:108:18:108:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B |
| extensions.cs:109:14:109:15 | access to local variable b1 | semmle.label | access to local variable b1 |
| extensions.cs:109:14:109:15 | access to local variable b1 | semmle.label | access to local variable b1 |
| extensions.cs:111:13:111:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:111:13:111:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B |
| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B |
| extensions.cs:112:14:112:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:112:14:112:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:118:21:118:32 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:118:21:118:32 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:120:13:120:13 | access to local variable b : B | semmle.label | access to local variable b : B |
| extensions.cs:120:13:120:13 | access to local variable b : B | semmle.label | access to local variable b : B |
| extensions.cs:120:17:120:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:120:17:120:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:121:37:121:37 | access to local variable b : B | semmle.label | access to local variable b : B |
| extensions.cs:121:37:121:37 | access to local variable b : B | semmle.label | access to local variable b : B |
| extensions.cs:127:13:127:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:127:13:127:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:127:18:127:25 | call to method M1 : B | semmle.label | call to method M1 : B |
| extensions.cs:127:18:127:25 | call to method M1 : B | semmle.label | call to method M1 : B |
| extensions.cs:128:14:128:15 | access to local variable b1 | semmle.label | access to local variable b1 |
| extensions.cs:128:14:128:15 | access to local variable b1 | semmle.label | access to local variable b1 |
| extensions.cs:130:13:130:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:130:13:130:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:130:18:130:37 | call to method M1 : B | semmle.label | call to method M1 : B |
| extensions.cs:130:18:130:37 | call to method M1 : B | semmle.label | call to method M1 : B |
| extensions.cs:131:14:131:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:131:14:131:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:136:13:136:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:136:13:136:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:136:18:136:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:136:18:136:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:137:9:137:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:137:9:137:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:139:13:139:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:139:13:139:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:139:18:139:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:139:18:139:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:140:25:140:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:140:25:140:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:145:13:145:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:145:13:145:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:145:18:145:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:145:18:145:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:146:13:146:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:146:13:146:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:146:18:146:24 | call to method B1 : B | semmle.label | call to method B1 : B |
| extensions.cs:146:18:146:24 | call to method B1 : B | semmle.label | call to method B1 : B |
| extensions.cs:147:14:147:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:147:14:147:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:149:13:149:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:149:13:149:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:149:18:149:36 | call to method B1 : B | semmle.label | call to method B1 : B |
| extensions.cs:149:18:149:36 | call to method B1 : B | semmle.label | call to method B1 : B |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:150:14:150:15 | access to local variable b3 | semmle.label | access to local variable b3 |
| extensions.cs:150:14:150:15 | access to local variable b3 | semmle.label | access to local variable b3 |
| extensions.cs:155:13:155:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:155:13:155:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:155:18:155:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:155:18:155:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:156:18:156:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:156:18:156:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:158:13:158:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:158:13:158:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:158:18:158:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:158:18:158:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:159:41:159:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:159:41:159:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:164:13:164:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:164:13:164:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:164:18:164:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:164:18:164:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:165:9:165:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:165:9:165:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:167:13:167:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:167:13:167:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:167:18:167:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:167:18:167:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:168:32:168:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:168:32:168:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:173:13:173:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:173:13:173:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:173:18:173:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:173:18:173:29 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:175:18:175:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:175:18:175:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:177:13:177:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B |
| extensions.cs:177:13:177:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B |
| extensions.cs:177:18:177:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:177:18:177:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:178:43:178:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B |
| extensions.cs:178:43:178:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B |
| extensions.cs:185:13:185:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:185:13:185:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:185:18:185:24 | call to operator - : B | semmle.label | call to operator - : B |
| extensions.cs:185:18:185:24 | call to operator - : B | semmle.label | call to operator - : B |
| extensions.cs:186:14:186:15 | access to local variable b3 | semmle.label | access to local variable b3 |
| extensions.cs:186:14:186:15 | access to local variable b3 | semmle.label | access to local variable b3 |
| extensions.cs:188:13:188:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B |
| extensions.cs:188:13:188:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B |
| extensions.cs:188:18:188:52 | call to operator - : B | semmle.label | call to operator - : B |
| extensions.cs:188:18:188:52 | call to operator - : B | semmle.label | call to operator - : B |
| extensions.cs:189:14:189:15 | access to local variable b4 | semmle.label | access to local variable b4 |
| extensions.cs:189:14:189:15 | access to local variable b4 | semmle.label | access to local variable b4 |
| extensions.cs:194:13:194:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:194:13:194:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B |
| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B |
| extensions.cs:195:14:195:15 | access to local variable b1 | semmle.label | access to local variable b1 |
| extensions.cs:195:14:195:15 | access to local variable b1 | semmle.label | access to local variable b1 |
| extensions.cs:197:13:197:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:197:13:197:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B |
| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B |
| extensions.cs:198:14:198:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:198:14:198:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:203:13:203:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:203:13:203:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:203:18:203:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:203:18:203:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:204:30:204:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:204:30:204:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:206:13:206:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:206:13:206:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:206:18:206:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:206:18:206:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:207:38:207:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:207:38:207:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:212:13:212:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:212:13:212:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:212:18:212:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:212:18:212:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:213:9:213:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:213:9:213:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:215:13:215:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:215:13:215:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:215:18:215:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:215:18:215:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:216:25:216:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:216:25:216:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:221:13:221:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:221:13:221:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:221:18:221:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:221:18:221:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:222:9:222:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:222:9:222:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:224:13:224:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:224:13:224:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:224:18:224:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:224:18:224:31 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:225:32:225:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:225:32:225:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:231:13:231:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:231:13:231:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:231:18:231:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:231:18:231:30 | call to method Source<B> : B | semmle.label | call to method Source<B> : B |
| extensions.cs:232:13:232:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:232:13:232:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B |
| extensions.cs:232:18:232:34 | call to method GenericM2<B> : B | semmle.label | call to method GenericM2<B> : B |
| extensions.cs:232:18:232:34 | call to method GenericM2<B> : B | semmle.label | call to method GenericM2<B> : B |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:233:14:233:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:233:14:233:15 | access to local variable b2 | semmle.label | access to local variable b2 |
| extensions.cs:235:13:235:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:235:13:235:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B |
| extensions.cs:235:18:235:48 | call to method GenericM2<B> : B | semmle.label | call to method GenericM2<B> : B |
| extensions.cs:235:18:235:48 | call to method GenericM2<B> : B | semmle.label | call to method GenericM2<B> : B |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B |
| extensions.cs:236:14:236:15 | access to local variable b3 | semmle.label | access to local variable b3 |
| extensions.cs:236:14:236:15 | access to local variable b3 | semmle.label | access to local variable b3 |
subpaths
| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:146:18:146:24 | call to method B1 : B |
| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:146:18:146:24 | call to method B1 : B |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:149:18:149:36 | call to method B1 : B |
| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:149:18:149:36 | call to method B1 : B |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:232:18:232:34 | call to method GenericM2<B> : B |
| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:232:18:232:34 | call to method GenericM2<B> : B |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:235:18:235:48 | call to method GenericM2<B> : B |
| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:235:18:235:48 | call to method GenericM2<B> : B |
testFailures
#select
| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:118:21:118:32 | call to method Source<B> : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:118:21:118:32 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:118:21:118:32 | call to method Source<B> : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:118:21:118:32 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:120:17:120:30 | call to method Source<B> : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:120:17:120:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:120:17:120:30 | call to method Source<B> : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:120:17:120:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:155:18:155:29 | call to method Source<B> : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:155:18:155:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:155:18:155:29 | call to method Source<B> : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:155:18:155:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:158:18:158:31 | call to method Source<B> : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:158:18:158:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:158:18:158:31 | call to method Source<B> : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:158:18:158:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:164:18:164:29 | call to method Source<B> : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:164:18:164:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:164:18:164:29 | call to method Source<B> : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:164:18:164:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:167:18:167:31 | call to method Source<B> : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:167:18:167:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:167:18:167:31 | call to method Source<B> : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:167:18:167:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:203:18:203:30 | call to method Source<B> : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:203:18:203:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:203:18:203:30 | call to method Source<B> : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:203:18:203:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:206:18:206:31 | call to method Source<B> : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:206:18:206:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:206:18:206:31 | call to method Source<B> : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:206:18:206:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:136:18:136:29 | call to method Source<B> : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:136:18:136:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:136:18:136:29 | call to method Source<B> : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:136:18:136:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:139:18:139:31 | call to method Source<B> : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:139:18:139:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:139:18:139:31 | call to method Source<B> : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:139:18:139:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:173:18:173:29 | call to method Source<B> : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:173:18:173:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:173:18:173:29 | call to method Source<B> : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:173:18:173:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:177:18:177:31 | call to method Source<B> : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:177:18:177:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:177:18:177:31 | call to method Source<B> : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:177:18:177:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:212:18:212:30 | call to method Source<B> : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:212:18:212:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:212:18:212:30 | call to method Source<B> : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:212:18:212:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:215:18:215:31 | call to method Source<B> : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:215:18:215:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:215:18:215:31 | call to method Source<B> : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:215:18:215:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:221:18:221:30 | call to method Source<B> : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:221:18:221:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:221:18:221:30 | call to method Source<B> : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:221:18:221:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:224:18:224:31 | call to method Source<B> : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:224:18:224:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:224:18:224:31 | call to method Source<B> : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:224:18:224:31 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:109:14:109:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:109:14:109:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:109:14:109:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:109:14:109:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:112:14:112:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:112:14:112:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:112:14:112:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source<B> : B | extensions.cs:112:14:112:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:128:14:128:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:128:14:128:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:128:14:128:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:128:14:128:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:131:14:131:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:131:14:131:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:131:14:131:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source<B> : B | extensions.cs:131:14:131:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:147:14:147:15 | access to local variable b2 | extensions.cs:145:18:145:29 | call to method Source<B> : B | extensions.cs:147:14:147:15 | access to local variable b2 | $@ | extensions.cs:145:18:145:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:147:14:147:15 | access to local variable b2 | extensions.cs:145:18:145:29 | call to method Source<B> : B | extensions.cs:147:14:147:15 | access to local variable b2 | $@ | extensions.cs:145:18:145:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:150:14:150:15 | access to local variable b3 | extensions.cs:145:18:145:29 | call to method Source<B> : B | extensions.cs:150:14:150:15 | access to local variable b3 | $@ | extensions.cs:145:18:145:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:150:14:150:15 | access to local variable b3 | extensions.cs:145:18:145:29 | call to method Source<B> : B | extensions.cs:150:14:150:15 | access to local variable b3 | $@ | extensions.cs:145:18:145:29 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:186:14:186:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:186:14:186:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:186:14:186:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:186:14:186:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:189:14:189:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:189:14:189:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:189:14:189:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source<B> : B | extensions.cs:189:14:189:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:195:14:195:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:195:14:195:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:195:14:195:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:195:14:195:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:198:14:198:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:198:14:198:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:198:14:198:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source<B> : B | extensions.cs:198:14:198:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:233:14:233:15 | access to local variable b2 | extensions.cs:231:18:231:30 | call to method Source<B> : B | extensions.cs:233:14:233:15 | access to local variable b2 | $@ | extensions.cs:231:18:231:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:233:14:233:15 | access to local variable b2 | extensions.cs:231:18:231:30 | call to method Source<B> : B | extensions.cs:233:14:233:15 | access to local variable b2 | $@ | extensions.cs:231:18:231:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:236:14:236:15 | access to local variable b3 | extensions.cs:231:18:231:30 | call to method Source<B> : B | extensions.cs:236:14:236:15 | access to local variable b3 | $@ | extensions.cs:231:18:231:30 | call to method Source<B> : B | call to method Source<B> : B |
| extensions.cs:236:14:236:15 | access to local variable b3 | extensions.cs:231:18:231:30 | call to method Source<B> : B | extensions.cs:236:14:236:15 | access to local variable b3 | $@ | extensions.cs:231:18:231:30 | call to method Source<B> : B | call to method Source<B> : B |

View File

@@ -1,12 +0,0 @@
/**
* @kind path-problem
*/
import csharp
import utils.test.InlineFlowTest
import DefaultFlowTest
import PathGraph
from PathNode source, PathNode sink
where flowPath(source, sink)
select sink, source, sink, "$@", source, source.toString()

View File

@@ -1,243 +0,0 @@
using System;
public static class MyExtensions
{
extension(object obj)
{
public B Prop1
{
get
{
return A.Source<B>(1);
}
set
{
A.Sink(value); // $ hasValueFlow=2 hasValueFlow=102
}
}
public B Prop2
{
get
{
A.Sink(obj); // $ hasValueFlow=6 hasValueFlow=106
return new B();
}
set
{
A.Sink(obj); // $ hasValueFlow=7 hasValueFlow=107
}
}
public static B StaticProp1
{
get
{
return A.Source<B>(10);
}
set
{
A.Sink(value); // $ hasValueFlow=11 hasValueFlow=111
}
}
public B M1()
{
return A.Source<B>(3);
}
public void M2()
{
A.Sink(obj); // $ hasValueFlow=4 hasValueFlow=104
}
public static B M3(B b)
{
return b;
}
public static object operator +(object a, object b)
{
A.Sink(a); // $ hasValueFlow=8 hasValueFlow=108
return new object();
}
public static object operator -(object a, object b)
{
return A.Source<B>(9);
}
public T GenericMethod<T>(T t)
{
return t;
}
}
extension(B b)
{
public B B1()
{
return b;
}
public void B2()
{
A.Sink(b); // $ hasValueFlow=12 hasValueFlow=112
}
}
extension<T>(T t) where T : class
{
public void GenericM1()
{
A.Sink(t); // $ hasValueFlow=13 hasValueFlow=113
}
public S GenericM2<S>(S other)
{
return other;
}
}
}
public class A
{
public void Test1()
{
var obj = new object();
var b1 = obj.Prop1;
Sink(b1); // $ hasValueFlow=1
var b2 = MyExtensions.get_Prop1(obj);
Sink(b2); // $ hasValueFlow=1
}
public void Test2()
{
var obj = new object();
obj.Prop1 = Source<B>(2);
var b = Source<B>(102);
MyExtensions.set_Prop1(obj, b);
}
public void Test3()
{
var obj = new object();
var b1 = obj.M1();
Sink(b1); // $ hasValueFlow=3
var b2 = MyExtensions.M1(obj);
Sink(b2); // $ hasValueFlow=3
}
public void Test4()
{
var b1 = Source<B>(4);
b1.M2();
var b2 = Source<B>(104);
MyExtensions.M2(b2);
}
public void Test5()
{
var b1 = Source<B>(5);
var b2 = b1.B1();
Sink(b2); // $ hasValueFlow=5
var b3 = MyExtensions.B1(b1);
Sink(b3); // $ hasValueFlow=5
}
public void Test6()
{
var b1 = Source<B>(6);
var b2 = b1.Prop2;
var b3 = Source<B>(106);
var b4 = MyExtensions.get_Prop2(b3);
}
public void Test7()
{
var b1 = Source<B>(7);
b1.Prop2 = new B();
var b2 = Source<B>(107);
MyExtensions.set_Prop2(b2, new B());
}
public void Test8()
{
var b1 = Source<B>(8);
var b2 = Source<B>(1);
var b3 = b1 + b2;
var b4 = Source<B>(108);
var b5 = MyExtensions.op_Addition(b4, b2);
}
public void Test9()
{
var b1 = Source<B>(0);
var b2 = Source<B>(1);
var b3 = b1 - b2;
Sink(b3); // $ hasValueFlow=9
var b4 = MyExtensions.op_Subtraction(b1, b2);
Sink(b4); // $ hasValueFlow=9
}
public void Test10()
{
var b1 = object.StaticProp1;
Sink(b1); // $ hasValueFlow=10
var b2 = MyExtensions.get_StaticProp1();
Sink(b2); // $ hasValueFlow=10
}
public void Test11()
{
var b1 = Source<B>(11);
object.StaticProp1 = b1;
var b2 = Source<B>(111);
MyExtensions.set_StaticProp1(b2);
}
public void Test12()
{
var b1 = Source<B>(12);
b1.B2();
var b2 = Source<B>(112);
MyExtensions.B2(b2);
}
public void Test13()
{
var b1 = Source<B>(13);
b1.GenericM1();
var b2 = Source<B>(113);
MyExtensions.GenericM1(b2);
}
public void Test14()
{
var obj = new object();
var b1 = Source<B>(14);
var b2 = obj.GenericM2(b1);
Sink(b2); // $ hasValueFlow=14
var b3 = MyExtensions.GenericM2(obj, b1);
Sink(b3); // $ hasValueFlow=14
}
public static T Source<T>(object source) => throw null;
public static void Sink(object o) { }
}
public class B { }

View File

@@ -348,98 +348,4 @@ namespace My.Qltest
static void Sink(object o) { }
}
// Test extensions
public static class TestExtensions
{
extension(object o)
{
public object Method1() => throw null;
public static object StaticMethod1(object s) => throw null;
public object Property1 { get { throw null; } set { throw null; } }
}
extension<T>(T t) where T : class
{
public T GenericMethod1() => throw null;
public static T GenericStaticMethod1(T t0) => throw null;
public T GenericProperty1 { get { throw null; } set { throw null; } }
}
}
public class M
{
public void M1()
{
var obj = new object();
var o1 = obj.Method1();
Sink(o1);
var o2 = TestExtensions.Method1(obj);
Sink(o2);
}
public void M2()
{
var obj = new object();
var o1 = object.StaticMethod1(obj);
Sink(o1);
var o2 = TestExtensions.StaticMethod1(obj);
Sink(o2);
}
public void M3(object o)
{
var obj = new object();
o.Property1 = obj;
var o1 = o.Property1;
Sink(o1);
}
public void M4(object o)
{
var obj = new object();
TestExtensions.set_Property1(o, obj);
var o1 = TestExtensions.get_Property1(o);
Sink(o1);
}
public void M5()
{
var obj = new object();
var o1 = obj.GenericMethod1();
Sink(o1);
var o2 = TestExtensions.GenericMethod1(obj);
Sink(o2);
}
public void M6()
{
var obj = new object();
var o1 = object.GenericStaticMethod1(obj);
Sink(o1);
var o2 = TestExtensions.GenericStaticMethod1(obj);
Sink(o2);
}
public void M7(object o)
{
var obj = new object();
o.GenericProperty1 = obj;
var o1 = o.GenericProperty1;
Sink(o1);
}
public void M8(object o)
{
var obj = new object();
TestExtensions.set_GenericProperty1(o, obj);
var o1 = TestExtensions.get_GenericProperty1(o);
Sink(o1);
}
static void Sink(object o) { }
}
}

View File

@@ -32,14 +32,6 @@ models
| 31 | Summary: My.Qltest; Library; false; GetValue; (); ; Argument[this].SyntheticField[X]; ReturnValue; value; dfc-generated |
| 32 | Summary: My.Qltest; Library; false; MixedFlowArgs; (System.Object,System.Object); ; Argument[1]; ReturnValue; value; manual |
| 33 | Summary: My.Qltest; Library; false; SetValue; (System.Object); ; Argument[0]; Argument[this].SyntheticField[X]; value; dfc-generated |
| 34 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; Method1; (System.Object); ; Argument[0]; ReturnValue; value; manual |
| 35 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; StaticMethod1; (System.Object); ; Argument[0]; ReturnValue; value; manual |
| 36 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; get_Property1; (System.Object); ; Argument[0].SyntheticField[TestExtensions.Property1]; ReturnValue; value; manual |
| 37 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; set_Property1; (System.Object,System.Object); ; Argument[1]; Argument[0].SyntheticField[TestExtensions.Property1]; value; manual |
| 38 | Summary: My.Qltest; TestExtensions+extension(T)<T>; false; GenericMethod1; (T); ; Argument[0]; ReturnValue; value; manual |
| 39 | Summary: My.Qltest; TestExtensions+extension(T)<T>; false; GenericStaticMethod1; (T); ; Argument[0]; ReturnValue; value; manual |
| 40 | Summary: My.Qltest; TestExtensions+extension(T)<T>; false; get_GenericProperty1; (T); ; Argument[0].SyntheticField[TestExtensions.GenericProperty1]; ReturnValue; value; manual |
| 41 | Summary: My.Qltest; TestExtensions+extension(T)<T>; false; set_GenericProperty1; (T,T); ; Argument[1]; Argument[0].SyntheticField[TestExtensions.GenericProperty1]; value; manual |
edges
| ExternalFlow.cs:9:20:9:23 | access to local variable arg1 : Object | ExternalFlow.cs:10:29:10:32 | access to local variable arg1 : Object | provenance | |
| ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | ExternalFlow.cs:9:20:9:23 | access to local variable arg1 : Object | provenance | |
@@ -158,73 +150,6 @@ edges
| ExternalFlow.cs:344:13:344:13 | [post] access to local variable l : Library [synthetic X] : Object | ExternalFlow.cs:345:18:345:18 | access to local variable l : Library [synthetic X] : Object | provenance | |
| ExternalFlow.cs:344:24:344:24 | access to local variable o : Object | ExternalFlow.cs:344:13:344:13 | [post] access to local variable l : Library [synthetic X] : Object | provenance | MaD:33 |
| ExternalFlow.cs:345:18:345:18 | access to local variable l : Library [synthetic X] : Object | ExternalFlow.cs:345:18:345:29 | call to method GetValue | provenance | MaD:31 |
| ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | ExternalFlow.cs:374:22:374:24 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | ExternalFlow.cs:377:45:377:47 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:374:17:374:18 | access to local variable o1 : Object | ExternalFlow.cs:375:18:375:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:374:22:374:24 | access to local variable obj : Object | ExternalFlow.cs:374:22:374:34 | call to method Method1 : Object | provenance | MaD:34 |
| ExternalFlow.cs:374:22:374:34 | call to method Method1 : Object | ExternalFlow.cs:374:17:374:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:377:17:377:18 | access to local variable o2 : Object | ExternalFlow.cs:378:18:378:19 | access to local variable o2 | provenance | |
| ExternalFlow.cs:377:22:377:48 | call to method Method1 : Object | ExternalFlow.cs:377:17:377:18 | access to local variable o2 : Object | provenance | |
| ExternalFlow.cs:377:45:377:47 | access to local variable obj : Object | ExternalFlow.cs:377:22:377:48 | call to method Method1 : Object | provenance | MaD:34 |
| ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | ExternalFlow.cs:384:43:384:45 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | ExternalFlow.cs:387:51:387:53 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:384:17:384:18 | access to local variable o1 : Object | ExternalFlow.cs:385:18:385:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:384:22:384:46 | call to method StaticMethod1 : Object | ExternalFlow.cs:384:17:384:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:384:43:384:45 | access to local variable obj : Object | ExternalFlow.cs:384:22:384:46 | call to method StaticMethod1 : Object | provenance | MaD:35 |
| ExternalFlow.cs:387:17:387:18 | access to local variable o2 : Object | ExternalFlow.cs:388:18:388:19 | access to local variable o2 | provenance | |
| ExternalFlow.cs:387:22:387:54 | call to method StaticMethod1 : Object | ExternalFlow.cs:387:17:387:18 | access to local variable o2 : Object | provenance | |
| ExternalFlow.cs:387:51:387:53 | access to local variable obj : Object | ExternalFlow.cs:387:22:387:54 | call to method StaticMethod1 : Object | provenance | MaD:35 |
| ExternalFlow.cs:393:17:393:19 | access to local variable obj : Object | ExternalFlow.cs:394:27:394:29 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | ExternalFlow.cs:393:17:393:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:394:13:394:13 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:395:22:395:22 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | |
| ExternalFlow.cs:394:27:394:29 | access to local variable obj : Object | ExternalFlow.cs:394:13:394:13 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | MaD:37 |
| ExternalFlow.cs:395:17:395:18 | access to local variable o1 : Object | ExternalFlow.cs:396:18:396:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:395:22:395:22 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:395:22:395:32 | access to property Property1 : Object | provenance | MaD:36 |
| ExternalFlow.cs:395:22:395:32 | access to property Property1 : Object | ExternalFlow.cs:395:17:395:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:401:17:401:19 | access to local variable obj : Object | ExternalFlow.cs:402:45:402:47 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | ExternalFlow.cs:401:17:401:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:402:42:402:42 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:403:51:403:51 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | |
| ExternalFlow.cs:402:45:402:47 | access to local variable obj : Object | ExternalFlow.cs:402:42:402:42 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | MaD:37 |
| ExternalFlow.cs:403:17:403:18 | access to local variable o1 : Object | ExternalFlow.cs:404:18:404:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:403:22:403:52 | call to extension accessor get_Property1 : Object | ExternalFlow.cs:403:17:403:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:403:51:403:51 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:403:22:403:52 | call to extension accessor get_Property1 : Object | provenance | MaD:36 |
| ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | ExternalFlow.cs:410:22:410:24 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | ExternalFlow.cs:413:52:413:54 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:410:17:410:18 | access to local variable o1 : Object | ExternalFlow.cs:411:18:411:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:410:22:410:24 | access to local variable obj : Object | ExternalFlow.cs:410:22:410:41 | call to method GenericMethod1 : Object | provenance | MaD:38 |
| ExternalFlow.cs:410:22:410:41 | call to method GenericMethod1 : Object | ExternalFlow.cs:410:17:410:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:413:17:413:18 | access to local variable o2 : Object | ExternalFlow.cs:414:18:414:19 | access to local variable o2 | provenance | |
| ExternalFlow.cs:413:22:413:55 | call to method GenericMethod1 : Object | ExternalFlow.cs:413:17:413:18 | access to local variable o2 : Object | provenance | |
| ExternalFlow.cs:413:52:413:54 | access to local variable obj : Object | ExternalFlow.cs:413:22:413:55 | call to method GenericMethod1 : Object | provenance | MaD:38 |
| ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | ExternalFlow.cs:420:50:420:52 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | ExternalFlow.cs:423:58:423:60 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:420:17:420:18 | access to local variable o1 : Object | ExternalFlow.cs:421:18:421:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:420:22:420:53 | call to method GenericStaticMethod1 : Object | ExternalFlow.cs:420:17:420:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:420:50:420:52 | access to local variable obj : Object | ExternalFlow.cs:420:22:420:53 | call to method GenericStaticMethod1 : Object | provenance | MaD:39 |
| ExternalFlow.cs:423:17:423:18 | access to local variable o2 : Object | ExternalFlow.cs:424:18:424:19 | access to local variable o2 | provenance | |
| ExternalFlow.cs:423:22:423:61 | call to method GenericStaticMethod1 : Object | ExternalFlow.cs:423:17:423:18 | access to local variable o2 : Object | provenance | |
| ExternalFlow.cs:423:58:423:60 | access to local variable obj : Object | ExternalFlow.cs:423:22:423:61 | call to method GenericStaticMethod1 : Object | provenance | MaD:39 |
| ExternalFlow.cs:429:17:429:19 | access to local variable obj : Object | ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | ExternalFlow.cs:429:17:429:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [property GenericProperty1] : Object | ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [property GenericProperty1] : Object | provenance | |
| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | |
| ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [property GenericProperty1] : Object | provenance | |
| ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | MaD:41 |
| ExternalFlow.cs:431:17:431:18 | access to local variable o1 : Object | ExternalFlow.cs:432:18:432:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [property GenericProperty1] : Object | ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | provenance | |
| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | provenance | MaD:40 |
| ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | ExternalFlow.cs:431:17:431:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:437:17:437:19 | access to local variable obj : Object | ExternalFlow.cs:438:52:438:54 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | ExternalFlow.cs:437:17:437:19 | access to local variable obj : Object | provenance | |
| ExternalFlow.cs:438:49:438:49 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:439:58:439:58 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | |
| ExternalFlow.cs:438:52:438:54 | access to local variable obj : Object | ExternalFlow.cs:438:49:438:49 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | MaD:41 |
| ExternalFlow.cs:439:17:439:18 | access to local variable o1 : Object | ExternalFlow.cs:440:18:440:19 | access to local variable o1 | provenance | |
| ExternalFlow.cs:439:22:439:59 | call to extension accessor get_GenericProperty1 : Object | ExternalFlow.cs:439:17:439:18 | access to local variable o1 : Object | provenance | |
| ExternalFlow.cs:439:58:439:58 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:439:22:439:59 | call to extension accessor get_GenericProperty1 : Object | provenance | MaD:40 |
nodes
| ExternalFlow.cs:9:20:9:23 | access to local variable arg1 : Object | semmle.label | access to local variable arg1 : Object |
| ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
@@ -369,80 +294,6 @@ nodes
| ExternalFlow.cs:344:24:344:24 | access to local variable o : Object | semmle.label | access to local variable o : Object |
| ExternalFlow.cs:345:18:345:18 | access to local variable l : Library [synthetic X] : Object | semmle.label | access to local variable l : Library [synthetic X] : Object |
| ExternalFlow.cs:345:18:345:29 | call to method GetValue | semmle.label | call to method GetValue |
| ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:374:17:374:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:374:22:374:24 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:374:22:374:34 | call to method Method1 : Object | semmle.label | call to method Method1 : Object |
| ExternalFlow.cs:375:18:375:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:377:17:377:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object |
| ExternalFlow.cs:377:22:377:48 | call to method Method1 : Object | semmle.label | call to method Method1 : Object |
| ExternalFlow.cs:377:45:377:47 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:378:18:378:19 | access to local variable o2 | semmle.label | access to local variable o2 |
| ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:384:17:384:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:384:22:384:46 | call to method StaticMethod1 : Object | semmle.label | call to method StaticMethod1 : Object |
| ExternalFlow.cs:384:43:384:45 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:385:18:385:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:387:17:387:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object |
| ExternalFlow.cs:387:22:387:54 | call to method StaticMethod1 : Object | semmle.label | call to method StaticMethod1 : Object |
| ExternalFlow.cs:387:51:387:53 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:388:18:388:19 | access to local variable o2 | semmle.label | access to local variable o2 |
| ExternalFlow.cs:393:17:393:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:394:13:394:13 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object |
| ExternalFlow.cs:394:27:394:29 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:395:17:395:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:395:22:395:22 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.Property1] : Object |
| ExternalFlow.cs:395:22:395:32 | access to property Property1 : Object | semmle.label | access to property Property1 : Object |
| ExternalFlow.cs:396:18:396:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:401:17:401:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:402:42:402:42 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object |
| ExternalFlow.cs:402:45:402:47 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:403:17:403:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:403:22:403:52 | call to extension accessor get_Property1 : Object | semmle.label | call to extension accessor get_Property1 : Object |
| ExternalFlow.cs:403:51:403:51 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.Property1] : Object |
| ExternalFlow.cs:404:18:404:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:410:17:410:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:410:22:410:24 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:410:22:410:41 | call to method GenericMethod1 : Object | semmle.label | call to method GenericMethod1 : Object |
| ExternalFlow.cs:411:18:411:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:413:17:413:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object |
| ExternalFlow.cs:413:22:413:55 | call to method GenericMethod1 : Object | semmle.label | call to method GenericMethod1 : Object |
| ExternalFlow.cs:413:52:413:54 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:414:18:414:19 | access to local variable o2 | semmle.label | access to local variable o2 |
| ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:420:17:420:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:420:22:420:53 | call to method GenericStaticMethod1 : Object | semmle.label | call to method GenericStaticMethod1 : Object |
| ExternalFlow.cs:420:50:420:52 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:421:18:421:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:423:17:423:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object |
| ExternalFlow.cs:423:22:423:61 | call to method GenericStaticMethod1 : Object | semmle.label | call to method GenericStaticMethod1 : Object |
| ExternalFlow.cs:423:58:423:60 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:424:18:424:19 | access to local variable o2 | semmle.label | access to local variable o2 |
| ExternalFlow.cs:429:17:429:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [property GenericProperty1] : Object | semmle.label | [post] access to parameter o : Object [property GenericProperty1] : Object |
| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object |
| ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:431:17:431:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [property GenericProperty1] : Object | semmle.label | access to parameter o : Object [property GenericProperty1] : Object |
| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object |
| ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | semmle.label | access to property GenericProperty1 : Object |
| ExternalFlow.cs:432:18:432:19 | access to local variable o1 | semmle.label | access to local variable o1 |
| ExternalFlow.cs:437:17:437:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object |
| ExternalFlow.cs:438:49:438:49 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object |
| ExternalFlow.cs:438:52:438:54 | access to local variable obj : Object | semmle.label | access to local variable obj : Object |
| ExternalFlow.cs:439:17:439:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object |
| ExternalFlow.cs:439:22:439:59 | call to extension accessor get_GenericProperty1 : Object | semmle.label | call to extension accessor get_GenericProperty1 : Object |
| ExternalFlow.cs:439:58:439:58 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object |
| ExternalFlow.cs:440:18:440:19 | access to local variable o1 | semmle.label | access to local variable o1 |
subpaths
| ExternalFlow.cs:84:29:84:32 | access to local variable objs : null [element] : Object | ExternalFlow.cs:84:35:84:35 | o : Object | ExternalFlow.cs:84:40:84:40 | access to parameter o : Object | ExternalFlow.cs:84:25:84:41 | call to method Map<Object,Object> : T[] [element] : Object |
invalidModelRow
@@ -477,15 +328,3 @@ invalidModelRow
| ExternalFlow.cs:324:18:324:44 | call to method GetMyNestedSyntheticField | ExternalFlow.cs:322:21:322:32 | object creation of type Object : Object | ExternalFlow.cs:324:18:324:44 | call to method GetMyNestedSyntheticField | $@ | ExternalFlow.cs:322:21:322:32 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:331:18:331:45 | call to method GetMyFieldOnSyntheticField | ExternalFlow.cs:329:21:329:32 | object creation of type Object : Object | ExternalFlow.cs:331:18:331:45 | call to method GetMyFieldOnSyntheticField | $@ | ExternalFlow.cs:329:21:329:32 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:345:18:345:29 | call to method GetValue | ExternalFlow.cs:343:21:343:32 | object creation of type Object : Object | ExternalFlow.cs:345:18:345:29 | call to method GetValue | $@ | ExternalFlow.cs:343:21:343:32 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:375:18:375:19 | access to local variable o1 | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | ExternalFlow.cs:375:18:375:19 | access to local variable o1 | $@ | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:378:18:378:19 | access to local variable o2 | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | ExternalFlow.cs:378:18:378:19 | access to local variable o2 | $@ | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:385:18:385:19 | access to local variable o1 | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | ExternalFlow.cs:385:18:385:19 | access to local variable o1 | $@ | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:388:18:388:19 | access to local variable o2 | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | ExternalFlow.cs:388:18:388:19 | access to local variable o2 | $@ | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:396:18:396:19 | access to local variable o1 | ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | ExternalFlow.cs:396:18:396:19 | access to local variable o1 | $@ | ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:404:18:404:19 | access to local variable o1 | ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | ExternalFlow.cs:404:18:404:19 | access to local variable o1 | $@ | ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:411:18:411:19 | access to local variable o1 | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | ExternalFlow.cs:411:18:411:19 | access to local variable o1 | $@ | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:414:18:414:19 | access to local variable o2 | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | ExternalFlow.cs:414:18:414:19 | access to local variable o2 | $@ | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:421:18:421:19 | access to local variable o1 | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | ExternalFlow.cs:421:18:421:19 | access to local variable o1 | $@ | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:424:18:424:19 | access to local variable o2 | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | ExternalFlow.cs:424:18:424:19 | access to local variable o2 | $@ | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:432:18:432:19 | access to local variable o1 | ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | ExternalFlow.cs:432:18:432:19 | access to local variable o1 | $@ | ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | object creation of type Object : Object |
| ExternalFlow.cs:440:18:440:19 | access to local variable o1 | ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | ExternalFlow.cs:440:18:440:19 | access to local variable o1 | $@ | ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | object creation of type Object : Object |

View File

@@ -45,14 +45,6 @@ extensions:
- ["My.Qltest", "K", false, "GetMyFieldOnSyntheticField", "()", "", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField2].Field[My.Qltest.K.MyField]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "Library", false, "SetValue", "(System.Object)", "", "Argument[0]", "Argument[this].SyntheticField[X]", "value", "dfc-generated"]
- ["My.Qltest", "Library", false, "GetValue", "()", "", "Argument[this].SyntheticField[X]", "ReturnValue", "value", "dfc-generated"]
- ["My.Qltest", "TestExtensions+extension(System.Object)", false, "Method1", "(System.Object)", "", "Argument[0]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(System.Object)", false, "StaticMethod1", "(System.Object)", "", "Argument[0]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(System.Object)", false, "get_Property1", "(System.Object)", "", "Argument[0].SyntheticField[TestExtensions.Property1]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(System.Object)", false, "set_Property1", "(System.Object,System.Object)", "", "Argument[1]", "Argument[0].SyntheticField[TestExtensions.Property1]", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(T)<T>", false, "GenericMethod1", "(T)", "", "Argument[0]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(T)<T>", false, "GenericStaticMethod1", "(T)", "", "Argument[0]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(T)<T>", false, "get_GenericProperty1", "(T)", "", "Argument[0].SyntheticField[TestExtensions.GenericProperty1]", "ReturnValue", "value", "manual"]
- ["My.Qltest", "TestExtensions+extension(T)<T>", false, "set_GenericProperty1", "(T,T)", "", "Argument[1]", "Argument[0].SyntheticField[TestExtensions.GenericProperty1]", "value", "manual"]
- addsTo:
pack: codeql/csharp-all

View File

@@ -18591,10 +18591,6 @@ summary
| System.Web;HttpUtility;JavaScriptStringEncode;(System.String,System.Boolean);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;ParseQueryString;(System.String);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;ParseQueryString;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Int32,System.Int32,System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.String);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlEncode;(System.Byte[]);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlEncode;(System.Byte[],System.Int32,System.Int32);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlEncode;(System.String);Argument[0];ReturnValue;taint;manual |

View File

@@ -14340,10 +14340,6 @@
| System.Web;HttpUtility;JavaScriptStringEncode;(System.String,System.Boolean);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;ParseQueryString;(System.String);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;ParseQueryString;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Int32,System.Int32,System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.String);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlDecode;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlEncode;(System.Byte[]);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlEncode;(System.Byte[],System.Int32,System.Int32);Argument[0];ReturnValue;taint;manual |
| System.Web;HttpUtility;UrlEncode;(System.String);Argument[0];ReturnValue;taint;manual |

View File

@@ -1,481 +0,0 @@
extensionTypes.cs:
# 4| [Class] MyExtensionTypes
# 6| 4: [ExtensionType] extension(String)
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
#-----| 0: (Attributes)
# 6| 1: [DefaultAttribute] [NotNull(...)]
# 6| 0: [TypeMention] NotNullAttribute
# 8| 4: [ExtensionMethod] M11
# 8| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 8| 4: [BlockStmt] {...}
# 10| 5: [ExtensionType] extension(Int32)
#-----| 2: (Parameters)
# 10| 0: [Parameter] i1
# 10| -1: [TypeMention] int
# 12| 4: [ExtensionMethod] M21
# 12| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 10| 0: [Parameter] i1
# 10| -1: [TypeMention] int
# 12| 4: [BlockStmt] {...}
# 14| 6: [ExtensionType] extension(Int32)
#-----| 2: (Parameters)
# 14| 0: [Parameter] i2
# 14| -1: [TypeMention] int
# 16| 4: [ExtensionMethod] M31
# 16| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 14| 0: [Parameter] i2
# 14| -1: [TypeMention] int
# 16| 4: [BlockStmt] {...}
# 18| 7: [ExtensionType] extension(Int32)
#-----| 2: (Parameters)
# 18| 0: [Parameter] i3
# 18| -1: [TypeMention] int
# 20| 4: [ExtensionMethod] M41
# 20| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 18| 0: [Parameter] i3
# 18| -1: [TypeMention] int
# 20| 4: [BlockStmt] {...}
# 22| 8: [ExtensionType] extension(String)
#-----| 2: (Parameters)
# 22| 0: [Parameter] s
# 22| -1: [TypeMention] string
# 24| 4: [ExtensionMethod] M51
# 24| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 22| 0: [Parameter] s
# 22| -1: [TypeMention] string
# 24| 4: [BlockStmt] {...}
# 26| 9: [ExtensionType] extension(T1)`1
#-----| 1: (Type parameters)
# 26| 0: [TypeParameter] T1
#-----| 2: (Parameters)
# 26| 0: [Parameter] t1
# 26| -1: [TypeMention] T1
#-----| 0: (Attributes)
# 26| 1: [DefaultAttribute] [NotNullWhen(...)]
# 26| -1: [TypeMention] NotNullWhenAttribute
# 26| 0: [BoolLiteral] true
# 28| 4: [ExtensionMethod] M61`1
# 28| -1: [TypeMention] Void
#-----| 1: (Type parameters)
# 28| 0: [TypeParameter] T2
#-----| 2: (Parameters)
# 26| 0: [Parameter] t1
# 26| -1: [TypeMention] T1
# 28| 1: [Parameter] o
# 28| -1: [TypeMention] object
# 28| 2: [Parameter] t2
# 28| -1: [TypeMention] T2
# 28| 4: [BlockStmt] {...}
extensions.cs:
# 4| [Class] MyExtensions
# 6| 4: [ExtensionType] extension(String)
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 8| 4: [Property] Prop1
# 8| -1: [TypeMention] bool
# 8| 3: [ExtensionCallable,Getter] get_Prop1
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 8| 4: [GTExpr] ... > ...
# 8| 0: [PropertyCall] access to property Length
# 8| -1: [SyntheticExtensionParameterAccess] access to extension synthetic parameter s
# 8| 1: [IntLiteral] 0
# 9| 5: [Property] Prop2
# 9| -1: [TypeMention] bool
# 9| 3: [ExtensionCallable,Getter] get_Prop2
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 9| 4: [BlockStmt] {...}
# 9| 0: [ReturnStmt] return ...;
# 9| 0: [BoolLiteral] true
# 9| 4: [ExtensionCallable,Setter] set_Prop2
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 9| 1: [Parameter] value
# 9| 4: [BlockStmt] {...}
# 10| 6: [Property] StaticProp1
# 10| -1: [TypeMention] bool
# 10| 3: [ExtensionCallable,Getter] get_StaticProp1
# 10| 4: [BlockStmt] {...}
# 10| 0: [ReturnStmt] return ...;
# 10| 0: [BoolLiteral] false
# 11| 7: [ExtensionMethod] M1
# 11| -1: [TypeMention] bool
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 11| 4: [IsExpr] ... is ...
# 11| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter s
# 11| 1: [NotPatternExpr] not ...
# 11| 0: [ConstantPatternExpr,NullLiteral] null
# 12| 8: [ExtensionMethod] M2
# 12| -1: [TypeMention] string
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 12| 1: [Parameter] other
# 12| -1: [TypeMention] string
# 12| 4: [BlockStmt] {...}
# 12| 0: [ReturnStmt] return ...;
# 12| 0: [AddExpr] ... + ...
# 12| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter s
# 12| 1: [ParameterAccess] access to parameter other
# 13| 9: [ExtensionMethod] StaticM1
# 13| -1: [TypeMention] int
# 13| 4: [BlockStmt] {...}
# 13| 0: [ReturnStmt] return ...;
# 13| 0: [IntLiteral] 0
# 14| 10: [ExtensionMethod] StaticM2
# 14| -1: [TypeMention] int
#-----| 2: (Parameters)
# 14| 0: [Parameter] x
# 14| -1: [TypeMention] string
# 14| 4: [BlockStmt] {...}
# 14| 0: [ReturnStmt] return ...;
# 14| 0: [PropertyCall] access to property Length
# 14| -1: [ParameterAccess] access to parameter x
# 15| 11: [ExtensionCallable,MulOperator] *
# 15| -1: [TypeMention] string
#-----| 2: (Parameters)
# 15| 0: [Parameter] a
# 15| -1: [TypeMention] int
# 15| 1: [Parameter] b
# 15| -1: [TypeMention] string
# 15| 4: [BlockStmt] {...}
# 15| 0: [ReturnStmt] return ...;
# 15| 0: [StringLiteralUtf16] ""
# 16| 14: [ExtensionMethod] StringGenericM1`1
# 16| -1: [TypeMention] T
#-----| 1: (Type parameters)
# 16| 0: [TypeParameter] T
#-----| 2: (Parameters)
# 6| 0: [Parameter] s
# 6| -1: [TypeMention] string
# 16| 1: [Parameter] t
# 16| -1: [TypeMention] T
# 16| 2: [Parameter] o
# 16| -1: [TypeMention] object
# 16| 4: [BlockStmt] {...}
# 16| 0: [ReturnStmt] return ...;
# 16| 0: [ParameterAccess] access to parameter t
# 19| 5: [ExtensionType] extension(Object)
# 21| 4: [ExtensionMethod] StaticObjectM1
# 21| -1: [TypeMention] int
# 21| 4: [BlockStmt] {...}
# 21| 0: [ReturnStmt] return ...;
# 21| 0: [IntLiteral] 0
# 22| 5: [ExtensionMethod] StaticObjectM2
# 22| -1: [TypeMention] int
#-----| 2: (Parameters)
# 22| 0: [Parameter] s
# 22| -1: [TypeMention] string
# 22| 4: [BlockStmt] {...}
# 22| 0: [ReturnStmt] return ...;
# 22| 0: [PropertyCall] access to property Length
# 22| -1: [ParameterAccess] access to parameter s
# 23| 6: [Property] StaticProp
# 23| -1: [TypeMention] bool
# 23| 3: [ExtensionCallable,Getter] get_StaticProp
# 23| 4: [BoolLiteral] true
# 26| 8: [ExtensionType] extension(T)`1
#-----| 1: (Type parameters)
# 26| 0: [TypeParameter] T
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 28| 4: [Property] GenericProp1
# 28| -1: [TypeMention] bool
# 28| 3: [ExtensionCallable,Getter] get_GenericProp1
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 28| 4: [IsExpr] ... is ...
# 28| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter t
# 28| 1: [NotPatternExpr] not ...
# 28| 0: [ConstantPatternExpr,NullLiteral] null
# 29| 5: [Property] GenericProp2
# 29| -1: [TypeMention] bool
# 29| 3: [ExtensionCallable,Getter] get_GenericProp2
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 29| 4: [BlockStmt] {...}
# 29| 0: [ReturnStmt] return ...;
# 29| 0: [BoolLiteral] true
# 29| 4: [ExtensionCallable,Setter] set_GenericProp2
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 29| 1: [Parameter] value
# 29| 4: [BlockStmt] {...}
# 30| 6: [ExtensionMethod] GenericM1
# 30| -1: [TypeMention] bool
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 30| 4: [IsExpr] ... is ...
# 30| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter t
# 30| 1: [NotPatternExpr] not ...
# 30| 0: [ConstantPatternExpr,NullLiteral] null
# 31| 7: [ExtensionMethod] GenericM2`1
# 31| -1: [TypeMention] Void
#-----| 1: (Type parameters)
# 31| 0: [TypeParameter] S
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 31| 1: [Parameter] other
# 31| -1: [TypeMention] S
# 31| 4: [BlockStmt] {...}
# 32| 8: [ExtensionMethod] GenericStaticM1
# 32| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 26| 0: [Parameter] t
# 26| -1: [TypeMention] T
# 32| 4: [BlockStmt] {...}
# 33| 9: [ExtensionMethod] GenericStaticM2`1
# 33| -1: [TypeMention] Void
#-----| 1: (Type parameters)
# 33| 0: [TypeParameter] S
#-----| 2: (Parameters)
# 33| 0: [Parameter] other
# 33| -1: [TypeMention] S
# 33| 4: [BlockStmt] {...}
# 34| 10: [AddOperator,ExtensionCallable] +
# 34| -1: [TypeMention] T
#-----| 2: (Parameters)
# 34| 0: [Parameter] a
# 34| -1: [TypeMention] T
# 34| 1: [Parameter] b
# 34| -1: [TypeMention] T
# 34| 4: [BlockStmt] {...}
# 34| 0: [ReturnStmt] return ...;
# 34| 0: [NullLiteral] null
# 38| [Class] ClassicExtensions
# 40| 4: [ExtensionMethod] M3
# 40| -1: [TypeMention] bool
#-----| 2: (Parameters)
# 40| 0: [Parameter] s
# 40| -1: [TypeMention] string
# 40| 4: [IsExpr] ... is ...
# 40| 0: [ParameterAccess] access to parameter s
# 40| 1: [NotPatternExpr] not ...
# 40| 0: [ConstantPatternExpr,NullLiteral] null
# 43| [Class] C
# 45| 6: [Method] CallingExtensions
# 45| -1: [TypeMention] Void
# 46| 4: [BlockStmt] {...}
# 47| 0: [LocalVariableDeclStmt] ... ...;
# 47| 0: [LocalVariableDeclAndInitExpr] String s = ...
# 47| -1: [TypeMention] string
# 47| 0: [LocalVariableAccess] access to local variable s
# 47| 1: [StringLiteralUtf16] "Hello World."
# 50| 1: [LocalVariableDeclStmt] ... ...;
# 50| 0: [LocalVariableDeclAndInitExpr] Boolean x11 = ...
# 50| -1: [TypeMention] bool
# 50| 0: [LocalVariableAccess] access to local variable x11
# 50| 1: [ExtensionPropertyCall] access to property Prop1
# 50| -1: [LocalVariableAccess] access to local variable s
# 51| 2: [LocalVariableDeclStmt] ... ...;
# 51| 0: [LocalVariableDeclAndInitExpr] Boolean x12 = ...
# 51| -1: [TypeMention] bool
# 51| 0: [LocalVariableAccess] access to local variable x12
# 51| 1: [ExtensionPropertyCall] access to property Prop2
# 51| -1: [LocalVariableAccess] access to local variable s
# 52| 3: [ExprStmt] ...;
# 52| 0: [AssignExpr] ... = ...
# 52| 0: [ExtensionPropertyCall] access to property Prop2
# 52| -1: [LocalVariableAccess] access to local variable s
# 52| 1: [BoolLiteral] true
# 53| 4: [LocalVariableDeclStmt] ... ...;
# 53| 0: [LocalVariableDeclAndInitExpr] Boolean x13 = ...
# 53| -1: [TypeMention] bool
# 53| 0: [LocalVariableAccess] access to local variable x13
# 53| 1: [ExtensionPropertyCall] access to property StaticProp1
# 53| -1: [TypeAccess] access to type String
# 53| 0: [TypeMention] string
# 54| 5: [LocalVariableDeclStmt] ... ...;
# 54| 0: [LocalVariableDeclAndInitExpr] Boolean x14 = ...
# 54| -1: [TypeMention] bool
# 54| 0: [LocalVariableAccess] access to local variable x14
# 54| 1: [ExtensionPropertyCall] access to property StaticProp
# 54| -1: [TypeAccess] access to type Object
# 54| 0: [TypeMention] object
# 57| 6: [LocalVariableDeclStmt] ... ...;
# 57| 0: [LocalVariableDeclAndInitExpr] Boolean x21 = ...
# 57| -1: [TypeMention] bool
# 57| 0: [LocalVariableAccess] access to local variable x21
# 57| 1: [MethodCall] call to method M1
# 57| -1: [LocalVariableAccess] access to local variable s
# 58| 7: [LocalVariableDeclStmt] ... ...;
# 58| 0: [LocalVariableDeclAndInitExpr] String x22 = ...
# 58| -1: [TypeMention] string
# 58| 0: [LocalVariableAccess] access to local variable x22
# 58| 1: [MethodCall] call to method M2
# 58| -1: [LocalVariableAccess] access to local variable s
# 58| 0: [StringLiteralUtf16] "!!!"
# 59| 8: [LocalVariableDeclStmt] ... ...;
# 59| 0: [LocalVariableDeclAndInitExpr] Int32 x23 = ...
# 59| -1: [TypeMention] int
# 59| 0: [LocalVariableAccess] access to local variable x23
# 59| 1: [MethodCall] call to method StaticM1
# 59| -1: [TypeAccess] access to type String
# 59| 0: [TypeMention] string
# 60| 9: [LocalVariableDeclStmt] ... ...;
# 60| 0: [LocalVariableDeclAndInitExpr] Int32 x24 = ...
# 60| -1: [TypeMention] int
# 60| 0: [LocalVariableAccess] access to local variable x24
# 60| 1: [MethodCall] call to method StaticM2
# 60| -1: [TypeAccess] access to type String
# 60| 0: [TypeMention] string
# 60| 0: [LocalVariableAccess] access to local variable s
# 61| 10: [LocalVariableDeclStmt] ... ...;
# 61| 0: [LocalVariableDeclAndInitExpr] Int32 x25 = ...
# 61| -1: [TypeMention] int
# 61| 0: [LocalVariableAccess] access to local variable x25
# 61| 1: [MethodCall] call to method StaticObjectM1
# 61| -1: [TypeAccess] access to type Object
# 61| 0: [TypeMention] object
# 62| 11: [LocalVariableDeclStmt] ... ...;
# 62| 0: [LocalVariableDeclAndInitExpr] Int32 x26 = ...
# 62| -1: [TypeMention] int
# 62| 0: [LocalVariableAccess] access to local variable x26
# 62| 1: [MethodCall] call to method StaticObjectM2
# 62| -1: [TypeAccess] access to type Object
# 62| 0: [TypeMention] object
# 62| 0: [LocalVariableAccess] access to local variable s
# 65| 12: [LocalVariableDeclStmt] ... ...;
# 65| 0: [LocalVariableDeclAndInitExpr] String x30 = ...
# 65| -1: [TypeMention] string
# 65| 0: [LocalVariableAccess] access to local variable x30
# 65| 1: [ExtensionOperatorCall] call to operator *
# 65| 0: [IntLiteral] 3
# 65| 1: [LocalVariableAccess] access to local variable s
# 68| 13: [LocalVariableDeclStmt] ... ...;
# 68| 0: [LocalVariableDeclAndInitExpr] Boolean y = ...
# 68| -1: [TypeMention] bool
# 68| 0: [LocalVariableAccess] access to local variable y
# 68| 1: [MethodCall] call to method M3
# 68| -1: [LocalVariableAccess] access to local variable s
# 71| 14: [ExprStmt] ...;
# 71| 0: [MethodCall] call to method M1
# 71| -1: [TypeAccess] access to type MyExtensions
# 71| 0: [TypeMention] MyExtensions
# 71| 0: [LocalVariableAccess] access to local variable s
# 72| 15: [ExprStmt] ...;
# 72| 0: [MethodCall] call to method M2
# 72| -1: [TypeAccess] access to type MyExtensions
# 72| 0: [TypeMention] MyExtensions
# 72| 0: [LocalVariableAccess] access to local variable s
# 72| 1: [StringLiteralUtf16] "!!!"
# 73| 16: [ExprStmt] ...;
# 73| 0: [MethodCall] call to method StaticM1
# 73| -1: [TypeAccess] access to type MyExtensions
# 73| 0: [TypeMention] MyExtensions
# 74| 17: [ExprStmt] ...;
# 74| 0: [MethodCall] call to method StaticM2
# 74| -1: [TypeAccess] access to type MyExtensions
# 74| 0: [TypeMention] MyExtensions
# 74| 0: [LocalVariableAccess] access to local variable s
# 75| 18: [ExprStmt] ...;
# 75| 0: [MethodCall] call to method StaticObjectM1
# 75| -1: [TypeAccess] access to type MyExtensions
# 75| 0: [TypeMention] MyExtensions
# 76| 19: [ExprStmt] ...;
# 76| 0: [MethodCall] call to method StaticObjectM2
# 76| -1: [TypeAccess] access to type MyExtensions
# 76| 0: [TypeMention] MyExtensions
# 76| 0: [LocalVariableAccess] access to local variable s
# 79| 20: [ExprStmt] ...;
# 79| 0: [ExtensionOperatorCall] call to operator *
# 79| -1: [TypeAccess] access to type MyExtensions
# 79| 0: [TypeMention] MyExtensions
# 79| 0: [IntLiteral] 3
# 79| 1: [LocalVariableAccess] access to local variable s
# 82| 21: [ExprStmt] ...;
# 82| 0: [MethodCall] call to extension accessor get_Prop1
# 82| -1: [TypeAccess] access to type MyExtensions
# 82| 0: [TypeMention] MyExtensions
# 82| 0: [LocalVariableAccess] access to local variable s
# 83| 22: [ExprStmt] ...;
# 83| 0: [MethodCall] call to extension accessor get_Prop2
# 83| -1: [TypeAccess] access to type MyExtensions
# 83| 0: [TypeMention] MyExtensions
# 83| 0: [LocalVariableAccess] access to local variable s
# 84| 23: [ExprStmt] ...;
# 84| 0: [MethodCall] call to extension accessor set_Prop2
# 84| -1: [TypeAccess] access to type MyExtensions
# 84| 0: [TypeMention] MyExtensions
# 84| 0: [LocalVariableAccess] access to local variable s
# 84| 1: [BoolLiteral] false
# 85| 24: [ExprStmt] ...;
# 85| 0: [MethodCall] call to extension accessor get_StaticProp
# 85| -1: [TypeAccess] access to type MyExtensions
# 85| 0: [TypeMention] MyExtensions
# 88| 7: [Method] CallingGenericExtensions
# 88| -1: [TypeMention] Void
# 89| 4: [BlockStmt] {...}
# 90| 0: [LocalVariableDeclStmt] ... ...;
# 90| 0: [LocalVariableDeclAndInitExpr] String s = ...
# 90| -1: [TypeMention] string
# 90| 0: [LocalVariableAccess] access to local variable s
# 90| 1: [StringLiteralUtf16] "Hello Generic World."
# 91| 1: [LocalVariableDeclStmt] ... ...;
# 91| 0: [LocalVariableDeclAndInitExpr] Object o = ...
# 91| -1: [TypeMention] object
# 91| 0: [LocalVariableAccess] access to local variable o
# 91| 1: [ObjectCreation] object creation of type Object
# 91| 0: [TypeMention] object
# 94| 2: [ExprStmt] ...;
# 94| 0: [MethodCall] call to method GenericM1
# 94| -1: [LocalVariableAccess] access to local variable o
# 95| 3: [ExprStmt] ...;
# 95| 0: [MethodCall] call to method GenericM1
# 95| -1: [LocalVariableAccess] access to local variable s
# 98| 4: [ExprStmt] ...;
# 98| 0: [MethodCall] call to method GenericM1
# 98| -1: [TypeAccess] access to type MyExtensions
# 98| 0: [TypeMention] MyExtensions
# 98| 0: [LocalVariableAccess] access to local variable o
# 99| 5: [ExprStmt] ...;
# 99| 0: [MethodCall] call to method GenericM1
# 99| -1: [TypeAccess] access to type MyExtensions
# 99| 0: [TypeMention] MyExtensions
# 99| 0: [LocalVariableAccess] access to local variable s
# 101| 6: [ExprStmt] ...;
# 101| 0: [MethodCall] call to method GenericM2<Int32>
# 101| -1: [LocalVariableAccess] access to local variable o
# 101| 0: [IntLiteral] 42
# 102| 7: [ExprStmt] ...;
# 102| 0: [MethodCall] call to method GenericM2<Int32>
# 102| -1: [TypeAccess] access to type MyExtensions
# 102| 0: [TypeMention] MyExtensions
# 102| 0: [LocalVariableAccess] access to local variable o
# 102| 1: [IntLiteral] 42
# 104| 8: [ExprStmt] ...;
# 104| 0: [MethodCall] call to method StringGenericM1<Int32>
# 104| -1: [LocalVariableAccess] access to local variable s
# 104| 0: [IntLiteral] 7
# 104| 1: [ObjectCreation] object creation of type Object
# 104| 0: [TypeMention] object
# 105| 9: [ExprStmt] ...;
# 105| 0: [MethodCall] call to method StringGenericM1<String>
# 105| -1: [TypeAccess] access to type MyExtensions
# 105| 0: [TypeMention] MyExtensions
# 105| 0: [LocalVariableAccess] access to local variable s
# 105| 1: [StringLiteralUtf16] "test"
# 105| 2: [ObjectCreation] object creation of type Object
# 105| 0: [TypeMention] object

View File

@@ -1 +0,0 @@
shared/PrintAst.ql

View File

@@ -1,30 +0,0 @@
using System;
using System.Diagnostics.CodeAnalysis;
public static class MyExtensionTypes
{
extension([NotNull] string s)
{
public void M11() { }
}
extension(ref readonly int i1)
{
public void M21() { }
}
extension(in int i2)
{
public void M31() { }
}
extension(ref int i3)
{
public void M41() { }
}
extension(string? s)
{
public void M51() { }
}
extension<T1>([NotNullWhen(true)] T1 t1) where T1 : class
{
public void M61<T2>(object o, T2 t2) { }
}
}

View File

@@ -1,37 +0,0 @@
extensionTypeReceiverParameter
| extensionTypes.cs:6:5:9:5 | extension(String) | extensionTypes.cs:6:32:6:32 | s |
| extensionTypes.cs:10:5:13:5 | extension(Int32) | extensionTypes.cs:10:32:10:33 | i1 |
| extensionTypes.cs:14:5:17:5 | extension(Int32) | extensionTypes.cs:14:22:14:23 | i2 |
| extensionTypes.cs:18:5:21:5 | extension(Int32) | extensionTypes.cs:18:23:18:24 | i3 |
| extensionTypes.cs:22:5:25:5 | extension(String) | extensionTypes.cs:22:23:22:23 | s |
| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | extensionTypes.cs:26:42:26:43 | t1 |
| extensions.cs:6:5:17:5 | extension(String) | extensions.cs:6:22:6:22 | s |
| extensions.cs:26:5:35:5 | extension(Object)<Object> | extensions.cs:26:20:26:20 | t |
| extensions.cs:26:5:35:5 | extension(String)<String> | extensions.cs:26:20:26:20 | t |
| extensions.cs:26:5:35:5 | extension(T)`1 | extensions.cs:26:20:26:20 | t |
extensionTypeExtendedType
| extensionTypes.cs:6:5:9:5 | extension(String) | string |
| extensionTypes.cs:10:5:13:5 | extension(Int32) | int |
| extensionTypes.cs:14:5:17:5 | extension(Int32) | int |
| extensionTypes.cs:18:5:21:5 | extension(Int32) | int |
| extensionTypes.cs:22:5:25:5 | extension(String) | string |
| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | T1 |
| extensions.cs:6:5:17:5 | extension(String) | string |
| extensions.cs:19:5:24:5 | extension(Object) | object |
| extensions.cs:26:5:35:5 | extension(Object)<Object> | object |
| extensions.cs:26:5:35:5 | extension(String)<String> | string |
| extensions.cs:26:5:35:5 | extension(T)`1 | T |
extensionTypeReceiverParameterAttribute
| extensionTypes.cs:6:5:9:5 | extension(String) | extensionTypes.cs:6:32:6:32 | s | extensionTypes.cs:6:16:6:22 | [NotNull(...)] |
| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | extensionTypes.cs:26:42:26:43 | t1 | extensionTypes.cs:26:20:26:30 | [NotNullWhen(...)] |
extensionTypeReceiverParameterModifier
| extensionTypes.cs:10:5:13:5 | extension(Int32) | extensionTypes.cs:10:32:10:33 | i1 | ref readonly |
| extensionTypes.cs:14:5:17:5 | extension(Int32) | extensionTypes.cs:14:22:14:23 | i2 | in |
| extensionTypes.cs:18:5:21:5 | extension(Int32) | extensionTypes.cs:18:23:18:24 | i3 | ref |
extensionTypeParameterConstraints
| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | extensionTypes.cs:26:15:26:16 | T1 | file://:0:0:0:0 | where T1: ... |
| extensions.cs:26:5:35:5 | extension(T)`1 | extensions.cs:26:15:26:15 | T | file://:0:0:0:0 | where T: ... |
syntheticParameterModifier
| extensionTypes.cs:10:5:13:5 | extension(Int32) | extensionTypes.cs:12:21:12:23 | M21 | extensionTypes.cs:10:32:10:33 | i1 | ref readonly |
| extensionTypes.cs:14:5:17:5 | extension(Int32) | extensionTypes.cs:16:21:16:23 | M31 | extensionTypes.cs:14:22:14:23 | i2 | in |
| extensionTypes.cs:18:5:21:5 | extension(Int32) | extensionTypes.cs:20:21:20:23 | M41 | extensionTypes.cs:18:23:18:24 | i3 | ref |

View File

@@ -1,56 +0,0 @@
import csharp
private predicate inTestFile(ExtensionType et) {
et.getFile().getBaseName() = ["extensions.cs", "extensionTypes.cs"]
}
private string getModifier(Parameter p) {
p.isIn() and result = "in"
or
p.isRef() and result = "ref"
or
p.isReadonlyRef() and result = "ref readonly"
}
query predicate extensionTypeReceiverParameter(ExtensionType et, Parameter p) {
inTestFile(et) and
p = et.getReceiverParameter()
}
query predicate extensionTypeExtendedType(ExtensionType et, string t) {
inTestFile(et) and
t = et.getExtendedType().toStringWithTypes()
}
query predicate extensionTypeReceiverParameterAttribute(ExtensionType et, Parameter p, Attribute a) {
inTestFile(et) and
et.getReceiverParameter() = p and
p.getAnAttribute() = a
}
query predicate extensionTypeReceiverParameterModifier(
ExtensionType et, Parameter p, string modifier
) {
inTestFile(et) and
et.getReceiverParameter() = p and
modifier = getModifier(p)
}
query predicate extensionTypeParameterConstraints(
UnboundGeneric ug, TypeParameter tp, TypeParameterConstraints c
) {
inTestFile(ug) and
ug instanceof ExtensionType and
tp = ug.getATypeParameter() and
tp.getConstraints() = c
}
query predicate syntheticParameterModifier(
ExtensionType et, ExtensionMethod em, Parameter p, string modifier
) {
inTestFile(et) and
em.getDeclaringType() = et and
p = em.getParameter(0) and
not em.isStatic() and
modifier = getModifier(p)
}

View File

@@ -1,107 +0,0 @@
using System;
using System.Collections.Generic;
public static class MyExtensions
{
extension(string s)
{
public bool Prop1 => s.Length > 0;
public bool Prop2 { get { return true; } set { } }
public static bool StaticProp1 { get { return false; } }
public bool M1() => s is not null;
public string M2(string other) { return s + other; }
public static int StaticM1() { return 0; }
public static int StaticM2(string x) { return x.Length; }
public static string operator *(int a, string b) { return ""; }
public T StringGenericM1<T>(T t, object o) { return t; }
}
extension(object)
{
public static int StaticObjectM1() { return 0; }
public static int StaticObjectM2(string s) { return s.Length; }
public static bool StaticProp => true;
}
extension<T>(T t) where T : class
{
public bool GenericProp1 => t is not null;
public bool GenericProp2 { get { return true; } set { } }
public bool GenericM1() => t is not null;
public void GenericM2<S>(S other) { }
public void GenericStaticM1() { }
public static void GenericStaticM2<S>(S other) { }
public static T operator +(T a, T b) { return null; }
}
}
public static class ClassicExtensions
{
public static bool M3(this string s) => s is not null;
}
public class C
{
public static void CallingExtensions()
{
var s = "Hello World.";
// Calling the extensions properties
var x11 = s.Prop1;
var x12 = s.Prop2;
s.Prop2 = true;
var x13 = string.StaticProp1;
var x14 = object.StaticProp;
// Calling the extensions methods.
var x21 = s.M1();
var x22 = s.M2("!!!");
var x23 = string.StaticM1();
var x24 = string.StaticM2(s);
var x25 = object.StaticObjectM1();
var x26 = object.StaticObjectM2(s);
// Calling the extension operator.
var x30 = 3 * s;
// Calling the classic extension method.
var y = s.M3();
// Calling the compiler generated static extension methods.
MyExtensions.M1(s);
MyExtensions.M2(s, "!!!");
MyExtensions.StaticM1();
MyExtensions.StaticM2(s);
MyExtensions.StaticObjectM1();
MyExtensions.StaticObjectM2(s);
// Calling the compiler generated operator method.
MyExtensions.op_Multiply(3, s);
// Calling the compiler generated methods used by the extension property accessors.
MyExtensions.get_Prop1(s);
MyExtensions.get_Prop2(s);
MyExtensions.set_Prop2(s, false);
MyExtensions.get_StaticProp();
}
public static void CallingGenericExtensions()
{
var s = "Hello Generic World.";
var o = new object();
// Calling generic extension method
o.GenericM1();
s.GenericM1();
// Calling the compiler generated static extension methods.
MyExtensions.GenericM1(o);
MyExtensions.GenericM1(s);
o.GenericM2(42);
MyExtensions.GenericM2(o, 42);
s.StringGenericM1<int>(7, new object());
MyExtensions.StringGenericM1<string>(s, "test", new object());
}
}

View File

@@ -1,111 +0,0 @@
extensionMethodCallArgument
| extensions.cs:57:19:57:24 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:57:19:57:19 | access to local variable s |
| extensions.cs:58:19:58:29 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:58:19:58:19 | access to local variable s |
| extensions.cs:58:19:58:29 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:12:33:12:37 | other | 1 | extensions.cs:58:24:58:28 | "!!!" |
| extensions.cs:60:19:60:36 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:14:43:14:43 | x | 0 | extensions.cs:60:35:60:35 | access to local variable s |
| extensions.cs:62:19:62:42 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:22:49:22:49 | s | 0 | extensions.cs:62:41:62:41 | access to local variable s |
| extensions.cs:68:17:68:22 | call to method M3 | extensions.cs:40:24:40:25 | M3 | extensions.cs:40:39:40:39 | s | 0 | extensions.cs:68:17:68:17 | access to local variable s |
| extensions.cs:71:9:71:26 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:71:25:71:25 | access to local variable s |
| extensions.cs:72:9:72:33 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:72:25:72:25 | access to local variable s |
| extensions.cs:72:9:72:33 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:12:33:12:37 | other | 1 | extensions.cs:72:28:72:32 | "!!!" |
| extensions.cs:74:9:74:32 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:14:43:14:43 | x | 0 | extensions.cs:74:31:74:31 | access to local variable s |
| extensions.cs:76:9:76:38 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:22:49:22:49 | s | 0 | extensions.cs:76:37:76:37 | access to local variable s |
| extensions.cs:94:9:94:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:94:9:94:9 | access to local variable o |
| extensions.cs:95:9:95:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:95:9:95:9 | access to local variable s |
| extensions.cs:98:9:98:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:98:32:98:32 | access to local variable o |
| extensions.cs:99:9:99:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:99:32:99:32 | access to local variable s |
| extensions.cs:101:9:101:23 | call to method GenericM2<Int32> | extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:101:9:101:9 | access to local variable o |
| extensions.cs:101:9:101:23 | call to method GenericM2<Int32> | extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:31:36:31:40 | other | 1 | extensions.cs:101:21:101:22 | 42 |
| extensions.cs:102:9:102:37 | call to method GenericM2<Int32> | extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:102:32:102:32 | access to local variable o |
| extensions.cs:102:9:102:37 | call to method GenericM2<Int32> | extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:31:36:31:40 | other | 1 | extensions.cs:102:35:102:36 | 42 |
| extensions.cs:104:9:104:47 | call to method StringGenericM1<Int32> | extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:104:9:104:9 | access to local variable s |
| extensions.cs:104:9:104:47 | call to method StringGenericM1<Int32> | extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:16:39:16:39 | t | 1 | extensions.cs:104:32:104:32 | 7 |
| extensions.cs:104:9:104:47 | call to method StringGenericM1<Int32> | extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:16:49:16:49 | o | 2 | extensions.cs:104:35:104:46 | object creation of type Object |
| extensions.cs:105:9:105:69 | call to method StringGenericM1<String> | extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:105:46:105:46 | access to local variable s |
| extensions.cs:105:9:105:69 | call to method StringGenericM1<String> | extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:16:39:16:39 | t | 1 | extensions.cs:105:49:105:54 | "test" |
| extensions.cs:105:9:105:69 | call to method StringGenericM1<String> | extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:16:49:16:49 | o | 2 | extensions.cs:105:57:105:68 | object creation of type Object |
extensionMethodCalls
| extensions.cs:57:19:57:24 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M1 |
| extensions.cs:58:19:58:29 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M2 |
| extensions.cs:59:19:59:35 | call to method StaticM1 | extensions.cs:13:27:13:34 | StaticM1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM1 |
| extensions.cs:60:19:60:36 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM2 |
| extensions.cs:61:19:61:41 | call to method StaticObjectM1 | extensions.cs:21:27:21:40 | StaticObjectM1 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM1 |
| extensions.cs:62:19:62:42 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM2 |
| extensions.cs:68:17:68:22 | call to method M3 | extensions.cs:40:24:40:25 | M3 | extensions.cs:38:21:38:37 | ClassicExtensions | ClassicExtensions.M3 |
| extensions.cs:71:9:71:26 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M1 |
| extensions.cs:72:9:72:33 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M2 |
| extensions.cs:73:9:73:31 | call to method StaticM1 | extensions.cs:13:27:13:34 | StaticM1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM1 |
| extensions.cs:74:9:74:32 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM2 |
| extensions.cs:75:9:75:37 | call to method StaticObjectM1 | extensions.cs:21:27:21:40 | StaticObjectM1 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM1 |
| extensions.cs:76:9:76:38 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM2 |
| extensions.cs:94:9:94:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(Object)<Object> | MyExtensions+extension(System.Object)<System.Object>.GenericM1 |
| extensions.cs:95:9:95:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(String)<String> | MyExtensions+extension(System.String)<System.String>.GenericM1 |
| extensions.cs:98:9:98:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(Object)<Object> | MyExtensions+extension(System.Object)<System.Object>.GenericM1 |
| extensions.cs:99:9:99:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(String)<String> | MyExtensions+extension(System.String)<System.String>.GenericM1 |
| extensions.cs:101:9:101:23 | call to method GenericM2<Int32> | extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:26:5:35:5 | extension(Object)<Object> | MyExtensions+extension(System.Object)<System.Object>.GenericM2<Int32> |
| extensions.cs:102:9:102:37 | call to method GenericM2<Int32> | extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:26:5:35:5 | extension(Object)<Object> | MyExtensions+extension(System.Object)<System.Object>.GenericM2<Int32> |
| extensions.cs:104:9:104:47 | call to method StringGenericM1<Int32> | extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StringGenericM1<Int32> |
| extensions.cs:105:9:105:69 | call to method StringGenericM1<String> | extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StringGenericM1<String> |
extensionParameter
| extensions.cs:11:21:11:22 | M1 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s |
| extensions.cs:12:23:12:24 | M2 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s |
| extensions.cs:12:23:12:24 | M2 | extensions.cs:12:33:12:37 | other | 1 | string | extensions.cs:12:33:12:37 | other |
| extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:14:43:14:43 | x | 0 | string | extensions.cs:14:43:14:43 | x |
| extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s |
| extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:16:39:16:39 | t | 1 | int | extensions.cs:16:39:16:39 | t |
| extensions.cs:16:18:16:35 | StringGenericM1<Int32> | extensions.cs:16:49:16:49 | o | 2 | object | extensions.cs:16:49:16:49 | o |
| extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s |
| extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:16:39:16:39 | t | 1 | string | extensions.cs:16:39:16:39 | t |
| extensions.cs:16:18:16:35 | StringGenericM1<String> | extensions.cs:16:49:16:49 | o | 2 | object | extensions.cs:16:49:16:49 | o |
| extensions.cs:16:18:16:35 | StringGenericM1`1 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s |
| extensions.cs:16:18:16:35 | StringGenericM1`1 | extensions.cs:16:39:16:39 | t | 1 | T | extensions.cs:16:39:16:39 | t |
| extensions.cs:16:18:16:35 | StringGenericM1`1 | extensions.cs:16:49:16:49 | o | 2 | object | extensions.cs:16:49:16:49 | o |
| extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:22:49:22:49 | s | 0 | string | extensions.cs:22:49:22:49 | s |
| extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | T | extensions.cs:26:20:26:20 | t |
| extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t |
| extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | string | extensions.cs:26:20:26:20 | t |
| extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t |
| extensions.cs:31:21:31:32 | GenericM2<Int32> | extensions.cs:31:36:31:40 | other | 1 | int | extensions.cs:31:36:31:40 | other |
| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:26:20:26:20 | t | 0 | T | extensions.cs:26:20:26:20 | t |
| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t |
| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:26:20:26:20 | t | 0 | string | extensions.cs:26:20:26:20 | t |
| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:31:36:31:40 | other | 1 | S | extensions.cs:31:36:31:40 | other |
| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:31:36:31:40 | other | 1 | S | extensions.cs:31:36:31:40 | other |
| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:31:36:31:40 | other | 1 | S | extensions.cs:31:36:31:40 | other |
| extensions.cs:32:21:32:35 | GenericStaticM1 | extensions.cs:26:20:26:20 | t | 0 | T | extensions.cs:26:20:26:20 | t |
| extensions.cs:32:21:32:35 | GenericStaticM1 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t |
| extensions.cs:32:21:32:35 | GenericStaticM1 | extensions.cs:26:20:26:20 | t | 0 | string | extensions.cs:26:20:26:20 | t |
| extensions.cs:33:28:33:45 | GenericStaticM2`1 | extensions.cs:33:49:33:53 | other | 0 | S | extensions.cs:33:49:33:53 | other |
| extensions.cs:33:28:33:45 | GenericStaticM2`1 | extensions.cs:33:49:33:53 | other | 0 | S | extensions.cs:33:49:33:53 | other |
| extensions.cs:33:28:33:45 | GenericStaticM2`1 | extensions.cs:33:49:33:53 | other | 0 | S | extensions.cs:33:49:33:53 | other |
| extensions.cs:40:24:40:25 | M3 | extensions.cs:40:39:40:39 | s | 0 | string | extensions.cs:40:39:40:39 | s |
extensionOperatorCallArgument
| extensions.cs:15:39:15:39 | * | extensions.cs:65:19:65:23 | call to operator * | extensions.cs:15:45:15:45 | a | 0 | extensions.cs:65:19:65:19 | 3 |
| extensions.cs:15:39:15:39 | * | extensions.cs:65:19:65:23 | call to operator * | extensions.cs:15:55:15:55 | b | 1 | extensions.cs:65:23:65:23 | access to local variable s |
| extensions.cs:15:39:15:39 | * | extensions.cs:79:9:79:38 | call to operator * | extensions.cs:15:45:15:45 | a | 0 | extensions.cs:79:34:79:34 | 3 |
| extensions.cs:15:39:15:39 | * | extensions.cs:79:9:79:38 | call to operator * | extensions.cs:15:55:15:55 | b | 1 | extensions.cs:79:37:79:37 | access to local variable s |
extensionOperatorCalls
| extensions.cs:65:19:65:23 | call to operator * | extensions.cs:15:39:15:39 | * | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).op_Multiply |
| extensions.cs:79:9:79:38 | call to operator * | extensions.cs:15:39:15:39 | * | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).op_Multiply |
extensionProperty
| extensions.cs:8:21:8:25 | Prop1 | extensions.cs:6:5:17:5 | extension(String) |
| extensions.cs:9:21:9:25 | Prop2 | extensions.cs:6:5:17:5 | extension(String) |
| extensions.cs:10:28:10:38 | StaticProp1 | extensions.cs:6:5:17:5 | extension(String) |
| extensions.cs:23:28:23:37 | StaticProp | extensions.cs:19:5:24:5 | extension(Object) |
| extensions.cs:28:21:28:32 | GenericProp1 | extensions.cs:26:5:35:5 | extension(Object)<Object> |
| extensions.cs:28:21:28:32 | GenericProp1 | extensions.cs:26:5:35:5 | extension(String)<String> |
| extensions.cs:28:21:28:32 | GenericProp1 | extensions.cs:26:5:35:5 | extension(T)`1 |
| extensions.cs:29:21:29:32 | GenericProp2 | extensions.cs:26:5:35:5 | extension(Object)<Object> |
| extensions.cs:29:21:29:32 | GenericProp2 | extensions.cs:26:5:35:5 | extension(String)<String> |
| extensions.cs:29:21:29:32 | GenericProp2 | extensions.cs:26:5:35:5 | extension(T)`1 |
extensionPropertyCall
| extensions.cs:50:19:50:25 | access to property Prop1 | extensions.cs:8:21:8:25 | Prop1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).Prop1 |
| extensions.cs:51:19:51:25 | access to property Prop2 | extensions.cs:9:21:9:25 | Prop2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).Prop2 |
| extensions.cs:52:9:52:15 | access to property Prop2 | extensions.cs:9:21:9:25 | Prop2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).Prop2 |
| extensions.cs:53:19:53:36 | access to property StaticProp1 | extensions.cs:10:28:10:38 | StaticProp1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticProp1 |
| extensions.cs:54:19:54:35 | access to property StaticProp | extensions.cs:23:28:23:37 | StaticProp | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticProp |
extensionAccessorCall
| extensions.cs:82:9:82:33 | call to extension accessor get_Prop1 | extensions.cs:8:30:8:41 | get_Prop1 | extensions.cs:8:21:8:25 | Prop1 | MyExtensions+extension(System.String).get_Prop1 |
| extensions.cs:83:9:83:33 | call to extension accessor get_Prop2 | extensions.cs:9:29:9:31 | get_Prop2 | extensions.cs:9:21:9:25 | Prop2 | MyExtensions+extension(System.String).get_Prop2 |
| extensions.cs:84:9:84:40 | call to extension accessor set_Prop2 | extensions.cs:9:50:9:52 | set_Prop2 | extensions.cs:9:21:9:25 | Prop2 | MyExtensions+extension(System.String).set_Prop2 |
| extensions.cs:85:9:85:37 | call to extension accessor get_StaticProp | extensions.cs:23:42:23:45 | get_StaticProp | extensions.cs:23:28:23:37 | StaticProp | MyExtensions+extension(System.Object).get_StaticProp |

View File

@@ -1,69 +0,0 @@
import csharp
query predicate extensionMethodCallArgument(
ExtensionMethodCall emc, ExtensionMethod em, Parameter p, int i, Expr e
) {
em.getFile().getBaseName() = "extensions.cs" and
emc.getTarget() = em and
em.getParameter(i) = p and
emc.getArgument(i) = e
}
query predicate extensionMethodCalls(
ExtensionMethodCall emc, ExtensionMethod em, Type t, string type
) {
em.getFile().getBaseName() = "extensions.cs" and
emc.getTarget() = em and
em.getDeclaringType() = t and
em.getFullyQualifiedNameDebug() = type
}
query predicate extensionParameter(
ExtensionMethod em, Parameter p, int i, string type, Parameter unbound
) {
em.getFile().getBaseName() = "extensions.cs" and
p = em.getParameter(i) and
type = p.getType().toStringWithTypes() and
unbound = p.getUnboundDeclaration()
}
query predicate extensionOperatorCallArgument(
ExtensionOperator op, ExtensionOperatorCall opc, Parameter p, int pos, Expr e
) {
opc.getTarget() = op and
op.getFile().getBaseName() = "extensions.cs" and
p = op.getParameter(pos) and
e = opc.getArgument(pos)
}
query predicate extensionOperatorCalls(
ExtensionOperatorCall opc, ExtensionOperator op, Type t, string type
) {
op.getFile().getBaseName() = "extensions.cs" and
opc.getTarget() = op and
op.getDeclaringType() = t and
op.getFullyQualifiedNameDebug() = type
}
query predicate extensionProperty(ExtensionProperty p, Type t) {
p.getFile().getBaseName() = "extensions.cs" and
p.getDeclaringType() = t
}
query predicate extensionPropertyCall(
ExtensionPropertyCall pc, ExtensionProperty p, Type t, string type
) {
p.getFile().getBaseName() = "extensions.cs" and
pc.getProperty() = p and
p.getDeclaringType() = t and
p.getFullyQualifiedNameDebug() = type
}
query predicate extensionAccessorCall(
MethodCall m, ExtensionAccessor a, ExtensionProperty p, string type
) {
p.getFile().getBaseName() = "extensions.cs" and
(a.(Getter).getDeclaration() = p or a.(Setter).getDeclaration() = p) and
m.getTargetAccessor() = a and
a.getFullyQualifiedNameDebug() = type
}

View File

@@ -1,2 +0,0 @@
semmle-extractor-options: /nostdlib /noconfig
semmle-extractor-options: --load-sources-from-project:${testdir}/../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj

View File

@@ -24,16 +24,3 @@ struct Equals1Struct
{
public override bool Equals(object other) => false;
}
#nullable enable
class NullableEquals1
{
public override bool Equals(object? other) => false;
}
class NullableEquals2 : IEquatable<NullableEquals2>
{
public bool Equals(NullableEquals2? other) => other != null;
public override bool Equals(object? other) => other is NullableEquals2 n && Equals(n);
}

View File

@@ -5,5 +5,3 @@
| Equals.cs:16:7:16:13 | Equals3 | Equals3.Equals(Equals3) | true |
| Equals.cs:21:8:21:21 | NoEqualsStruct | System.ValueType.Equals(object) | false |
| Equals.cs:23:8:23:20 | Equals1Struct | Equals1Struct.Equals(object) | true |
| Equals.cs:31:7:31:21 | NullableEquals1 | NullableEquals1.Equals(object) | true |
| Equals.cs:36:7:36:21 | NullableEquals2 | NullableEquals2.Equals(NullableEquals2) | true |

View File

@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
public class LambdaParameterModifiers
{
delegate void MyRef(ref int i1);
delegate void MyOut(out int i2);
delegate void MyIn(in int i3);
delegate void MyRefReadonly(ref readonly int i4);
delegate void MyScopedRef(scoped ref int i5);
public void M()
{
// Explicitly typed lambda parameters with modifiers.
var l1 = (ref int x1) => x1;
var l2 = (out int x2) => x2 = 0;
var l3 = (in int x3) => x3;
var l4 = (ref readonly int x4) => x4;
var l5 = (scoped ref int x5) => x5;
var l6 = (params IEnumerable<int> x6) => x6;
// Implicitly typed lambda parameters with modifiers.
MyRef l7 = (ref i1) => { };
MyOut l8 = (out i2) => i2 = 0;
MyIn l9 = (in i3) => { };
MyRefReadonly l10 = (ref readonly i4) => { };
MyScopedRef l11 = (scoped ref i5) => { };
}
}

View File

@@ -1,15 +1,4 @@
parameterModifier
| LambdaParameterModifiers.cs:16:27:16:28 | x1 | 1 |
| LambdaParameterModifiers.cs:17:27:17:28 | x2 | 2 |
| LambdaParameterModifiers.cs:18:26:18:27 | x3 | 5 |
| LambdaParameterModifiers.cs:19:36:19:37 | x4 | 6 |
| LambdaParameterModifiers.cs:20:34:20:35 | x5 | 1 |
| LambdaParameterModifiers.cs:21:43:21:44 | x6 | 3 |
| LambdaParameterModifiers.cs:24:25:24:26 | i1 | 1 |
| LambdaParameterModifiers.cs:25:25:25:26 | i2 | 2 |
| LambdaParameterModifiers.cs:26:23:26:24 | i3 | 5 |
| LambdaParameterModifiers.cs:27:43:27:44 | i4 | 6 |
| LambdaParameterModifiers.cs:28:39:28:40 | i5 | 1 |
| ParameterModifiers.cs:6:27:6:28 | p1 | 0 |
| ParameterModifiers.cs:7:30:7:31 | p2 | 5 |
| ParameterModifiers.cs:9:31:9:32 | p3 | 2 |
@@ -20,24 +9,13 @@ parameterModifier
parameterIsValue
| ParameterModifiers.cs:6:27:6:28 | p1 |
parameterIsIn
| LambdaParameterModifiers.cs:18:26:18:27 | x3 |
| LambdaParameterModifiers.cs:26:23:26:24 | i3 |
| ParameterModifiers.cs:7:30:7:31 | p2 |
parameterIsOut
| LambdaParameterModifiers.cs:17:27:17:28 | x2 |
| LambdaParameterModifiers.cs:25:25:25:26 | i2 |
| ParameterModifiers.cs:9:31:9:32 | p3 |
parameterIsRef
| LambdaParameterModifiers.cs:16:27:16:28 | x1 |
| LambdaParameterModifiers.cs:20:34:20:35 | x5 |
| LambdaParameterModifiers.cs:24:25:24:26 | i1 |
| LambdaParameterModifiers.cs:28:39:28:40 | i5 |
| ParameterModifiers.cs:14:31:14:32 | p4 |
parameterIsParams
| LambdaParameterModifiers.cs:21:43:21:44 | x6 |
| ParameterModifiers.cs:16:36:16:37 | p5 |
| ParameterModifiers.cs:20:47:20:48 | p7 |
parameterIsReadonlyRef
| LambdaParameterModifiers.cs:19:36:19:37 | x4 |
| LambdaParameterModifiers.cs:27:43:27:44 | i4 |
| ParameterModifiers.cs:18:40:18:41 | p6 |

View File

@@ -1,12 +1,7 @@
import csharp
class TestParameter extends Parameter {
TestParameter() {
this.getFile().getBaseName() = "ParameterModifiers.cs"
or
this.getFile().getBaseName() = "LambdaParameterModifiers.cs" and
this.getCallable() instanceof LambdaExpr
}
TestParameter() { this.getFile().getBaseName() = "ParameterModifiers.cs" }
}
query predicate parameterModifier(TestParameter p, int kind) { params(p, _, _, _, kind, _, _) }

View File

@@ -1,46 +0,0 @@
using System;
#nullable enable
namespace Test
{
class TestClass1 : IEquatable<TestClass1>
{
private int field1;
public bool Equals(TestClass1? param1)
{
return param1 != null && field1 == param1.field1;
}
public override bool Equals(object? param2)
{
return param2 is TestClass1 tc && Equals(tc);
}
public override int GetHashCode()
{
return field1;
}
}
class TestClass2
{
private string field2;
public TestClass2(string s)
{
field2 = s;
}
public override bool Equals(object? param3)
{
return param3 is TestClass2 tc && field2 == tc.field2;
}
public override int GetHashCode()
{
return field2?.GetHashCode() ?? 0;
}
}
}

View File

@@ -1,132 +0,0 @@
.. _codeql-cli-2.24.1:
==========================
CodeQL 2.24.1 (2026-02-05)
==========================
.. contents:: Contents
:depth: 2
:local:
:backlinks: none
This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the `code scanning section on the GitHub blog <https://github.blog/tag/code-scanning/>`__, `relevant GitHub Changelog updates <https://github.blog/changelog/label/application-security/>`__, `changes in the CodeQL extension for Visual Studio Code <https://marketplace.visualstudio.com/items/GitHub.vscode-codeql/changelog>`__, and the `CodeQL Action changelog <https://github.com/github/codeql-action/blob/main/CHANGELOG.md>`__.
Security Coverage
-----------------
CodeQL 2.24.1 runs a total of 491 security queries when configured with the Default suite (covering 166 CWE). The Extended suite enables an additional 135 queries (covering 35 more CWE).
CodeQL CLI
----------
Miscellaneous
~~~~~~~~~~~~~
* The vulnerable xwork-core 2.3.37 test dependency (CVE-2025-68493) has been removed. The CodeQL Java library has been updated to support both legacy Struts 2.x-6.x package names and Struts 7.x package names for analyzing user code.
Language Libraries
------------------
Bug Fixes
~~~~~~~~~
C/C++
"""""
* Fixed a bug in the :code:`GuardCondition` library which sometimes prevented binary logical operators from being recognized as guard conditions. As a result, queries using :code:`GuardCondition` may see improved results.
* Fixed a bug which caused :code:`Node.asDefinition()` to not have a result for certain assignments.
Java/Kotlin
"""""""""""
* Kotlin: The Kotlin extractor now registers as the last IR generation extension, ensuring that code generated by other compiler plugins (such as kotlinx.serialization) is correctly captured.
GitHub Actions
""""""""""""""
* Fixed a crash when analysing a :code:`${{ ... }}` expression over around 300 characters in length.
Breaking Changes
~~~~~~~~~~~~~~~~
Java/Kotlin
"""""""""""
* Support for Kotlin 1.6.x and 1.7.x series has been dropped
Minor Analysis Improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~
C/C++
"""""
* The :code:`Buffer.qll` library will no longer report incorrect buffer sizes on certain malformed databases. As a result, the queries :code:`cpp/static-buffer-overflow`, :code:`cpp/overflow-buffer`, :code:`cpp/badly-bounded-write`, :code:`cpp/overrunning-write`, :code:`cpp/overrunning-write-with-float`, and :code:`cpp/very-likely-overrunning-write` will report fewer false positives on such databases.
* Added :code:`taint` summary models and :code:`sql-injection` barrier models for the MySQL :code:`mysql_real_escape_string` and :code:`mysql_real_escape_string_quote` escaping functions.
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
C#
""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
* C# 14: Support for null-conditional assignments (such as :code:`c?.Prop = p`). Furthermore, the :code:`MaybeNullExpr` class now takes null-conditional access (such as :code:`?.`) into account when modeling potential null values.
Golang
""""""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
Java/Kotlin
"""""""""""
* Added support for Struts 7.x package names in the Struts framework library. The library now recognizes both the legacy :code:`com.opensymphony.xwork2` package names (Struts 2.x-6.x) and the new :code:`org.apache.struts2` package names (Struts 7.x+), maintaining backward compatibility while enabling analysis of code using the latest Struts versions.
* The query :code:`java/unreleased-lock` no longer applies to lock types with names ending in "Pool", as these typically manage a collection of resources and the :code:`lock` and :code:`unlock` methods typically only lock one resource at a time. This may lead to a reduction in false positives.
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
* When Maven-compatible private package registries are configured for an organisation for Default Setup, CodeQL will now configure Maven to also use these as plugin repositories. CodeQL previously already configured Maven to use them as regular package repositories. This should now allow Maven plugins to be obtained from private registries.
JavaScript/TypeScript
"""""""""""""""""""""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
Python
""""""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
* Added experimental query :code:`py/prompt-injection` to detect potential prompt injection vulnerabilities in code using LLMs.
* Added taint flow model and type model for :code:`agents` and :code:`openai` modules.
* Remote flow sources for the :code:`websockets` package have been modeled.
Ruby
""""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
Swift
"""""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
Rust
""""
* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed.
* Added type inference support for the :code:`FnMut(..) -> ..` and :code:`Fn(..) -> ..` traits. They now work in type parameter bounds and are implemented by closures.
New Features
~~~~~~~~~~~~
C/C++
"""""
* Added a subclass :code:`Embed` of :code:`PreprocessorDirective` for C23 and C++26 :code:`#embed` preprocessor directives.
* Added modules :code:`DataFlow::ParameterizedBarrierGuard` and :code:`DataFlow::ParameterizedInstructionBarrierGuard`. These modules provide the same features as :code:`DataFlow::BarrierGuard` and :code:`DataFlow::InstructionBarrierGuard`, but allow for an additional parameter to support properly using them in dataflow configurations that uses flow states.
Java/Kotlin
"""""""""""
* Kotlin versions up to 2.3.0 are now supported.
Python
""""""
* It is now possible to refer to list elements in the Python models-as-data language, via the :code:`ListElement` path.

View File

@@ -11,7 +11,6 @@ A list of queries for each suite and language `is available here <https://docs.g
.. toctree::
:maxdepth: 1
codeql-cli-2.24.1
codeql-cli-2.24.0
codeql-cli-2.23.9
codeql-cli-2.23.8

View File

@@ -17,7 +17,7 @@
.NET 5, .NET 6, .NET 7, .NET 8, .NET 9","``.sln``, ``.slnx``, ``.csproj``, ``.cs``, ``.cshtml``, ``.xaml``"
GitHub Actions,"Not applicable",Not applicable,"``.github/workflows/*.yml``, ``.github/workflows/*.yaml``, ``**/action.yml``, ``**/action.yaml``"
Go (aka Golang), "Go up to 1.26", "Go 1.11 or more recent", ``.go``
Go (aka Golang), "Go up to 1.25", "Go 1.11 or more recent", ``.go``
Java,"Java 7 to 25 [6]_","javac (OpenJDK and Oracle JDK),
Eclipse compiler for Java (ECJ) [7]_",``.java``

View File

@@ -4,7 +4,7 @@ inputs:
go-test-version:
description: Which Go version to use for running the tests
required: false
default: "~1.26.0"
default: "~1.25.0"
run-code-checks:
description: Whether to run formatting, code and qhelp generation checks
required: false

View File

@@ -1,9 +1,9 @@
package,sink,source,summary,sink:command-injection,sink:credentials-key,sink:jwt,sink:log-injection,sink:nosql-injection,sink:path-injection,sink:regex-use[0],sink:regex-use[1],sink:regex-use[c],sink:request-forgery,sink:request-forgery[TCP Addr + Port],sink:sql-injection,sink:url-redirection,sink:url-redirection[0],sink:url-redirection[receiver],sink:xpath-injection,source:commandargs,source:database,source:environment,source:file,source:remote,source:stdin,summary:taint,summary:value
,,,9,,,,,,,,,,,,,,,,,,,,,,,3,6
,,,8,,,,,,,,,,,,,,,,,,,,,,,3,5
archive/tar,,,5,,,,,,,,,,,,,,,,,,,,,,,5,
archive/zip,,,6,,,,,,,,,,,,,,,,,,,,,,,6,
bufio,,,17,,,,,,,,,,,,,,,,,,,,,,,17,
bytes,,,44,,,,,,,,,,,,,,,,,,,,,,,44,
bytes,,,43,,,,,,,,,,,,,,,,,,,,,,,43,
clevergo.tech/clevergo,1,,,,,,,,,,,,,,,,,1,,,,,,,,,
cloud.google.com/go/bigquery,1,,,,,,,,,,,,,,1,,,,,,,,,,,,
compress/bzip2,,,1,,,,,,,,,,,,,,,,,,,,,,,1,
@@ -18,7 +18,7 @@ context,,,5,,,,,,,,,,,,,,,,,,,,,,,5,
crypto,,,10,,,,,,,,,,,,,,,,,,,,,,,10,
database/sql,30,18,12,,,,,,,,,,,,30,,,,,,18,,,,,12,
encoding,,,81,,,,,,,,,,,,,,,,,,,,,,,81,
errors,,,4,,,,,,,,,,,,,,,,,,,,,,,4,
errors,,,3,,,,,,,,,,,,,,,,,,,,,,,3,
expvar,,,6,,,,,,,,,,,,,,,,,,,,,,,6,
fmt,3,,16,,,,3,,,,,,,,,,,,,,,,,,,16,
github.com/ChrisTrenkamp/goxpath,3,,,,,,,,,,,,,,,,,,3,,,,,,,,
1 package sink source summary sink:command-injection sink:credentials-key sink:jwt sink:log-injection sink:nosql-injection sink:path-injection sink:regex-use[0] sink:regex-use[1] sink:regex-use[c] sink:request-forgery sink:request-forgery[TCP Addr + Port] sink:sql-injection sink:url-redirection sink:url-redirection[0] sink:url-redirection[receiver] sink:xpath-injection source:commandargs source:database source:environment source:file source:remote source:stdin summary:taint summary:value
2 9 8 3 6 5
3 archive/tar 5 5
4 archive/zip 6 6
5 bufio 17 17
6 bytes 44 43 44 43
7 clevergo.tech/clevergo 1 1
8 cloud.google.com/go/bigquery 1 1
9 compress/bzip2 1 1
18 crypto 10 10
19 database/sql 30 18 12 30 18 12
20 encoding 81 81
21 errors 4 3 4 3
22 expvar 6 6
23 fmt 3 16 3 16
24 github.com/ChrisTrenkamp/goxpath 3 3

View File

@@ -32,7 +32,7 @@ Go framework & library support
`Revel <http://revel.github.io/>`_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,4
`SendGrid <https://github.com/sendgrid/sendgrid-go>`_,``github.com/sendgrid/sendgrid-go*``,,1,
`Squirrel <https://github.com/Masterminds/squirrel>`_,"``github.com/Masterminds/squirrel*``, ``github.com/lann/squirrel*``, ``gopkg.in/Masterminds/squirrel``",81,,96
`Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,612,104
`Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,609,104
`XORM <https://xorm.io>`_,"``github.com/go-xorm/xorm*``, ``xorm.io/xorm*``",,,68
`XPath <https://github.com/antchfx/xpath>`_,``github.com/antchfx/xpath*``,,,4
`appleboy/gin-jwt <https://github.com/appleboy/gin-jwt>`_,``github.com/appleboy/gin-jwt*``,,,1
@@ -74,5 +74,5 @@ Go framework & library support
`xpathparser <https://github.com/santhosh-tekuri/xpathparser>`_,``github.com/santhosh-tekuri/xpathparser*``,,,2
`yaml <https://gopkg.in/yaml.v3>`_,``gopkg.in/yaml*``,,9,
`zap <https://go.uber.org/zap>`_,``go.uber.org/zap*``,,11,33
Totals,,688,1072,1557
Totals,,688,1069,1557

View File

@@ -12,7 +12,7 @@ import (
)
var minGoVersion = util.NewSemVer("1.11")
var maxGoVersion = util.NewSemVer("1.26")
var maxGoVersion = util.NewSemVer("1.25")
type versionInfo struct {
goModVersion util.SemVer // The version of Go found in the go directive in the `go.mod` file.

View File

@@ -1,23 +1,22 @@
module github.com/github/codeql-go/extractor
go 1.26
go 1.25
toolchain go1.26.0
toolchain go1.25.0
// when updating this, run
// bazel run @rules_go//go -- mod tidy
// when adding or removing dependencies, run
// bazel mod tidy
require (
golang.org/x/mod v0.33.0
golang.org/x/tools v0.42.0
golang.org/x/mod v0.32.0
golang.org/x/tools v0.41.0
)
require github.com/stretchr/testify v1.11.1
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
golang.org/x/sync v0.19.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@@ -6,13 +6,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=
golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -1,4 +0,0 @@
---
category: majorAnalysis
---
* Go 1.26 is now supported.

View File

@@ -11,4 +11,3 @@ extensions:
- ["", "", False, "copy", "", "", "Argument[1].ArrayElement", "Argument[0].ArrayElement", "value", "manual"]
- ["", "", False, "max", "", "", "Argument[0..1000]", "ReturnValue", "value", "manual"]
- ["", "", False, "min", "", "", "Argument[0..1000]", "ReturnValue", "value", "manual"]
- ["", "", False, "new", "", "", "Argument[0]", "ReturnValue.Dereference", "value", "manual"]

View File

@@ -43,7 +43,6 @@ extensions:
- ["bytes", "", False, "TrimSuffix", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["bytes", "Buffer", True, "Bytes", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
- ["bytes", "Buffer", True, "Next", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
- ["bytes", "Buffer", True, "Peek", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
- ["bytes", "Buffer", True, "ReadBytes", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
- ["bytes", "Buffer", True, "ReadString", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
- ["bytes", "Reader", True, "Reset", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]

View File

@@ -4,6 +4,5 @@ extensions:
extensible: summaryModel
data:
- ["errors", "", False, "As", "", "", "Argument[0]", "Argument[1]", "taint", "manual"]
- ["errors", "", False, "AsType", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
- ["errors", "", False, "New", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["errors", "", False, "Unwrap", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]

View File

@@ -84,16 +84,6 @@ class AstNode extends @node, Locatable {
pragma[nomagic]
FuncDef getEnclosingFunction() { result = this.getParent().parentInSameFunction*() }
/** Gets the innermost block statement to which this AST node belongs, if any. */
BlockStmt getEnclosingBlock() {
exists(AstNode p | p = this.getParent() |
result = p
or
not p instanceof BlockStmt and
result = p.getEnclosingBlock()
)
}
/**
* Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.
*/

View File

@@ -153,10 +153,7 @@ module ModelValidation {
not part = "" and
not (part = "Argument" and pred = "sink") and
not parseArg(part, _) and
// If the database does not contain any fields/pointer types then no
// FieldContent/PointerContent exists, so we spuriously think that
// these spec components are invalid.
not part.getName() = ["Field", "Dereference"]
not part.getName() = "Field"
or
part = input.getToken(0) and
parseParam(part, _)
@@ -179,10 +176,7 @@ module ModelValidation {
invalidSpecComponent(output, part) and
not part = "" and
not (part = ["Argument", "Parameter"] and pred = "source") and
// If the database does not contain any fields/pointer types then no
// FieldContent/PointerContent exists, so we spuriously think that
// these spec components are invalid.
not part.getName() = ["Field", "Dereference"]
not part.getName() = "Field"
or
invalidIndexComponent(output, part)
) and

View File

@@ -1,5 +1,5 @@
module semmle.go.Packages
go 1.26
go 1.13
require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000

View File

@@ -44,6 +44,4 @@ invalidModelRow
| test.go:199:23:199:26 | arg2 | qltest |
| test.go:199:29:199:32 | arg3 | qltest |
| test.go:202:22:202:25 | temp | qltest |
| test.go:204:10:204:17 | call to new | qltest |
| test.go:205:10:205:18 | star expression | qltest |
| test.go:209:10:209:12 | src | qltest |
| test.go:206:10:206:12 | src | qltest |

View File

@@ -22,4 +22,4 @@ invalidModelRow
| test.go:187:24:187:31 | call to Src1 | qltest |
| test.go:191:24:191:31 | call to Src1 | qltest |
| test.go:201:10:201:28 | selection of SourceVariable | qltest |
| test.go:208:15:208:17 | definition of src | qltest |
| test.go:205:15:205:17 | definition of src | qltest |

View File

@@ -200,9 +200,6 @@ func simpleflow() {
temp := test.SourceVariable
test.SinkVariable = temp // $ hasTaintFlow="temp"
b.Sink1(new(src)) // $ hasTaintFlow="call to new"
b.Sink1(*new(src)) // $ hasTaintFlow="star expression"
}
func srcParam(src string, b test.B) {

View File

@@ -1,5 +1,5 @@
module semmle.go.Packages
go 1.26
go 1.21
require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000

View File

@@ -50,6 +50,4 @@ invalidModelRow
| test.go:206:10:206:26 | call to min | qltest |
| test.go:207:10:207:26 | call to min | qltest |
| test.go:210:22:210:25 | temp | qltest |
| test.go:212:10:212:17 | call to new | qltest |
| test.go:213:10:213:18 | star expression | qltest |
| test.go:217:10:217:12 | src | qltest |
| test.go:214:10:214:12 | src | qltest |

View File

@@ -22,4 +22,4 @@ invalidModelRow
| test.go:187:24:187:31 | call to Src1 | qltest |
| test.go:191:24:191:31 | call to Src1 | qltest |
| test.go:209:10:209:28 | selection of SourceVariable | qltest |
| test.go:216:15:216:17 | definition of src | qltest |
| test.go:213:15:213:17 | definition of src | qltest |

View File

@@ -208,9 +208,6 @@ func simpleflow() {
temp := test.SourceVariable
test.SinkVariable = temp // $ hasValueFlow="temp"
b.Sink1(new(src))
b.Sink1(*new(src)) // $ hasValueFlow="star expression"
}
func srcParam(src string, b test.B) {

View File

@@ -1,116 +0,0 @@
package main
// Also tested in go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow
// and go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow.
func TaintStepTest_Append1(sourceCQL interface{}) interface{} {
from := sourceCQL.([]byte)
var intoInterface interface{}
intoInterface = append(from, "a string"...)
return intoInterface
}
func TaintStepTest_Append2(sourceCQL interface{}) interface{} {
from := sourceCQL.(int)
slice := []int{from}
var intoInterface []int
intoInterface = append(slice, 0)
return intoInterface[0]
}
func TaintStepTest_Append3(sourceCQL interface{}) interface{} {
from := sourceCQL.(string)
var intoInterface interface{}
intoInterface = append([]byte{}, from...)
return intoInterface
}
func TaintStepTest_Append4(sourceCQL interface{}) interface{} {
from := sourceCQL.(int)
var intoInterface []int
intoInterface = append([]int{}, 0, from, 1)
return intoInterface[0]
}
func TaintStepTest_Copy1(sourceCQL interface{}) interface{} {
from := sourceCQL.(string)
var intoInterface []byte
copy(intoInterface, from)
return intoInterface
}
func TaintStepTest_Copy2(sourceCQL interface{}) interface{} {
from := []int{sourceCQL.(int)}
var intoInterface []int
copy(intoInterface, from)
return intoInterface[0]
}
func TaintStepTest_Max(sourceCQL interface{}) interface{} {
from := sourceCQL.(int)
var intoInterface int
intoInterface = max(0, 1, from, 2, 3)
return intoInterface
}
func TaintStepTest_Min(sourceCQL interface{}) interface{} {
from := sourceCQL.(int)
var intoInterface int
intoInterface = min(0, 1, from, 2, 3)
return intoInterface
}
func TaintStepTest_New(sourceCQL interface{}) interface{} {
from := sourceCQL.(int)
var intoInterface *int
intoInterface = new(from)
return *intoInterface
}
func RunAllTaints_Builtin() {
{
source := newSource(0)
out := TaintStepTest_Append1(source)
sink(0, out)
}
{
source := newSource(1)
out := TaintStepTest_Append2(source)
sink(1, out)
}
{
source := newSource(2)
out := TaintStepTest_Append3(source)
sink(2, out)
}
{
source := newSource(3)
out := TaintStepTest_Append4(source)
sink(3, out)
}
{
source := newSource(4)
out := TaintStepTest_Copy1(source)
sink(4, out)
}
{
source := newSource(5)
out := TaintStepTest_Copy2(source)
sink(5, out)
}
{
source := newSource(3)
out := TaintStepTest_Max(source)
sink(3, out)
}
{
source := newSource(4)
out := TaintStepTest_Min(source)
sink(4, out)
}
{
source := newSource(5)
out := TaintStepTest_New(source)
sink(5, out)
}
}

View File

@@ -349,12 +349,6 @@ func TaintStepTest_CutSuffix(sourceCQL interface{}) interface{} {
return result
}
func TaintStepTest_BytesBufferPeek(sourceCQL interface{}) interface{} {
fromBuffer := sourceCQL.(bytes.Buffer)
intoByte, _ := fromBuffer.Peek(128)
return intoByte
}
func RunAllTaints_Bytes() {
{
source := newSource(0)
@@ -631,9 +625,4 @@ func RunAllTaints_Bytes() {
out := TaintStepTest_Clone(source)
sink(54, out)
}
{
source := newSource(55)
out := TaintStepTest_BytesBufferPeek(source)
sink(55, out)
}
}

View File

@@ -35,13 +35,6 @@ func TaintStepTest_ErrorsJoin2(sourceCQL interface{}) interface{} {
return intoError957
}
func TaintStepTest_ErrorsAsType(sourceCQL interface{}) interface{} {
fromError := sourceCQL.(error)
var intoInterface interface{}
intoInterface, _ = errors.AsType[error](fromError)
return intoInterface
}
func RunAllTaints_Errors() {
{
source := newSource(0)
@@ -68,9 +61,4 @@ func RunAllTaints_Errors() {
out := TaintStepTest_ErrorsJoin2(source)
sink(4, out)
}
{
source := newSource(5)
out := TaintStepTest_ErrorsAsType(source)
sink(5, out)
}
}

Some files were not shown because too many files have changed in this diff Show More