[PATCH 2/2] Avoid copying in lookup_name_info
Tom Tromey
tromey@adacore.com
Tue Mar 31 19:15:45 GMT 2020
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Pedro> And if we do that, do we have any case where we really need the
Pedro> "std::string &&" overload?
Tom> Indeed we don't seem to need this.
Actually, I am wrong, there is a spot in ada-lang.c:
lookup_name_info name1 (std::string ("<_ada_") + name + '>',
symbol_name_match_type::FULL);
What's concerning is that this compiles even without the && overload,
presumably by just violating the lifetime requirement of lookup_name_info.
So, I think leaving the && version in-place is best.
Tom
More information about the Gdb-patches
mailing list