blob: 8f0b3c4f879ddd1267313482556bf6dcc5bb2516 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
void empty_try_block_with_catch_all() {
try {} catch (...) {}
}
// CIR: cir.func{{.*}} @_Z30empty_try_block_with_catch_allv()
// CIR: cir.return
// LLVM: define{{.*}} void @_Z30empty_try_block_with_catch_allv()
// LLVM: ret void
// OGCG: define{{.*}} void @_Z30empty_try_block_with_catch_allv()
// OGCG: ret void
void empty_try_block_with_catch_with_int_exception() {
try {} catch (int e) {}
}
// CIR: cir.func{{.*}} @_Z45empty_try_block_with_catch_with_int_exceptionv()
// CIR: cir.return
// LLVM: define{{.*}} void @_Z45empty_try_block_with_catch_with_int_exceptionv()
// LLVM: ret void
// OGCG: define{{.*}} void @_Z45empty_try_block_with_catch_with_int_exceptionv()
// OGCG: ret void
|