static HighlightInfo.Builder checkMissingReturnStatement(@Nullable PsiCodeBlock body, @Nullable PsiType returnType) {
    if (body == null || returnType == null || PsiTypes.voidType().equals(returnType.getDeepComponentType())) {
      return null;
    }

    // do not compute constant expressions for if() statement condition
    // see JLS 14.20 Unreachable Statements
    try {
      ControlFlow controlFlow = getControlFlowNoConstantEvaluate(body);
      if (!ControlFlowUtil.returnPresent(controlFlow)) {
        PsiJavaToken rBrace = body.getRBrace();
        PsiElement context = rBrace == null ? body.getLastChild() : rBrace;
        String message = JavaErrorBundle.message("missing.return.statement");
        HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(context).descriptionAndTooltip(message);
        PsiElement parent = body.getParent();
        if (parent instanceof PsiMethod method) {
          IntentionAction action1 = getQuickFixFactory().createAddReturnFix(method);
          info.registerFix(action1, null, null, null, null);
          IntentionAction action = getQuickFixFactory().createMethodReturnFix(method, PsiTypes.voidType(), true);
          info.registerFix(action, null, null, null, null);
        }
        if (parent instanceof PsiLambdaExpression) {
          IntentionAction action = getQuickFixFactory().createAddReturnFix((PsiLambdaExpression)parent);
          info.registerFix(action, null, null, null, null);
        }
        return info;
      }
    }
    catch (AnalysisCanceledException ignored) { }

    return null;
  }
static HighlightInfo.Builder checkMissingReturnStatement(@Nullable PsiCodeBlock body, @Nullable PsiType returnType)