commit | 394558e6a1329b791de69d0fc7c618eac0dbc982 | [log] [tgz] |
---|---|---|
author | Faisal Vali <faisalv@yahoo.com> | Tue Nov 12 03:48:27 2013 +0000 |
committer | Faisal Vali <faisalv@yahoo.com> | Tue Nov 12 03:48:27 2013 +0000 |
tree | de22b8a2f16e4552b73c4b6ffe21284493aaf534 | |
parent | 2a7ff77d54c9783eb53a59cd57e9b2330cdd5119 [diff] |
A quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing) that broke libc++. See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033369.html for discussion on cfe-dev. This fix explicitly checks whether we are within the declcontext of a lambda's call operator - which is what I had intended to be true (and assumed would be true if getCurLambda returns a valid pointer) before checking whether a lambda can capture the potential-captures of the innermost lambda. A deeper fix (that addresses why getCurLambda() returns a valid pointer when perhaps it shouldn't?) - as proposed by Richard Smith in http://llvm.org/bugs/show_bug.cgi?id=17877 - has been suggested as a FIXME. Patch was LGTM'd by Richard (just barely :) http://llvm-reviews.chandlerc.com/D2144 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194448 91177308-0d34-0410-b5e6-96231b3b80d8