Classes inside lambdas are local not nested.
authorSerge Pavlov <sepavloff@gmail.com>
Tue, 14 Jul 2015 10:02:10 +0000 (10:02 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Tue, 14 Jul 2015 10:02:10 +0000 (10:02 +0000)
commitd9c0bcfd2844035a20806fc3959ef51dc018b879
tree9d940fd0453c11e2b3db123a837be928e59e7fbd
parentb2c7c9fce4d576ac6df8a87728597df93901fd25
Classes inside lambdas are local not nested.

If a lambda used as default argument in a method declaration contained
a local class, that class was incorrectly recognized as nested class.
In this case compiler tried to postpone parsing of this class until
the enclosing class is finished, which caused crashes in some cases.

This change fixes PR13987.

Differential Revision: http://reviews.llvm.org/D11006

llvm-svn: 242132
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
clang/test/SemaCXX/lambda-expressions.cpp