1 parent 59b7458 commit 344f808Copy full SHA for 344f808
1 file changed
cpp/ql/test/query-tests/Likely Bugs/Likely Typos/FutileConditional/FutileConditional.cpp
@@ -1,15 +1,19 @@
1
void emptyIfs(int value) {
2
- if (value) {} // $ Alert
+ if (value) {} // $ Alert[cpp/empty-if]
3
4
if (value > 1) {
5
- } // $ Alert
+ } // $ Alert[cpp/empty-if]
6
7
- if (value) {
+ if (value) { // good
8
++value;
9
}
10
11
12
} else {
13
14
15
+
16
+ if (value) { // $ MISSING: Alert[cpp/empty-if]
17
+ } else {
18
+ }
19
0 commit comments