https://github.com/Teemperor created 
https://github.com/llvm/llvm-project/pull/215818

The guard used `_cplusplus` instead of `__cplusplus`. Since `_cplusplus` is 
never defined it expanded to 0, so `0 < 201402L` was always true and the header 
unconditionally redefined LLDB_DEPRECATED and LLDB_DEPRECATED_FIXME to nothing.

The result was that every deprecation marker in the SB API was always empty. 
This bug existed since the introduction of the LLDB_DEPRECATED macro in 
2279f77d2855d9caa0ece466462d34bcfdf4fb3d .

>From f12de350b5ade29d8d9563cd795ed875d156a137 Mon Sep 17 00:00:00 2001
From: Raphael Isemann <[email protected]>
Date: Wed, 12 Aug 2026 13:50:23 +0100
Subject: [PATCH] [lldb] Fix _cplusplus typo that disabled all SB API
 deprecation warnings

The guard used `_cplusplus` instead of `__cplusplus`. Since `_cplusplus`
is never defined it expanded to 0, so `0 < 201402L` was always true and
the header unconditionally redefined LLDB_DEPRECATED and
LLDB_DEPRECATED_FIXME to nothing.

The result was that every deprecation marker in the SB API was always
empty. This bug existed since the introduction of the LLDB_DEPRECATED
macro in 2279f77d2855d9caa0ece466462d34bcfdf4fb3d .
---
 lldb/include/lldb/API/SBDefines.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/include/lldb/API/SBDefines.h 
b/lldb/include/lldb/API/SBDefines.h
index 7ec8e56067aa6..ed7f34d924c45 100644
--- a/lldb/include/lldb/API/SBDefines.h
+++ b/lldb/include/lldb/API/SBDefines.h
@@ -32,7 +32,7 @@
 // Don't add the deprecated attribute when generating the bindings or when
 // building for anything older than C++14 which is the first version that
 // supports the attribute.
-#if defined(SWIG) || _cplusplus < 201402L
+#if defined(SWIG) || __cplusplus < 201402L
 #undef LLDB_DEPRECATED
 #undef LLDB_DEPRECATED_FIXME
 #define LLDB_DEPRECATED(MSG)

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to