An other idea, couldn't we just pass the cast operation as a template
template parameter?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Hi Aleksei,
I think it is a very good idea to exploit [[nodiscard]] .
On the other hand I find a bit misleading some of the names of these
functions. `importCastedNonNull` does a simple `cast<>` inside, thus
perhaps a name `importAndCast` would better explain what happens.
Similarly, instead of `i
Of course, I think there is no need to have different functions which
differ only in the cast operation. We can use a template template parameter
for the cast operation:
template class CastOp, typename DeclTy>
LLVM_NODISCARD bool import(DeclTy *&ToD, DeclTy *FromD) {
if (auto Res =