Skip to content

Commit 97d4a12

Browse files
committed
C++: Add non-returning function test case using __builtin_expect
1 parent c015ef6 commit 97d4a12

File tree

1 file changed

+5
-0
lines changed
  • cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114

1 file changed

+5
-0
lines changed

cpp/ql/test/query-tests/jsf/4.13 Functions/AV Rule 114/test.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,8 @@ _Noreturn void f15();
105105
int f16() {
106106
f15(); // GOOD
107107
}
108+
109+
int f17() {
110+
if (__builtin_expect(1, 0))
111+
__builtin_unreachable(); // GOOD
112+
}

0 commit comments

Comments
 (0)