[Lldb-commits] [clang] [clang-tools-extra] [lldb] [Clang] [NFC] Rename `isAnyPointerType()` and `getPointeeOrArrayElementType()`. (PR #122938)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 14 09:31:07 PST 2025
cor3ntin wrote:
Thanks for working on this.
A few comment: `getPointerLikeOrArrayElementType` is not used, and I'm rather concerned by what it does. Removing pointiness in some cases seem dangerous, and not super useful...
Renaming `getPointeeOrArrayElementType` to `getPointerOrArrayElementType` seems wrong. However, if we put an assert in these function that the type is indeed a pointer or an array, how much code break? I suspect not much, and we could fix the caller. ie this function is too magic/does too much.
I would rather not use `Like` in any of the name because in C++ this is often use to mean "a type that behaves like this core construct". ie `unique_ptr` is pointer-like
https://github.com/llvm/llvm-project/pull/122938
More information about the lldb-commits
mailing list