Skip to content

Commit a749212

Browse files
committed
C#: Handle op_Checked* operators in the extractor
1 parent eda0287 commit a749212

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/UserOperator.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Microsoft.CodeAnalysis.CSharp.Syntax;
33
using System.IO;
44
using System.Linq;
5+
using System.Text.RegularExpressions;
56

67
namespace Semmle.Extraction.CSharp.Entities
78
{
@@ -161,6 +162,9 @@ public static bool OperatorSymbol(string methodName, out string operatorName)
161162
case "op_False":
162163
operatorName = "false";
163164
break;
165+
case var @checked when Regex.IsMatch(@checked, "^op_Checked.*"):
166+
operatorName = @checked;
167+
break;
164168
default:
165169
operatorName = methodName;
166170
success = false;

0 commit comments

Comments
 (0)