]> granicus.if.org Git - clang/commit
Parse: Don't crash when namespace is in GNU statement expr
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 09:38:14 +0000 (09:38 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 09:38:14 +0000 (09:38 +0000)
commit57dec60f901f9ebc7ad488e9ea00f7886563e180
tree54cf40aa52beddfec9359f8b89210f2ebaf7b9ec
parent83d12ae2646c6b9db6df794c9510bb1747c3f780
Parse: Don't crash when namespace is in GNU statement expr

Parser::ParseNamespace can get a little confused when it found itself
inside a compound statement inside of a non-static data member
initializer.

Try to determine that the statement expression's scope makes sense
before trying to parse it's contents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225514 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Parse/ParseExpr.cpp
lib/Sema/SemaExpr.cpp
test/Parser/namespaces.cpp