[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue May 28 05:03:01 PDT 2024


================
@@ -297,8 +312,9 @@ class ModuleCompleter : public Completer {
   void DoCompletion(SearchFilter *filter) override { filter->Search(*this); }
 
 private:
-  const char *m_file_name;
-  const char *m_dir_name;
+  std::optional<llvm::StringRef> m_file_name;
----------------
DavidSpickett wrote:

Unless there's another constructor I'm not seeing, m_file_name is always assigned to so there's always some value in the optional. Should it just be stringref?

https://github.com/llvm/llvm-project/pull/93458


More information about the lldb-commits mailing list