================ @@ -321,6 +302,27 @@ bool Variable::IsInScope(StackFrame *frame) { return false; } +bool Variable::IsInScope(Block &block, Address addr) { ---------------- felipepiovezan wrote:
That's an interesting, given the current usage it makes sense to switch this to const reference. Future changes aside, it's still worth pointing out that "by value" by default is usually the correct choice. An API that prescribes passing something by reference is also saying "it's a bad idea to copy this object", a warning to users of the API. Here, there is no such warning, so it is an API that makes a developer pause for nothing -- the warnings are usually "it's expensive", "you can't copy because of ownership semantics". https://github.com/llvm/llvm-project/pull/143572 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits