[libcxx-commits] [libcxx] 4e65688 - [libc++][nfc] Improve error diagnostics.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 28 08:57:30 PDT 2021


Author: Mark de Wever
Date: 2021-07-28T17:57:23+02:00
New Revision: 4e65688571221565cf1a5c1e4bb58ee2ab7c9c83

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

LOG: [libc++][nfc] Improve error diagnostics.

The error message for disabled filesystem and locale support is now done
in the same fashion as ranges and format in D106763.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D106935

Added: 
    

Modified: 
    libcxx/include/filesystem
    libcxx/include/locale.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/filesystem b/libcxx/include/filesystem
index 61d6c659cb473..108faddd8d595 100644
--- a/libcxx/include/filesystem
+++ b/libcxx/include/filesystem
@@ -253,7 +253,7 @@
 #endif
 
 #if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-# error "The Filesystem library is not supported by this configuration of libc++"
+# error "The Filesystem library is not supported since libc++ has been configured with LIBCXX_ENABLE_FILESYSTEM disabled"
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/locale.h b/libcxx/include/locale.h
index 65b2bd5fd7248..0b34134d718a9 100644
--- a/libcxx/include/locale.h
+++ b/libcxx/include/locale.h
@@ -36,7 +36,8 @@
 #include <__config>
 
 #if defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#   error "Localization is not supported by this configuration of libc++"
+#error                                                                                                                 \
+    "The Localization library is not supported since libc++ has been configured with LIBCXX_ENABLE_LOCALIZATION disabled"
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)


        


More information about the libcxx-commits mailing list