mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-23 17:48:03 +00:00
Add tests for a couple more DRs.
llvm-svn: 289258
This commit is contained in:
parent
166eb37537
commit
f0e87cf2c3
@ -333,7 +333,7 @@ namespace dr27 { // dr27: yes
|
||||
E &m = true ? n : n;
|
||||
}
|
||||
|
||||
// dr28: na
|
||||
// dr28: na lib
|
||||
|
||||
namespace dr29 { // dr29: 3.4
|
||||
void dr29_f0(); // expected-note {{here}}
|
||||
|
26
clang/test/CXX/drs/dr118.cpp
Normal file
26
clang/test/CXX/drs/dr118.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++14 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++1z %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "
|
||||
|
||||
// dr118: yes
|
||||
|
||||
struct S {
|
||||
virtual void f();
|
||||
};
|
||||
void (S::*pmf)();
|
||||
|
||||
// CHECK-LABEL: define {{.*}} @_Z1g
|
||||
void g(S *sp) {
|
||||
// CHECK: call void %
|
||||
sp->f(); // 1: polymorphic
|
||||
// CHECK: call void @
|
||||
sp->S::f(); // 2: non-polymorphic
|
||||
// CHECK: call void @
|
||||
(sp->S::f)(); // 3: non-polymorphic
|
||||
// CHECK: call void %
|
||||
(sp->*pmf)(); // 4: polymorphic
|
||||
// CHECK: call void %
|
||||
(sp->*&S::f)(); // 5: polymorphic
|
||||
}
|
||||
|
27
clang/test/CXX/drs/dr158.cpp
Normal file
27
clang/test/CXX/drs/dr158.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-optzns -pedantic-errors -emit-llvm -o - | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -O3 -disable-llvm-optzns -pedantic-errors -emit-llvm -o - | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++14 %s -O3 -disable-llvm-optzns -pedantic-errors -emit-llvm -o - | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple x86_64-linux -std=c++1z %s -O3 -disable-llvm-optzns -pedantic-errors -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// dr158: yes
|
||||
|
||||
// CHECK-LABEL: define {{.*}} @_Z1f
|
||||
const int *f(const int * const *p, int **q) {
|
||||
// CHECK: load i32**, {{.*}}, !tbaa ![[INTPTR_TBAA:[^,]*]]
|
||||
const int *x = *p;
|
||||
// CHECK: store i32* null, {{.*}}, !tbaa ![[INTPTR_TBAA]]
|
||||
*q = 0;
|
||||
return x;
|
||||
}
|
||||
|
||||
struct A {};
|
||||
|
||||
// CHECK-LABEL: define {{.*}} @_Z1g
|
||||
const int *(A::*const *g(const int *(A::* const **p)[3], int *(A::***q)[3]))[3] {
|
||||
// CHECK: load i64**, {{.*}}, !tbaa ![[MEMPTR_TBAA:[^,]*]]
|
||||
const int *(A::*const *x)[3] = *p;
|
||||
// CHECK: store i64* null, {{.*}}, !tbaa ![[MEMPTR_TBAA]]
|
||||
*q = 0;
|
||||
return x;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace dr102 { // dr102: yes
|
||||
}
|
||||
|
||||
// dr103: na
|
||||
// dr104 FIXME: add codegen test
|
||||
// dr104: na lib
|
||||
// dr105: na
|
||||
|
||||
namespace dr106 { // dr106: sup 540
|
||||
@ -202,7 +202,7 @@ namespace dr116 { // dr116: yes
|
||||
}
|
||||
|
||||
// dr117: na
|
||||
// dr118 FIXME: add codegen test
|
||||
// dr118 is in its own file.
|
||||
// dr119: na
|
||||
// dr120: na
|
||||
|
||||
@ -608,7 +608,7 @@ namespace dr155 { // dr155: dup 632
|
||||
struct S { int n; } s = { { 1 } }; // expected-warning {{braces around scalar initializer}}
|
||||
}
|
||||
|
||||
// dr158 FIXME write codegen test
|
||||
// dr158 is in its own file.
|
||||
|
||||
namespace dr159 { // dr159: 3.5
|
||||
namespace X { void f(); }
|
||||
|
@ -207,7 +207,7 @@
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#28">28</a></td>
|
||||
<td>CD1</td>
|
||||
<td>'exit', 'signal' and static object destruction</td>
|
||||
<td class="na" align="center">N/A</td>
|
||||
<td class="na" align="center">N/A (Library DR)</td>
|
||||
</tr>
|
||||
<tr id="29">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#29">29</a></td>
|
||||
@ -663,7 +663,7 @@
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#104">104</a></td>
|
||||
<td>NAD</td>
|
||||
<td>Destroying the exception temp when no handler is found</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="na" align="center">N/A (Library DR)</td>
|
||||
</tr>
|
||||
<tr id="105">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#105">105</a></td>
|
||||
@ -747,7 +747,7 @@
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#118">118</a></td>
|
||||
<td>CD1</td>
|
||||
<td>Calls via pointers to virtual member functions</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="full" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr id="119">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#119">119</a></td>
|
||||
@ -987,7 +987,7 @@
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#158">158</a></td>
|
||||
<td>CD1</td>
|
||||
<td>Aliasing and qualification conversions</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="full" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr id="159">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#159">159</a></td>
|
||||
|
@ -126,6 +126,9 @@ def availability(issue):
|
||||
elif status == 'na':
|
||||
avail = 'N/A'
|
||||
avail_style = ' class="na"'
|
||||
elif status == 'na lib':
|
||||
avail = 'N/A (Library DR)'
|
||||
avail_style = ' class="na"'
|
||||
elif status.startswith('sup '):
|
||||
dup = status.split(' ', 1)[1]
|
||||
avail = 'Superseded by <a href="#%s">%s</a>' % (dup, dup)
|
||||
|
Loading…
x
Reference in New Issue
Block a user