This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Replace TEST_HAS_NO_EXCEPTIONS with _LIBCPP_NO_EXCEPTIONS [NFC]
AbandonedPublic

Authored by rmaprath on Nov 12 2015, 7:33 AM.

Details

Summary

The macro TEST_HAS_NO_EXCEPTIONS seems to be defined very similar to _LIBCPP_NO_EXCEPTIONS, I'm thinking of getting rid of the former as the latter is more general (defined in __config).

I'm curious as to why the TEST_HAS_NO_EXCEPTIONS macro was introduced? Until very recently, we did not have any -fno-exceptions test runs AFAIK.

If readability is the reason for this macro, we can instead do:

#define TEST_HAS_NO_EXCEPTIONS _LIBCPP_NO_EXCEPTIONS

No functional changes.

Diff Detail

Event Timeline

rmaprath updated this revision to Diff 40047.Nov 12 2015, 7:33 AM
rmaprath retitled this revision from to [libcxx] Replace TEST_HAS_NO_EXCEPTIONS with _LIBCPP_NO_EXCEPTIONS [NFC].
rmaprath updated this object.
rmaprath added a subscriber: cfe-commits.
jroelofs requested changes to this revision.Nov 18 2015, 10:01 AM
jroelofs edited edge metadata.

This change is not the right thing to do. The reason this is a separate macro is that we don't want the tests in test/std to depend on implementation details of libcxx itself.

This revision now requires changes to proceed.Nov 18 2015, 10:01 AM
EricWF edited edge metadata.Nov 18 2015, 11:49 AM

@jroelofs +1. We are trying to make our test suite generic enough that other STL maintainers may use it and contribute to it.

rmaprath abandoned this revision.Nov 19 2015, 7:12 AM

Makes sense. Thanks.