diff options
Diffstat (limited to 'clang/test/CodeGen/catch-undef-behavior.c')
-rw-r--r-- | clang/test/CodeGen/catch-undef-behavior.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/catch-undef-behavior.c b/clang/test/CodeGen/catch-undef-behavior.c index 5832b6c830f..53dda5c8b28 100644 --- a/clang/test/CodeGen/catch-undef-behavior.c +++ b/clang/test/CodeGen/catch-undef-behavior.c @@ -44,3 +44,11 @@ int rsh_inbounds(int a, int b) { // CHECK-NEXT: ret i32 %[[RET]] return a >> b; } + +// CHECK: @no_return +int no_return() { + // Reaching the end of a noreturn function is fine in C. + // CHECK-NOT: call + // CHECK-NOT: unreachable + // CHECK: ret i32 +} |