forked from OSchip/llvm-project
ClangASTContext::ParseClassTemplateDecl doesn't always succeed.
When it does, it returns a NULL ClassTemplateDecl. Don't use it if it is NULL... <rdar://problem/35672107> llvm-svn: 319516
This commit is contained in:
parent
363c631edd
commit
4e29eed498
|
@ -786,6 +786,16 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
|
|||
m_ast.ParseClassTemplateDecl(decl_ctx, accessibility,
|
||||
type_name_cstr, tag_decl_kind,
|
||||
template_param_infos);
|
||||
if (!class_template_decl) {
|
||||
if (log) {
|
||||
dwarf->GetObjectFile()->GetModule()->LogMessage(
|
||||
log, "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" "
|
||||
"clang::ClassTemplateDecl failed to return a decl.",
|
||||
static_cast<void *>(this), die.GetOffset(),
|
||||
DW_TAG_value_to_name(tag), type_name_cstr);
|
||||
}
|
||||
return TypeSP();
|
||||
}
|
||||
|
||||
clang::ClassTemplateSpecializationDecl
|
||||
*class_specialization_decl =
|
||||
|
|
Loading…
Reference in New Issue