[libcxx-commits] [libcxx] a9cd941 - [libcxx] Fix inverted `has_terminal` condition

Joseph Huber via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 7 05:31:49 PST 2024


Author: Joseph Huber
Date: 2024-11-07T07:31:42-06:00
New Revision: a9cd941f392dbf99ddfcde9721bd5c485823bdf0

URL: https://github.com/llvm/llvm-project/commit/a9cd941f392dbf99ddfcde9721bd5c485823bdf0
DIFF: https://github.com/llvm/llvm-project/commit/a9cd941f392dbf99ddfcde9721bd5c485823bdf0.diff

LOG: [libcxx] Fix inverted `has_terminal` condition

Summary:
This used to indicate "has no terminal" and now it indicates "has
terminal" but the check was not changed.

Added: 
    

Modified: 
    libcxx/include/print

Removed: 
    


################################################################################
diff  --git a/libcxx/include/print b/libcxx/include/print
index 6241534c9a31bc..7c808300701383 100644
--- a/libcxx/include/print
+++ b/libcxx/include/print
@@ -199,7 +199,7 @@ _LIBCPP_HIDE_FROM_ABI inline bool __is_terminal([[maybe_unused]] FILE* __stream)
   // the behavior in the test. This is not part of the public API.
 #  ifdef _LIBCPP_TESTING_PRINT_IS_TERMINAL
   return _LIBCPP_TESTING_PRINT_IS_TERMINAL(__stream);
-#  elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0 || _LIBCPP_HAS_TERMINAL
+#  elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0 || !_LIBCPP_HAS_TERMINAL
   return false;
 #  elif defined(_LIBCPP_WIN32API)
   return std::__is_windows_terminal(__stream);


        


More information about the libcxx-commits mailing list