llvm-project/clang/test/CXX
Faisal Vali 6eac881f66 Again: Teach TreeTransform and family how to transform generic
lambdas nested within templates and themselves.

A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted,


The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType.  This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off.
Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476.

The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created.   

This does not yet include capturing.

Please see test file for examples.

This patch was LGTM'd by Doug:
http://llvm-reviews.chandlerc.com/D1784

llvm-svn: 193216
2013-10-23 00:51:58 +00:00
..
basic Teach typo correction to look inside of classes like it does namespaces. 2013-09-26 19:10:29 +00:00
class Teach typo correction to look inside of classes like it does namespaces. 2013-09-26 19:10:29 +00:00
class.access Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes. 2013-10-19 00:05:00 +00:00
class.derived Improve error for "override" + non-virtual func. 2013-09-05 23:51:03 +00:00
conv Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
dcl.dcl Make wording for certain invalid unary expressions more consistent. 2013-10-09 00:22:23 +00:00
dcl.decl Teach typo correction to look inside of classes like it does namespaces. 2013-09-26 19:10:29 +00:00
drs PR17567: Improve diagnostic for a mistyped constructor name. If we see something 2013-10-15 00:00:26 +00:00
except Preserve exception specs in function decl merging. 2013-09-06 21:09:09 +00:00
expr Again: Teach TreeTransform and family how to transform generic 2013-10-23 00:51:58 +00:00
lex Add a triple to unbreak buildbots where size_t is not 'unsigned long'. 2013-10-07 22:58:25 +00:00
over Don't produce duplicate notes if we have deduction failure notes when resolving 2013-08-14 00:00:44 +00:00
special Implement [class.friend]p11's special name lookup rules for friend declarations 2013-08-09 04:35:01 +00:00
stmt.stmt Add -Wdeprecated warnings and fixits for things deprecated in C++11: 2013-06-13 02:02:51 +00:00
temp Sema: Do not allow template declarations inside local classes 2013-10-22 04:14:18 +00:00