Put statement expression decls in the enclosing code DeclContext
authorReid Kleckner <reid@kleckner.net>
Mon, 20 Apr 2015 20:00:49 +0000 (20:00 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 20 Apr 2015 20:00:49 +0000 (20:00 +0000)
commitb9ece24dfc0c600e495c7ff568654718be291cad
tree73d3e1f1542c6f81aeab4676b9f1cf9d9a8a2074
parent69a7b91e953655a4da872133611485ca32239b68
Put statement expression decls in the enclosing code DeclContext

We already check that statement expressions are in a function or block,
but we didn't do anything with that information. Now we use that
DeclContext for the duration of the statement expression. Otherwise,
we'd treat statement expression locals as static data members and go
into the weeds.

llvm-svn: 235335
clang/lib/Parse/ParseExpr.cpp
clang/test/Sema/statements.c