[libc++] Move aligned allocation tests to .verify.cpp
authorLouis Dionne <ldionne@apple.com>
Wed, 15 Apr 2020 16:00:52 +0000 (12:00 -0400)
committerLouis Dionne <ldionne@apple.com>
Wed, 15 Apr 2020 16:04:55 +0000 (12:04 -0400)
Instead of being ShTests that use clang-verify (and without the proper
REQUIRES annotation), create .verify.cpp tests instead with the right
REQUIRES annotation.

libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp [moved from libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp with 85% similarity]
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp [moved from libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp with 85% similarity]
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp [moved from libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp with 86% similarity]
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp [moved from libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp with 85% similarity]
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp [moved from libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp with 85% similarity]
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp [moved from libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp with 86% similarity]

 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
+// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
-// RUN: %{compile} %{verify} -faligned-allocation
+// ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 
 #include <new>
 
-int main(int, char**)
-{
+int main(int, char**) {
     ::operator new[](4);  // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
-
-  return 0;
+    return 0;
 }
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
+// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
-// RUN: %{compile} %{verify} -faligned-allocation
+// ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 
 #include <new>
 
-int main(int, char**)
-{
+int main(int, char**) {
     ::operator new[](4, std::align_val_t{4});  // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
-
-  return 0;
+    return 0;
 }
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
+// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
-// RUN: %{compile} %{verify} -faligned-allocation
+// ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 
 #include <new>
 
-int main(int, char**)
-{
+int main(int, char**) {
     ::operator new[](4, std::align_val_t{4}, std::nothrow);  // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
-
-  return 0;
+    return 0;
 }
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
+// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
-// RUN: %{compile} %{verify} -faligned-allocation
+// ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 
 #include <new>
 
-int main(int, char**)
-{
+int main(int, char**) {
     ::operator new[](4, std::nothrow);  // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
-
-  return 0;
+    return 0;
 }
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
+// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
-// RUN: %{compile} %{verify} -faligned-allocation
+// ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 
 #include <new>
 
-int main(int, char**)
-{
+int main(int, char**) {
     ::operator new(4, std::align_val_t{4});  // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
-
-  return 0;
+    return 0;
 }
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
 
+// REQUIRES: verify-support
 // REQUIRES: -faligned-allocation
-// RUN: %{compile} %{verify} -faligned-allocation
+// ADDITIONAL_COMPILE_FLAGS: -faligned-allocation
 
 #include <new>
 
-int main(int, char**)
-{
+int main(int, char**) {
     ::operator new(4, std::align_val_t{4}, std::nothrow);  // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
-
-  return 0;
+    return 0;
 }