[libcxx-commits] [PATCH] D125268: [libc++abi] Refactor exception type demangling into a separate function

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 10 07:18:06 PDT 2022


ldionne added inline comments.


================
Comment at: libcxxabi/src/cxa_default_handlers.cpp:31-33
+    const char* result = __cxxabiv1::__cxa_demangle(str, buf, &len, &status);
+    if (status != 0)
+        return str;
----------------
urnathan wrote:
> ```
> if (auto *res = ...)
>   return res;
> else
>   return str;
> ```
> ?  No need to pass in status -- we don't care why it can't demangle.
I updated before seeing this comment, but yes, I agree, I can drop `status` as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125268



More information about the libcxx-commits mailing list