Fixed a crash when we tried dyn_cast<>ing a

null pointer.

<rdar://problem/13745684>

llvm-svn: 180663
This commit is contained in:
Sean Callanan 2013-04-27 01:57:44 +00:00
parent a30b5b7a97
commit 956dca9288
1 changed files with 3 additions and 0 deletions

View File

@ -1328,6 +1328,9 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
{
clang::DeclContext *decl_ctx = sym_ctx.function->GetClangDeclContext();
if (!decl_ctx)
continue;
// Filter out class/instance methods.
if (dyn_cast<clang::ObjCMethodDecl>(decl_ctx))
continue;