mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 09:41:08 +00:00
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,7 +786,17 @@ 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 =
|
||||
m_ast.CreateClassTemplateSpecializationDecl(
|
||||
|
Loading…
Reference in New Issue
Block a user