[Lldb-commits] [PATCH] D96817: Fix deep copying for OptionValue classes
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 17 05:27:24 PST 2021
teemperor added inline comments.
================
Comment at: lldb/unittests/Interpreter/TestOptionValue.cpp:173
+ // Trigger the callback second time.
+ file_list_copy_ptr->SetValueFromString(llvm::StringRef("0 another/path"),
+ eVarSetOperationReplace);
----------------
tatyana-krasnukha wrote:
> dblaikie wrote:
> > Generally it shouldn't be necessary to write `llvm::StringRef(...)` around a string literal - StringRef is implicitly convertible from a string literal.
> OptionValueProperties and OptionValueFileSpecList enforce using StringRef explicitly by specifying the overload SetValueFromString(const char*) as deleted.
So I was curious why we added these deleted overloads and from what I can see this was done as part of some C-string -> StringRef conversion in D24847. I don't think these overloads serve any purpose anymore, so I made a review for removing them: D96861
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96817/new/
https://reviews.llvm.org/D96817
More information about the lldb-commits
mailing list