Skip to content

Commit f944dd6

Browse files
committed
Return initial clang output if reformatted one is empty.
1 parent 137d5f6 commit f944dd6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,13 +699,17 @@ private function doCompile($compiler_config, &$files, $dir, $CC, $CFLAGS, $CPP,
699699
$this->compiler_logger->addInfo($this->logger_id . " - Clang reformated output: " . json_encode($final_clang_output));
700700
$final_clang_output = $this->pathRemover ($final_clang_output, $compiler_config);
701701
$resp["message"] = $final_clang_output;
702+
if ($resp["message"] == "")
703+
$resp["message"] = $output;
702704
return $resp;
703705
}else {
704706
$this->compiler_logger->addInfo($this->logger_id . " - Gcc output: " . json_encode($avr_output));
705707
$this->compiler_logger->addInfo($this->logger_id . " - Clang initial output: " . json_encode($output));
706708
$this->compiler_logger->addInfo($this->logger_id . " - Clang reformated output: " . json_encode($next_clang_output));
707709
$next_clang_output = $this->pathRemover ($next_clang_output, $compiler_config);
708710
$resp["message"] = $next_clang_output;
711+
if ($resp["message"] == "")
712+
$resp["message"] = $output;
709713
return $resp;
710714
}
711715
}

0 commit comments

Comments
 (0)