Re: [Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-24 Thread Adrian Prantl via lldb-commits
Honestly, a sentence in the class Doxygen comment that this is supposed to be passed by value works just as well :-) -- adrian > On Jul 24, 2020, at 12:31 AM, Raphael “Teemperor” Isemann > wrote: > > We could make a custom attribute for types that should be always passed by > value and then

Re: [Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-24 Thread Raphael “Teemperor” Isemann via lldb-commits
We could make a custom attribute for types that should be always passed by value and then maybe have Clang handle that. The problem seems generic enough that maybe other people could find this useful. - Raphael > On 24 Jul 2020, at 09:27, Pavel Labath via lldb-commits > wrote: > > On 23/07/2

Re: [Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-24 Thread Pavel Labath via lldb-commits
On 23/07/2020 18:24, Adrian Prantl wrote: > Is there some clever C++ way to prohibit taking an object's address (similar > to how you can delete a copy constructor)? > > -- adrian You could =delete the address-of operator, but redefining unary & is generally frowned upon and I am not sure it wil

Re: [Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-23 Thread Adrian Prantl via lldb-commits
Is there some clever C++ way to prohibit taking an object's address (similar to how you can delete a copy constructor)? -- adrian > On Jul 23, 2020, at 12:20 AM, Pavel Labath wrote: > > On 22/07/2020 22:56, Jonas Devlieghere via lldb-commits wrote: >> - ConstString operator=(ConstString rhs)

Re: [Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-23 Thread Jonas Devlieghere via lldb-commits
On Thu, Jul 23, 2020 at 00:20 Pavel Labath wrote: > On 22/07/2020 22:56, Jonas Devlieghere via lldb-commits wrote: > > - ConstString operator=(ConstString rhs) { > > + ConstString operator=(const ConstString &rhs) { > > ConstString is trivially copyable (well, it has a user defined copy > const

Re: [Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-23 Thread Pavel Labath via lldb-commits
On 22/07/2020 22:56, Jonas Devlieghere via lldb-commits wrote: > - ConstString operator=(ConstString rhs) { > + ConstString operator=(const ConstString &rhs) { ConstString is trivially copyable (well, it has a user defined copy constructor but it is trivial...). Plus, not so long ago (D59030) w

[Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)

2020-07-22 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-07-22T13:56:23-07:00 New Revision: 0d5fc82245352eb6ed4cf11d85a508a8a03e23bb URL: https://github.com/llvm/llvm-project/commit/0d5fc82245352eb6ed4cf11d85a508a8a03e23bb DIFF: https://github.com/llvm/llvm-project/commit/0d5fc82245352eb6ed4cf11d85a508a8a03e23bb.d