Fix nodiscard failure tests on compilers w/o -verify.
authorEric Fiselier <eric@efcs.ca>
Wed, 17 Jan 2018 22:48:09 +0000 (22:48 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 17 Jan 2018 22:48:09 +0000 (22:48 +0000)
commit6b3e48b46a6e2b3283a9d37cfa3e0ac9c2ff91bb
treed5c92589648166d9b17060abad203a16c008d198
parentdf1bb8a65d318f8552546221165404c3343424f7
Fix nodiscard failure tests on compilers w/o -verify.

Previously .fail.cpp tests for nodiscard were run with -Wunused-result
being a warning, not an error, when the compiler didn't support -verify.

When -verify isn't enabled this change judiciously adds -Werror=unused-result
when to only the failure tests containing the // expected-error string for nodiscard.

As a drive-by change, this patch also adds a missing // UNSUPPORTED: c++2a to
a test which was only supposed to run in C++ <= 11.

llvm-svn: 322776
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array11.pass.cpp
libcxx/utils/libcxx/test/format.py