forked from OSchip/llvm-project
Hardening to avoid null-pointer crashes in the
presence of malformed class types. <rdar://problem/13740646> llvm-svn: 180645
This commit is contained in:
parent
969c5bd2d8
commit
e5270598ba
|
@ -1016,6 +1016,9 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
|
|||
{
|
||||
QualType class_type = class_pointer_type->getPointeeType();
|
||||
|
||||
if (!class_type.getAsOpaquePtr())
|
||||
return;
|
||||
|
||||
if (log)
|
||||
{
|
||||
ASTDumper ast_dumper(this_type->GetClangFullType());
|
||||
|
@ -1144,6 +1147,9 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
|
|||
|
||||
QualType class_type = class_pointer_type->getPointeeType();
|
||||
|
||||
if (!class_type.getAsOpaquePtr())
|
||||
return;
|
||||
|
||||
if (log)
|
||||
{
|
||||
ASTDumper ast_dumper(self_type->GetClangFullType());
|
||||
|
|
Loading…
Reference in New Issue