-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18348 from michaelnebel/csharp/locktype
C# 13: [TEST ONLY] Add test using the System.Threading.Lock type.
- Loading branch information
Showing
49 changed files
with
737 additions
and
699 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:10:21:10:24 | Main | | ||
| statements.cs:11:21:11:24 | Main | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:146:21:146:29 | MainBreak | statements.cs:151:32:151:37 | break; | | ||
| statements.cs:147:21:147:29 | MainBreak | statements.cs:152:32:152:37 | break; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:233:13:236:13 | checked {...} | statements.cs:234:13:236:13 | {...} | | ||
| statements.cs:234:13:237:13 | checked {...} | statements.cs:235:13:237:13 | {...} | |
4 changes: 2 additions & 2 deletions
4
csharp/ql/test/library-tests/statements/CompilerGenerated.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
| fixed.cs:3:7:3:11 | {...} | fixed.cs:3:7:3:11 | Fixed | | ||
| statements.cs:7:11:7:15 | {...} | statements.cs:7:11:7:15 | Class | | ||
| statements.cs:243:15:243:25 | {...} | statements.cs:243:15:243:25 | AccountLock | | ||
| statements.cs:8:11:8:15 | {...} | statements.cs:8:11:8:15 | Class | | ||
| statements.cs:244:15:244:25 | {...} | statements.cs:244:15:244:25 | AccountLock | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:156:21:156:32 | MainContinue | statements.cs:160:46:160:54 | continue; | | ||
| statements.cs:157:21:157:32 | MainContinue | statements.cs:161:46:161:54 | continue; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:120:21:120:26 | MainDo | statements.cs:123:13:127:32 | do ... while (...); | | ||
| statements.cs:121:21:121:26 | MainDo | statements.cs:124:13:128:32 | do ... while (...); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:47:21:47:28 | MainExpr | | ||
| statements.cs:48:21:48:28 | MainExpr | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:132:13:135:13 | for (...;...;...) ... | statements.cs:132:29:132:43 | ... < ... | | ||
| statements.cs:133:13:136:13 | for (...;...;...) ... | statements.cs:133:29:133:43 | ... < ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:132:13:135:13 | for (...;...;...) ... | statements.cs:132:46:132:48 | ...++ | | ||
| statements.cs:133:13:136:13 | for (...;...;...) ... | statements.cs:133:46:133:48 | ...++ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:132:13:135:13 | for (...;...;...) ... | statements.cs:132:22:132:26 | Int32 i = ... | | ||
| statements.cs:133:13:136:13 | for (...;...;...) ... | statements.cs:133:22:133:26 | Int32 i = ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:138:21:138:31 | MainForeach | | ||
| statements.cs:139:21:139:31 | MainForeach | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:140:13:143:13 | foreach (... ... in ...) ... | statements.cs:140:29:140:29 | s | | ||
| statements.cs:141:13:144:13 | foreach (... ... in ...) ... | statements.cs:141:29:141:29 | s | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:165:21:165:28 | MainGoto | statements.cs:168:13:168:23 | goto ...; | | ||
| statements.cs:166:21:166:28 | MainGoto | statements.cs:169:13:169:23 | goto ...; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:165:21:165:28 | MainGoto | statements.cs:170:41:170:50 | goto ...; | | ||
| statements.cs:166:21:166:28 | MainGoto | statements.cs:171:37:171:46 | goto ...; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:58:13:65:13 | if (...) ... | statements.cs:63:13:65:13 | {...} | | ||
| statements.cs:59:13:66:13 | if (...) ... | statements.cs:64:13:66:13 | {...} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:272:21:272:31 | MainLabeled | statements.cs:275:13:275:17 | Label: | | ||
| statements.cs:273:21:273:31 | MainLabeled | statements.cs:276:9:276:13 | Label: | |
2 changes: 1 addition & 1 deletion
2
csharp/ql/test/library-tests/statements/LocalConstDecl1.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:40:21:40:38 | MainLocalConstDecl | statements.cs:42:13:42:40 | const ... ...; | statements.cs:42:25:42:39 | Single pi = ... | 3.1415927 | | ||
| statements.cs:41:21:41:38 | MainLocalConstDecl | statements.cs:43:13:43:40 | const ... ...; | statements.cs:43:25:43:39 | Single pi = ... | 3.1415927 | |
2 changes: 1 addition & 1 deletion
2
csharp/ql/test/library-tests/statements/LocalConstDecl2.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:40:21:40:38 | MainLocalConstDecl | statements.cs:43:13:43:33 | const ... ...; | statements.cs:43:23:43:32 | Int32 r = ... | | ||
| statements.cs:41:21:41:38 | MainLocalConstDecl | statements.cs:44:13:44:33 | const ... ...; | statements.cs:44:23:44:32 | Int32 r = ... | |
2 changes: 1 addition & 1 deletion
2
csharp/ql/test/library-tests/statements/LocalConstDecl3.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:40:21:40:38 | MainLocalConstDecl | statements.cs:43:13:43:33 | const ... ...; | statements.cs:43:23:43:32 | Int32 r = ... | | ||
| statements.cs:41:21:41:38 | MainLocalConstDecl | statements.cs:44:13:44:33 | const ... ...; | statements.cs:44:23:44:32 | Int32 r = ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:30:21:30:36 | MainLocalVarDecl | statements.cs:32:13:32:18 | ... ...; | statements.cs:32:17:32:17 | Int32 a | | ||
| statements.cs:31:21:31:36 | MainLocalVarDecl | statements.cs:33:13:33:18 | ... ...; | statements.cs:33:17:33:17 | Int32 a | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:30:21:30:36 | MainLocalVarDecl | statements.cs:33:13:33:29 | ... ...; | statements.cs:33:17:33:21 | Int32 b = ... | | ||
| statements.cs:31:21:31:36 | MainLocalVarDecl | statements.cs:34:13:34:29 | ... ...; | statements.cs:34:17:34:21 | Int32 b = ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:30:21:30:36 | MainLocalVarDecl | statements.cs:33:13:33:29 | ... ...; | statements.cs:33:17:33:21 | Int32 b = ... | statements.cs:33:24:33:28 | Int32 c = ... | | ||
| statements.cs:31:21:31:36 | MainLocalVarDecl | statements.cs:34:13:34:29 | ... ...; | statements.cs:34:17:34:21 | Int32 b = ... | statements.cs:34:24:34:28 | Int32 c = ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:30:21:30:36 | MainLocalVarDecl | statements.cs:32:13:32:18 | ... ...; | statements.cs:32:17:32:17 | Int32 a | | ||
| statements.cs:31:21:31:36 | MainLocalVarDecl | statements.cs:33:13:33:18 | ... ...; | statements.cs:33:17:33:17 | Int32 a | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:30:21:30:36 | MainLocalVarDecl | statements.cs:37:13:37:27 | ... ...; | statements.cs:37:17:37:26 | String y = ... | | ||
| statements.cs:31:21:31:36 | MainLocalVarDecl | statements.cs:38:13:38:27 | ... ...; | statements.cs:38:17:38:26 | String y = ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
| statements.cs:248:17:255:17 | lock (...) {...} | statements.cs:248:23:248:26 | this access | statements.cs:249:17:255:17 | {...} | | ||
| statements.cs:249:17:256:17 | lock (...) {...} | statements.cs:249:23:249:26 | this access | statements.cs:250:17:256:17 | {...} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | {...} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
Oops, something went wrong.