compilerplugins/clang/nullptr.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b8a10164dca775cba85eafe63eac3fa1d8171f69
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Mon Sep 8 21:19:50 2025 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Tue Sep 9 21:49:10 2025 +0200

    Adapt loplugin::nullptr to recent libstdc++ 16 trunk change
    
    
...<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d9a4c7158a70896c5d4281f42310e88c987acb3e>
    "libstdc++: Rename __cmp_cat::__unspec to __cmp_cat::__literal_zero."
    
    Change-Id: I8cac78bcfd9cf9c8a68f028d4b8ebc6ee7263129
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190685
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/compilerplugins/clang/nullptr.cxx 
b/compilerplugins/clang/nullptr.cxx
index 04fb5bf0f9fd..3189013fbc69 100644
--- a/compilerplugins/clang/nullptr.cxx
+++ b/compilerplugins/clang/nullptr.cxx
@@ -137,9 +137,11 @@ bool Nullptr::VisitImplicitCastExpr(CastExpr const * expr) 
{
         {
             break; // POSIX locale_t is left unspecified
         }
-        // Hack to handle libc++ and stdlibc++ `std::strong_ordering x; x < 0` 
etc.:
+        // Hack to handle libc++ and libstdc++ (libstdc++ < 16: __unspec; 
libstdc++ >= 16:
+        // __literal_zero) `std::strong_ordering x; x < 0` etc.:
         if 
(tc.MemberPointerOf().ClassOrStruct("_CmpUnspecifiedParam").StdNamespace()
-            || 
tc.Pointer().ClassOrStruct("__unspec").Namespace("__cmp_cat").StdNamespace())
+            || 
tc.Pointer().ClassOrStruct("__unspec").Namespace("__cmp_cat").StdNamespace()
+            || 
tc.Pointer().ClassOrStruct("__literal_zero").Namespace("__cmp_cat").StdNamespace())
         {
             break;
         }

Reply via email to