r325342 - [Coroutines] Use target-agnostic size_t in test

Brian Gesiak via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 16 06:11:27 PST 2018


Author: modocache
Date: Fri Feb 16 06:11:27 2018
New Revision: 325342

URL: http://llvm.org/viewvc/llvm-project?rev=325342&view=rev
Log:
[Coroutines] Use target-agnostic size_t in test

Summary:
Fix a test failure on ARM hosts that was caused by a difference in the type of
size_t, by using a target-agnostic definiton.

Test Plan:
```
clang -cc1 -internal-isystem build/lib/clang/7.0.0/include -nostdsysteminc \
      -std=c++14 -fcoroutines-ts -verify clang/test/SemaCXX/coroutines.cpp \
      -fcxx-exceptions -fexceptions \
      -triple armeb-none-eabi
```


Modified:
    cfe/trunk/test/SemaCXX/coroutines.cpp

Modified: cfe/trunk/test/SemaCXX/coroutines.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/coroutines.cpp?rev=325342&r1=325341&r2=325342&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/coroutines.cpp (original)
+++ cfe/trunk/test/SemaCXX/coroutines.cpp Fri Feb 16 06:11:27 2018
@@ -787,7 +787,7 @@ struct good_promise_custom_new_operator
   suspend_always final_suspend();
   void return_void();
   void unhandled_exception();
-  void *operator new(unsigned long, double, float, int);
+  void *operator new(SizeT, double, float, int);
 };
 
 coro<good_promise_custom_new_operator>
@@ -803,7 +803,7 @@ struct good_promise_nonstatic_member_cus
   suspend_always final_suspend();
   void return_void();
   void unhandled_exception();
-  void *operator new(unsigned long, coroutine_nonstatic_member_struct &, double);
+  void *operator new(SizeT, coroutine_nonstatic_member_struct &, double);
 };
 
 struct bad_promise_nonstatic_member_mismatched_custom_new_operator {
@@ -813,7 +813,7 @@ struct bad_promise_nonstatic_member_mism
   void return_void();
   void unhandled_exception();
   // expected-note at +1 {{candidate function not viable: requires 2 arguments, but 1 was provided}}
-  void *operator new(unsigned long, double);
+  void *operator new(SizeT, double);
 };
 
 struct coroutine_nonstatic_member_struct {
@@ -836,7 +836,7 @@ struct bad_promise_mismatched_custom_new
   void return_void();
   void unhandled_exception();
   // expected-note at +1 {{candidate function not viable: requires 4 arguments, but 1 was provided}}
-  void *operator new(unsigned long, double, float, int);
+  void *operator new(SizeT, double, float, int);
 };
 
 coro<bad_promise_mismatched_custom_new_operator>
@@ -853,7 +853,7 @@ struct bad_promise_throwing_custom_new_o
   void return_void();
   void unhandled_exception();
   // expected-error at +1 {{'operator new' is required to have a non-throwing noexcept specification when the promise type declares 'get_return_object_on_allocation_failure()'}}
-  void *operator new(unsigned long, double, float, int);
+  void *operator new(SizeT, double, float, int);
 };
 
 coro<bad_promise_throwing_custom_new_operator>
@@ -869,7 +869,7 @@ struct good_promise_noexcept_custom_new_
   suspend_always final_suspend();
   void return_void();
   void unhandled_exception();
-  void *operator new(unsigned long, double, float, int) noexcept;
+  void *operator new(SizeT, double, float, int) noexcept;
 };
 
 coro<good_promise_noexcept_custom_new_operator>




More information about the cfe-commits mailing list