[ObjC++] Don't enter a C++ declarator scope when the current context is
authorAlex Lorenz <arphaman@gmail.com>
Wed, 7 Dec 2016 10:24:44 +0000 (10:24 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 7 Dec 2016 10:24:44 +0000 (10:24 +0000)
commite151f010deab7417abf663fb1c8ff841539903e7
treea6d9821dbfb097e82234e4f8227c749f3b7bf72e
parent59336a0a45c64bef27adf2476274466134693723
[ObjC++] Don't enter a C++ declarator scope when the current context is
an Objective-C declaration

This commit ensures that Sema won't enter a C++ declarator scope when the
current context is an Objective-C declaration. This prevents an assertion
failure in EnterDeclaratorContext that's used to ensure that current context
will be restored correctly after exiting the declarator context.

rdar://20560175

Differential Revision: https://reviews.llvm.org/D26922

llvm-svn: 288893
clang/lib/Parse/ParseDecl.cpp
clang/lib/Sema/SemaCXXScopeSpec.cpp
clang/test/SemaObjCXX/crash.mm