r289258 - Add tests for a couple more DRs.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 9 11:35:45 PST 2016


Author: rsmith
Date: Fri Dec  9 13:35:45 2016
New Revision: 289258

URL: http://llvm.org/viewvc/llvm-project?rev=289258&view=rev
Log:
Add tests for a couple more DRs.

Added:
    cfe/trunk/test/CXX/drs/dr118.cpp
    cfe/trunk/test/CXX/drs/dr158.cpp
Modified:
    cfe/trunk/test/CXX/drs/dr0xx.cpp
    cfe/trunk/test/CXX/drs/dr1xx.cpp
    cfe/trunk/www/cxx_dr_status.html
    cfe/trunk/www/make_cxx_dr_status

Modified: cfe/trunk/test/CXX/drs/dr0xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr0xx.cpp?rev=289258&r1=289257&r2=289258&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr0xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr0xx.cpp Fri Dec  9 13:35:45 2016
@@ -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}}

Added: cfe/trunk/test/CXX/drs/dr118.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr118.cpp?rev=289258&view=auto
==============================================================================
--- cfe/trunk/test/CXX/drs/dr118.cpp (added)
+++ cfe/trunk/test/CXX/drs/dr118.cpp Fri Dec  9 13:35:45 2016
@@ -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
+}
+

Added: cfe/trunk/test/CXX/drs/dr158.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr158.cpp?rev=289258&view=auto
==============================================================================
--- cfe/trunk/test/CXX/drs/dr158.cpp (added)
+++ cfe/trunk/test/CXX/drs/dr158.cpp Fri Dec  9 13:35:45 2016
@@ -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;
+}
+

Modified: cfe/trunk/test/CXX/drs/dr1xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr1xx.cpp?rev=289258&r1=289257&r2=289258&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr1xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr1xx.cpp Fri Dec  9 13:35:45 2016
@@ -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(); }

Modified: cfe/trunk/www/cxx_dr_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_dr_status.html?rev=289258&r1=289257&r2=289258&view=diff
==============================================================================
--- cfe/trunk/www/cxx_dr_status.html (original)
+++ cfe/trunk/www/cxx_dr_status.html Fri Dec  9 13:35:45 2016
@@ -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>

Modified: cfe/trunk/www/make_cxx_dr_status
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/make_cxx_dr_status?rev=289258&r1=289257&r2=289258&view=diff
==============================================================================
--- cfe/trunk/www/make_cxx_dr_status (original)
+++ cfe/trunk/www/make_cxx_dr_status Fri Dec  9 13:35:45 2016
@@ -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)




More information about the cfe-commits mailing list