]> granicus.if.org Git - clang/commit
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)
commitf03ee81f953de3c5e17114f718cd6f68fb6db075
treea34f88292c71dc1b6f0f06c12ede8b248e130d1e
parent9e883ba88418cb945c471df3f23770763f0cc6e3
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235335 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseExpr.cpp
test/Sema/statements.c