summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2013-12-04 22:43:08 +0000
committerFaisal Vali <faisalv@yahoo.com>2013-12-04 22:43:08 +0000
commit48b59b2e1561fdb52cd3b6e1a57ac559808125cb (patch)
tree8690653ce2ca366ddeedf21a7e94dc2fe4e35ef8 /lib/CodeGen/CGExprScalar.cpp
parentdb218b62f65f84d8bf608b15c81c7f70b530baaf (diff)
downloadclang-48b59b2e1561fdb52cd3b6e1a57ac559808125cb.tar.gz
clang-48b59b2e1561fdb52cd3b6e1a57ac559808125cb.tar.bz2
clang-48b59b2e1561fdb52cd3b6e1a57ac559808125cb.tar.xz
Fix for PR18052 - Lambdas within NSDMI's and default arguments in Nested classes.
Clang currently croaks on the following: struct X1 { struct X2 { int L = ([] (int i) { return i; })(2); }; }; asserting that the containing lexical context of the lambda is not Sema's cur context, when pushing the lambda's decl context on. This occurs because (prior to this patch) getContainingDC always returns the non-nested class for functions at class scope (even for inline member functions of nested classes (to account for delayed parsing of their bodies)). The patch addresses this by having getContainingDC always return the lexical DC for a lambda's call operator. Link to the bug: http://llvm.org/bugs/show_bug.cgi?id=18052 Link to Richard Smith's feedback on phabricator: http://llvm-reviews.chandlerc.com/D2331 Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
0 files changed, 0 insertions, 0 deletions