Fixed test case t20003 crash on LLVM 12
This commit is contained in:
@@ -467,9 +467,19 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr)
|
|||||||
.substr();
|
.substr();
|
||||||
m.message_name = message_name.substr(0, message_name.size() - 2);
|
m.message_name = message_name.substr(0, message_name.size() - 2);
|
||||||
}
|
}
|
||||||
m.return_type =
|
|
||||||
function_call_expr->getCallReturnType(current_ast_context)
|
const auto &return_type =
|
||||||
.getAsString();
|
function_call_expr->getCallReturnType(current_ast_context);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Without this if, this crashes test case t20003 on LLVM <= 12
|
||||||
|
//
|
||||||
|
if (!clang::dyn_cast_or_null<clang::UnresolvedLookupExpr>(
|
||||||
|
function_call_expr->getCallee())) {
|
||||||
|
m.return_type = return_type.getAsString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m.return_type = "";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user