Files
clang-p2996/llvm/lib/Support/Error.cpp
Nikita Popov 44df1167f8 [Error] Add non-consuming toString (#95375)
There are some places that want to convert an Error to string, but still
retain the original Error object, for example to emit a non-fatal
warning.

This currently isn't possible, because the entire Error infra is
move-based. And what people end up doing in this case is to move the
Error... twice.

This patch introduces a toStringWithoutConsuming() function to
accommodate this use case. This also requires some infrastructure that
allows visiting Errors without consuming them.
2024-06-14 11:35:27 +02:00

5.8 KiB