[libcxx-commits] [libcxx] c83e5e8 - [libc++] Enable _LIBCPP_NODEBUG again (#123318)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 17 09:17:25 PST 2025


Author: Nikolas Klauser
Date: 2025-01-17T18:17:21+01:00
New Revision: c83e5e85a382083d13933805b994c45d412c568f

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

LOG: [libc++] Enable _LIBCPP_NODEBUG again (#123318)

`_LIBCPP_NODEBUG` has been disabled temporarily, since there were a few
problems when adding a bunch of annotations throughout the code base.
They have been resolved now, so we can enable all the annotations again.

Reverts llvm/llvm-project#122393

Added: 
    

Modified: 
    libcxx/include/__config
    libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 658a7e16fae916..5d5c90d7b87a7b 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -1166,9 +1166,7 @@ typedef __char32_t char32_t;
 #    define _LIBCPP_NOESCAPE
 #  endif
 
-// FIXME: Expand this to [[__gnu__::__nodebug__]] again once the testcase reported in
-// https://github.com/llvm/llvm-project/pull/118710 has been analyzed
-#  define _LIBCPP_NODEBUG
+#  define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]]
 
 #  if __has_attribute(__standalone_debug__)
 #    define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__))

diff  --git a/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp b/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
index f49f3e3c615ca9..bc7c8ce7ec443a 100644
--- a/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
+++ b/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
@@ -27,7 +27,7 @@ class LibcxxTestModule : public clang::tidy::ClangTidyModule {
     check_factories.registerCheck<libcpp::header_exportable_declarations>("libcpp-header-exportable-declarations");
     check_factories.registerCheck<libcpp::hide_from_abi>("libcpp-hide-from-abi");
     check_factories.registerCheck<libcpp::internal_ftm_use>("libcpp-internal-ftms");
-    // check_factories.registerCheck<libcpp::nodebug_on_aliases>("libcpp-nodebug-on-aliases");
+    check_factories.registerCheck<libcpp::nodebug_on_aliases>("libcpp-nodebug-on-aliases");
     check_factories.registerCheck<libcpp::proper_version_checks>("libcpp-cpp-version-check");
     check_factories.registerCheck<libcpp::robust_against_adl_check>("libcpp-robust-against-adl");
     check_factories.registerCheck<libcpp::uglify_attributes>("libcpp-uglify-attributes");


        


More information about the libcxx-commits mailing list