[PATCH] Fix an instantiation error with nested generic lambdas and fptrs

Faisal Vali faisalv at yahoo.com
Thu Oct 3 22:00:37 PDT 2013


Hi doug.gregor, rsmith,

This patch fixes the typelocs of the conversion operator and the conversion operator name and adds the parameters of the call operator to the FunctionProtoTypeLoc of these entities.  So when the template declarations (conversion operators) undergo deduction and instantiation/transformation/substitution - they add themselves to the local instantiation scope if needed.
 
auto L = [](auto b) {
   return [](auto a) ->decltype(a) { return a; };
 };
 int (*fp)(int) = L(8);

http://llvm-reviews.chandlerc.com/D1831

Files:
  lib/Sema/SemaLambda.cpp
  test/SemaCXX/cxx1y-generic-lambdas.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1831.1.patch
Type: text/x-patch
Size: 12151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131003/5133a15d/attachment.bin>


More information about the cfe-commits mailing list