mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #8815 from jketema/unreachable-test-case
C++: Add non-returning function test case using `__builtin_expect`
This commit is contained in:
@@ -105,3 +105,8 @@ _Noreturn void f15();
|
||||
int f16() {
|
||||
f15(); // GOOD
|
||||
}
|
||||
|
||||
int f17() {
|
||||
if (__builtin_expect(1, 0))
|
||||
__builtin_unreachable(); // GOOD
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user