Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a5ac08 commit 42bf1beCopy full SHA for 42bf1be
1 file changed
cpp/ql/test/query-tests/Best Practices/Likely Errors/EmptyBlock/empty_block.cpp
@@ -56,4 +56,29 @@ int f(int x) {
56
57
// GOOD (has comment): [FALSE POSITIVE]
58
if (x) {} // comment
59
+
60
+ // GOOD
61
+ if (x) {
62
+ if constexpr(1) {
63
+ f();
64
+ }
65
66
67
68
69
+ if constexpr(0) {
70
71
72
73
74
75
76
77
78
+ } else {
79
80
81
82
83
+ return 1;
84
}
0 commit comments