summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/lambda-expressions-inside-auto-functions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ItaniumMangle] Undeduced auto type shouldn't be substitutable.Erik Pilkington2018-04-281-3/+6
| | | | | | | | | We still support the old mangling if we're trying to be ABI-compatible with Clang 6.0, though. Differential revision: https://reviews.llvm.org/D45451 llvm-svn: 331098
* Fix linkage calculation of auto member functions returning lambdasFaisal Vali2013-10-081-0/+77
As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ we should allow: template<typename S> struct A { template<typename T> static auto default_lambda() { return [](const T&) { return 42; }; } template<class U = decltype(default_lambda<S>())> U func(U u = default_lambda<S>()) { return u; } }; int run2 = A<double>{}.func()(3.14); int run3 = A<char>{}.func()('a'); This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope. Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval. llvm-svn: 192166
OpenPOWER on IntegriCloud