rsmith added a subscriber: rsmith.
================
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;
}
----------------
Do we need to check the parent scope here at all? (Why can't we just break
immediately once we reach a function scope?)
http://reviews.llvm.org/D11006
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits