Hardened LLDB against NULL identifiers being passed
into FindExternalVisibleDeclsByName. llvm-svn: 155561
This commit is contained in:
parent
5d2735e502
commit
e8dea98b5e
|
@ -76,8 +76,15 @@ ClangASTSource::FindExternalVisibleDeclsByName
|
|||
switch (clang_decl_name.getNameKind()) {
|
||||
// Normal identifiers.
|
||||
case DeclarationName::Identifier:
|
||||
if (clang_decl_name.getAsIdentifierInfo()->getBuiltinID() != 0)
|
||||
return SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
|
||||
{
|
||||
clang::IdentifierInfo *identifier_info = clang_decl_name.getAsIdentifierInfo();
|
||||
|
||||
if (!identifier_info ||
|
||||
identifier_info->getBuiltinID() != 0)
|
||||
{
|
||||
return SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// Operator names. Not important for now.
|
||||
|
|
Loading…
Reference in New Issue