[PATCH] Microsoft mangling of return type deducing functions/lambdas that return local types
David Majnemer
david.majnemer at gmail.com
Sun Mar 30 10:34:12 PDT 2014
Ugh, the MS ABI is not very amenable to this sort of thing. Current versions of MSVC cannot reason about the following source let alone mangle it:
template <typename T>
auto fun(T) {
auto L = []() {
struct M {};
return M{};
};
return L();
}
auto doit() { return fun(0); }
Heck, even GCC does strange things here:
`_ZZ3funIiEDaT_ENUlvE_4_FUNEv` which demangles as `auto fun<int>(int)::'lambda'()::_FUN()`
I'd prefer if we mangled L's type as: `'R<lambda'_{mangling_number}>::operator()() const::M`
http://llvm-reviews.chandlerc.com/D3221
More information about the cfe-commits
mailing list