zturner added a comment.

In a way it's kind of built into the semantics of `llvm::Error` that this is 
the only way it could possibly work, since it's a move only type.  If you do 
this, for example:

  Error E = doSomething();
  LLDB_LOG_ERROR(E);

you'd get a compilation failure.  The only way to make it compile would be to 
do this:

  Error E = doSomething();
  LLDB_LOG_ERROR(std::move(E));

And since you've written `std::move(E)` you already can't use it again anyway.  
And if you had written it as one line:

  LLDB_LOG_ERROR(doSomething());

Then you weren't holding onto the error anyway and it shouldn't matter whether 
or not it was cleared.

So I'm not sold on the idea of lengthening the name, because you couldn't have 
used the Error anyway after calling this.


https://reviews.llvm.org/D42182



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

Reply via email to