mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
C#: Handle Nullable<T> default parameter values in assemblies
This commit is contained in:
@@ -426,6 +426,16 @@ namespace Semmle.Extraction
|
||||
ReportError(new InternalError(symbol, msg));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signal an error in the program model.
|
||||
/// </summary>
|
||||
/// <param name="loc">The location of the error.</param>
|
||||
/// <param name="msg">The error message.</param>
|
||||
public void ModelError(Entities.Location loc, string msg)
|
||||
{
|
||||
ReportError(new InternalError(loc.ReportingLocation, msg));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signal an error in the program model.
|
||||
/// </summary>
|
||||
|
||||
@@ -23,6 +23,13 @@ namespace Semmle.Extraction
|
||||
Location = node.GetLocation();
|
||||
}
|
||||
|
||||
public InternalError(Location? loc, string msg)
|
||||
{
|
||||
Text = msg;
|
||||
EntityText = "";
|
||||
Location = loc;
|
||||
}
|
||||
|
||||
public InternalError(string msg)
|
||||
{
|
||||
Text = msg;
|
||||
|
||||
Reference in New Issue
Block a user