C#: Add test for the new lock type.

This commit is contained in:
Michael Nebel
2024-12-20 15:02:36 +01:00
parent 29a0db8053
commit 1aa7c3fdcc
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1 @@
| statements.cs:285:13:288:13 | lock (...) {...} | statements.cs:285:19:285:28 | access to field lockObject | Lock | statements.cs:286:13:288:13 | {...} |

View File

@@ -0,0 +1,8 @@
import csharp
from Method m, LockStmt ls, Expr lockExpr
where
ls.getEnclosingCallable() = m and
m.getName() = "LockMethod" and
lockExpr = ls.getExpr()
select ls, lockExpr, lockExpr.getType().toString(), ls.getBlock()