File tree 5 files changed +119
-6
lines changed
5 files changed +119
-6
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
2
+ // RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
3
+ // RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
4
+ // RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
5
+ // RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
6
+ // RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
7
+ // RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
8
+
9
+ #if __cplusplus == 199711L
10
+ #define NOTHROW throw ()
11
+ #else
12
+ #define NOTHROW noexcept (true )
13
+ #endif
14
+
15
+ namespace dr201 { // dr201: 2.8
16
+
17
+ extern void full_expr_fence () NOTHROW;
18
+
19
+ struct A {
20
+ ~A () NOTHROW {}
21
+ };
22
+
23
+ struct B {
24
+ B (A) NOTHROW {}
25
+ ~B () NOTHROW {}
26
+ };
27
+
28
+ void foo () {
29
+ full_expr_fence ();
30
+ B b = A ();
31
+ full_expr_fence ();
32
+ }
33
+
34
+ // CHECK-LABEL: define {{.*}} void @dr201::foo()
35
+ // CHECK: call void @dr201::full_expr_fence()
36
+ // CHECK: call void @dr201::B::B(dr201::A)
37
+ // CHECK: call void @dr201::A::~A()
38
+ // CHECK: call void @dr201::full_expr_fence()
39
+ // CHECK: call void @dr201::B::~B()
40
+ // CHECK-LABEL: }
41
+
42
+ } // namespace dr201
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
2
+ // RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
3
+ // RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
4
+ // RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
5
+ // RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
6
+ // RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
7
+ // RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
8
+
9
+ #if __cplusplus == 199711L
10
+ #pragma clang diagnostic push
11
+ #pragma clang diagnostic ignored "-Wvariadic-macros"
12
+ #define static_assert (...) __extension__ _Static_assert (__VA_ARGS__)
13
+ #pragma clang diagnostic pop
14
+ #endif
15
+
16
+ namespace dr210 { // dr210: 2.7
17
+ struct B {
18
+ long i;
19
+ B ();
20
+ virtual ~B ();
21
+ };
22
+
23
+ static_assert (sizeof (B) == 16 , " " );
24
+
25
+ struct D : B {
26
+ long j;
27
+ D ();
28
+ };
29
+
30
+ static_assert (sizeof (D) == 24 , " " );
31
+
32
+ void toss (const B* b) {
33
+ throw *b;
34
+ }
35
+
36
+ // CHECK-LABEL: define {{.*}} void @dr210::toss(dr210::B const*)
37
+ // CHECK: %[[EXCEPTION:.*]] = call ptr @__cxa_allocate_exception(i64 16)
38
+ // CHECK: call void @__cxa_throw(ptr %[[EXCEPTION]], ptr @typeinfo for dr210::B, ptr @dr210::B::~B())
39
+ // CHECK-LABEL: }
40
+
41
+ } // namespace dr210
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
2
+ // RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
3
+ // RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
4
+ // RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
5
+ // RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
6
+ // RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
7
+ // RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK
8
+
9
+ namespace dr292 { // dr292: 2.9
10
+
11
+ extern int g ();
12
+
13
+ struct A {
14
+ A (int ) throw () {}
15
+ };
16
+
17
+ void f () {
18
+ new A (g ());
19
+ }
20
+
21
+ // CHECK-LABEL: define {{.*}} void @dr292::f()()
22
+ // CHECK: %[[CALL:.+]] = call {{.*}} @operator new(unsigned long)({{.*}})
23
+ // CHECK: invoke {{.*}} i32 @dr292::g()()
24
+ // CHECK-NEXT: to {{.*}} unwind label %lpad
25
+ // CHECK-LABEL: lpad:
26
+ // CHECK: call void @operator delete(void*)(ptr {{.*}} %[[CALL]])
27
+ // CHECK-LABEL: eh.resume:
28
+ // CHECK-LABEL: }
29
+
30
+ } // namespace dr292
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ namespace dr200 { // dr200: dup 214
26
26
}
27
27
}
28
28
29
- // dr201 FIXME: write codegen test
29
+ // dr201 is in dr201.cpp
30
30
31
31
namespace dr202 { // dr202: 3.1
32
32
template <typename T> T f ();
@@ -76,7 +76,7 @@ namespace dr209 { // dr209: 3.2
76
76
};
77
77
}
78
78
79
- // dr210 FIXME: write codegen test
79
+ // dr210 is in dr210.cpp
80
80
81
81
namespace dr211 { // dr211: yes
82
82
struct A {
@@ -1188,7 +1188,7 @@ namespace dr289 { // dr289: yes
1188
1188
1189
1189
// dr290: na
1190
1190
// dr291: dup 391
1191
- // dr292 FIXME: write a codegen test
1191
+ // dr292 is in dr292.cpp
1192
1192
1193
1193
namespace dr294 { // dr294: no
1194
1194
void f () throw(int );
Original file line number Diff line number Diff line change @@ -1244,7 +1244,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1244
1244
<td><a href="https://cplusplus.github.io/CWG/issues/201.html">201</a></td>
1245
1245
<td>CD1</td>
1246
1246
<td>Order of destruction of temporaries in initializers</td>
1247
- <td class="unknown " align="center">Unknown </td>
1247
+ <td class="full " align="center">Clang 2.8 </td>
1248
1248
</tr>
1249
1249
<tr id="202">
1250
1250
<td><a href="https://cplusplus.github.io/CWG/issues/202.html">202</a></td>
@@ -1299,7 +1299,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1299
1299
<td><a href="https://cplusplus.github.io/CWG/issues/210.html">210</a></td>
1300
1300
<td>TC1</td>
1301
1301
<td>What is the type matched by an exception handler?</td>
1302
- <td class="unknown " align="center">Unknown </td>
1302
+ <td class="full " align="center">Clang 2.7 </td>
1303
1303
</tr>
1304
1304
<tr id="211">
1305
1305
<td><a href="https://cplusplus.github.io/CWG/issues/211.html">211</a></td>
@@ -1792,7 +1792,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1792
1792
<td><a href="https://cplusplus.github.io/CWG/issues/292.html">292</a></td>
1793
1793
<td>CD3</td>
1794
1794
<td>Deallocation on exception in <TT>new</TT> before arguments evaluated</td>
1795
- <td class="unknown " align="center">Unknown </td>
1795
+ <td class="full " align="center">Clang 2.9 </td>
1796
1796
</tr>
1797
1797
<tr class="open" id="293">
1798
1798
<td><a href="https://cplusplus.github.io/CWG/issues/293.html">293</a></td>
You can’t perform that action at this time.
0 commit comments