Skip to content

Commit 7307772

Browse files
committed
Handle clang notes in a better way.
1 parent 0f3bb14 commit 7307772

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,16 +1154,13 @@ private function cleanUpClangOutput ($clang_output, $compiler_config, $option) {
11541154
if ((strpos($line, "In file included from") !== false
11551155
&& preg_match('/([\w*\s*(!@#$%^&*()-+;\'{}\[\])*]+\.\w+:\d+:[\d+:]?)/', $line))
11561156
|| (preg_match('/([\w*\s*(!@#$%^&*()-+;\'{}\[\])*]+\.\w+:\d+:[\d+:]?)/', $line)
1157-
&& strpos($line, "error:") !== false)
1158-
|| (preg_match('/([\w*\s*(!@#$%^&*()-+;\'{}\[\])*]+\.\w+:\d+:[\d+:]?)/', $line)
1159-
&& strpos($line, "note:") !== false)) {
1157+
&& strpos($line, "error:") !== false)) {
11601158

11611159
if ($header_found === false) {
11621160
if (($option == "non_asm" && preg_match('/(\/compiler\.\w+\/libraries\/)/', $header)
11631161
|| strpos($header, $compiler_config["arduino_cores_dir"]) !== false
11641162
|| (array_key_exists("external_core_files", $compiler_config)
1165-
&& strpos($header, $compiler_config["external_core_files"]) !== false)
1166-
|| strpos($header, "note:") !== false)
1163+
&& strpos($header, $compiler_config["external_core_files"]) !== false))
11671164
|| ($option == "asm"
11681165
&& (strpos($header, "in asm") !== false
11691166
|| strpos($body, "in asm") !== false))) {
@@ -1210,7 +1207,6 @@ private function cleanUpClangOutput ($clang_output, $compiler_config, $option) {
12101207
&& strpos($header, $compiler_config["arduino_cores_dir"]) === false
12111208
&& (array_key_exists("external_core_files", $compiler_config)
12121209
&& strpos($header, $compiler_config["external_core_files"]) === false)
1213-
&& strpos($header, "note:") === false
12141210
&& $option == "non_asm")
12151211
|| ($option == "asm"
12161212
&& strpos($header, "in asm") === false

0 commit comments

Comments
 (0)