================
Comment at: lib/Parse/ParseDeclCXX.cpp:2822-2829
@@ -2821,7 +2821,10 @@
// nested class.
const Scope *Parent = S->getParent();
if (Parent->isTemplateParamScope())
Parent = Parent->getParent();
if (Parent->isClassScope())
break;
+ // Classes defined inside lambda functions are local as well.
+ if (S->getFlags() & Scope::BlockScope)
+ break;
}
----------------
rsmith wrote:
> Do we need to check the parent scope here at all? (Why can't we just break
> immediately once we reach a function scope?)
I cannot invent a case where this check would require inspection of parent.
Will remove it.
http://reviews.llvm.org/D11006
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits