Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 630233f

Browse files
committed
CPP: Additional test cases.
1 parent ec2bf91 commit 630233f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
| empty_block.cpp:7:10:7:11 | { ... } | Empty block without comment |
22
| empty_block.cpp:10:10:11:3 | { ... } | Empty block without comment |
33
| empty_block.cpp:18:10:19:3 | { ... } | Empty block without comment |
4+
| empty_block.cpp:53:10:53:11 | { ... } | Empty block without comment |
5+
| empty_block.cpp:56:10:56:11 | { ... } | Empty block without comment |

cpp/ql/test/query-tests/Best Practices/Likely Errors/EmptyBlock/empty_block.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,10 @@ int f(int x) {
4848

4949
// GOOD (no block)
5050
for (;;) ;
51+
52+
// GOOD (has comment): [FALSE POSITIVE]
53+
if (x) {} // comment
54+
55+
// GOOD (has comment): [FALSE POSITIVE]
56+
if (x) {} // comment
5157
}

0 commit comments

Comments
 (0)