teemperor added inline comments.

================
Comment at: lldb/source/Commands/CommandObjectTrace.cpp:119
       lldb::TraceSP trace_sp = traceOrErr.get();
-      if (m_options.m_verbose)
+      if (m_options.m_verbose && trace_sp)
         result.AppendMessageWithFormat("loading trace with plugin %s\n",
----------------
Do you still have that GCC warning around (or the GCC version that produced 
that warning)? I'm kinda curious what GCC is assuming here. The interface never 
returns a "null" shared_ptr, the shared_ptr either contains a valid object or 
llvm::Error is returned. IIRC the Expected<ptr> return is the "new" version of 
how the Plugin interface should work (the old was just a ptr with `nullptr` 
being an error), so if some GCC version doesn't understand the Expected<ptr> 
pattern then we should maybe have some more centralized workaround instead of 
adding all the unnecessary nullptr checks.

But that shouldn't block this patch, so feel free to land.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97586/new/

https://reviews.llvm.org/D97586

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to