File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed
cpp/ql/test/library-tests/stmt/leave Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ // semmle-extractor-options: --microsoft
2+ void leave_try_finally_test (bool condition){
3+ __try {
4+ if (condition){
5+ __leave;
6+ }
7+ }
8+ __finally {
9+ }
10+ }
11+
12+ int except_handler ();
13+
14+ void leave_try_except_test (bool condition){
15+ __try {
16+ try {
17+ if (condition)
18+ __leave;
19+ }
20+ catch (...) {
21+ }
22+ if (condition){
23+ __leave;
24+ }
25+ }
26+ __except (except_handler ()) {
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ | leave.cpp:5:8:5:15 | __leave; | leave.cpp:3:5:7:5 | __try { ... } __finally { ... } |
2+ | leave.cpp:18:17:18:24 | __leave; | leave.cpp:15:5:25:5 | __try { ... } __except( ... ) { ... } |
3+ | leave.cpp:23:13:23:20 | __leave; | leave.cpp:15:5:25:5 | __try { ... } __except( ... ) { ... } |
Original file line number Diff line number Diff line change 1+ import cpp
2+
3+ from LeaveStmt s
4+ select s , s .getEnclosingTry ( )
You can’t perform that action at this time.
0 commit comments