[libcxx-commits] [PATCH] D103996: Save/restore OuterTemplateParams in AbstractManglingParser::parseEncoding.

Richard Smith - zygoloid via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 9 18:15:26 PDT 2021


rsmith added inline comments.


================
Comment at: libcxxabi/test/test_demangle.pass.cpp:29595
     {"_ZNK1AIJ1Z1Y1XEEcv1BIJDpPT_EEIJS2_S1_S0_EEEv", "A<Z, Y, X>::operator B<X*, Y*, Z*><X, Y, Z>() const"},
-    {"_ZNK3Ncr6Silver7Utility6detail12CallOnThreadIZ53-[DeploymentSetupController handleManualServerEntry:]E3$_5EclIJEEEDTclclL_ZNS2_4getTIS4_EERT_vEEspclsr3stdE7forwardIT_Efp_EEEDpOSA_", "decltype(-[DeploymentSetupController handleManualServerEntry:]::$_5& Ncr::Silver::Utility::detail::getT<-[DeploymentSetupController handleManualServerEntry:]::$_5>()()(std::forward<-[DeploymentSetupController handleManualServerEntry:]::$_5>(fp)...)) Ncr::Silver::Utility::detail::CallOnThread<-[DeploymentSetupController handleManualServerEntry:]::$_5>::operator()<>(-[DeploymentSetupController handleManualServerEntry:]::$_5&&...) const"},
+    {"_ZNK3Ncr6Silver7Utility6detail12CallOnThreadIZ53-[DeploymentSetupController handleManualServerEntry:]E3$_5EclIJEEEDTclclL_ZNS2_4getTIS4_EERT_vEEspclsr3stdE7forwardIT_Efp_EEEDpOSA_", "decltype(-[DeploymentSetupController handleManualServerEntry:]::$_5& Ncr::Silver::Utility::detail::getT<-[DeploymentSetupController handleManualServerEntry:]::$_5>()()()) Ncr::Silver::Utility::detail::CallOnThread<-[DeploymentSetupController handleManualServerEntry:]::$_5>::operator()<>() const"},
     {"_Zli2_xy", "operator\"\" _x(unsigned long long)"},
----------------
It's suspicious that `spclsr3stdE7forwardIT_Efp_EE` appears here but there's no corresponding call to `std::forward<...>` whatsoever in the demangling any more. Demangling this by hand I get:

```
template<typename ...T>
auto Ncr::Silver::Utility::detail::CallOnThread<X::$_5>::operator()(T &&...params) const
  -> decltype(F()(std::forward<T>(params) ...))
```

where `X` is the (presumably) Objective C symbol `-[DeploymentSetupController handleManualServerEntry:]`
and `F` is `X::$_5 &Ncr::Silver::Utility::detail::getT<X::$_5>()`
and `T` is an empty pack

So: it's right that `std::forward` disappears: it's within a pack expansion that was expanded zero times. And the new demangling appears to be correct.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103996



More information about the libcxx-commits mailing list