enable_removed_cpp17_features.pass.cpp 966 B

1234567891011121314151617181920212223242526272829
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. // Test that defining _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES correctly defines
  9. // _LIBCPP_ENABLE_CXX17_REMOVED_FOO for each individual component macro.
  10. // MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
  11. #define _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
  12. #include <__config>
  13. #include "test_macros.h"
  14. #ifndef _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
  15. #error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
  16. #endif
  17. #ifndef _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
  18. #error _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined
  19. #endif
  20. int main(int, char**) {
  21. return 0;
  22. }