tatyana-krasnukha added inline comments.

================
Comment at: tools/driver/Driver.cpp:581-585
+  if (g_num_options == 0) {
     if (argc > 1)
       error.SetErrorStringWithFormat("invalid number of options");
     return error;
   }
----------------
clayborg wrote:
> Do we even need this if statement and its contents? maybe 
> lldbassert(g_num_options > 0);?
I replaced it with static_assert since this expression can be checked at 
compile time. And added `if (argc <= 1)` to skip build of long_options_vector 
if there is no arguments to parse.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D52604



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

Reply via email to