[PATCH] D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 23 09:03:54 PDT 2017

dexonsmith added inline comments.

Comment at: test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp:12-16
+// test availability of new/delete operators introduced in c++17.
+#ifdef __APPLE__
There is a lit configuration to choose whether to run with availability or not.  We should just mark the test unsupported when we don't want it to run.

It's also important to run the rest of the suite with availability turned on, to see which other tests start to fail.

Comment at: test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp:21-26
+  int *p0 = new ((std::align_val_t)16) int(1);
+  (void)p0;
+  int *p1 = new ((std::align_val_t)16) int[1];
+  (void)p1;
Similarly here, we can just mark the test unsupported when we don't have availability turned on or we're targeting 10.13 or later.


More information about the cfe-commits mailing list