From c7bfcbd66f45ff4a51d36b4337656f828eba4d5a Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Wed, 23 Nov 2022 00:24:17 +0100 Subject: [PATCH] Fixed building on LLVM 12 --- .../visitor/translation_unit_visitor.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index 8c943089..8f04b263 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -706,18 +706,13 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) diagram().add_participant(std::move(f_ptr)); } - const auto &return_type = - function_call_expr->getCallReturnType(current_ast_context); - // - // Without this if, this crashes test case t20003 on LLVM <= 12 + // This crashes on LLVM <= 12, for now just return empty type // - if (!clang::dyn_cast_or_null( - function_call_expr->getCallee())) { - m.return_type = return_type.getAsString(); - } - else - m.return_type = ""; + // const auto &return_type = + // function_call_expr->getCallReturnType(current_ast_context); + // m.return_type = return_type.getAsString(); + m.return_type = ""; } else { return true;