[Lldb-commits] [lldb] [lldb][rpc] Use Clang attributes to keep track of pointer plus len (PR #148981)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 22 01:59:52 PDT 2025
================
@@ -69,6 +69,7 @@ class LLDB_API SBData {
const char *GetString(lldb::SBError &error, lldb::offset_t offset);
+ [[clang::annotate("lldb-rpc-gen pointer plus len")]]
----------------
DavidSpickett wrote:
> This commit changes this by using the Clang annotation attribute to annotate every method that uses a pointer plus length directly in the SB API, and checks that a given method has this attribute when determining if a method has a pointer plus length.
Which means that if we do switch to this and make the macro emit nothing when not clang, all non-clang builds of lldb-rpc are totally broken?
And if this is an extra layer of checking, it could in fact make things worse. The majority of our builds are done with clang, so you could have something that works with clang but not anything else. At least with the hardcoded list, anyone using any compiler has to update it.
https://github.com/llvm/llvm-project/pull/148981
More information about the lldb-commits
mailing list