]> granicus.if.org Git - clang/commitdiff
Fix test failure on target where size_t is long long.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 19 Feb 2018 22:50:50 +0000 (22:50 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 19 Feb 2018 22:50:50 +0000 (22:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325540 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/drs/dr6xx.cpp

index a9dee253ab956b4a15b36eca668b0e89644c9311..c3c867b7a54d2f5b0ffb4864f14fba7a589148e0 100644 (file)
@@ -4,7 +4,10 @@
 // RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking
 // RUN: %clang_cc1 -std=c++2a %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking
 
-namespace std { struct type_info {}; }
+namespace std {
+  struct type_info {};
+  __extension__ typedef __SIZE_TYPE__ size_t;
+} // namespace std
 
 namespace dr601 { // dr601: yes
 #if __cplusplus >= 201103L
@@ -871,11 +874,11 @@ namespace dr675 { // dr675: dup 739
 
 namespace dr677 { // dr677: no
   struct A {
-    void *operator new(__SIZE_TYPE__);
+    void *operator new(std::size_t);
     void operator delete(void*) = delete; // expected-error 0-1{{C++11}} expected-note {{deleted}}
   };
   struct B {
-    void *operator new(__SIZE_TYPE__);
+    void *operator new(std::size_t);
     void operator delete(void*) = delete; // expected-error 0-1{{C++11}} expected-note 2{{deleted}}
     virtual ~B();
   };