@@ -624,14 +624,10 @@ def is_not_supported_error(self, output):
624
624
return "#error [NOT_SUPPORTED]" in output
625
625
626
626
def parse_output (self , output ):
627
- msg = None
628
627
for line in output .splitlines ():
629
628
match = self .LD_DIAGNOSTIC_PATTERN .match (line )
630
629
if match is not None :
631
- if msg is not None :
632
- self .notify .cc_info (msg )
633
- msg = None
634
- msg = {
630
+ self .notify .cc_info ({
635
631
'severity' : match .group ('severity' ).lower (),
636
632
'message' : match .group ('message' ),
637
633
'text' : '' ,
@@ -640,30 +636,10 @@ def parse_output(self, output):
640
636
'col' : 0 ,
641
637
'file' : "" ,
642
638
'line' : 0
643
- }
644
- elif msg is not None :
645
- # Determine the warning/error column by calculating the '^'
646
- # position
647
- match = ARM .INDEX_PATTERN .match (line )
648
- if match is not None :
649
- msg ['col' ] = len (match .group ('col' ))
650
- self .notify .cc_info (msg )
651
- msg = None
652
- else :
653
- msg ['text' ] += line + "\n "
654
-
655
- if msg is not None :
656
- self .notify .cc_info (msg )
657
-
658
- # The warning/error notification is multiline
659
- msg = None
660
- for line in output .splitlines ():
639
+ })
661
640
match = self .DIAGNOSTIC_PATTERN .search (line )
662
641
if match is not None :
663
- if msg is not None :
664
- self .notify .cc_info (msg )
665
- msg = None
666
- msg = {
642
+ self .notify .cc_info ({
667
643
'severity' : match .group ('severity' ).lower (),
668
644
'file' : match .group ('file' ),
669
645
'line' : match .group ('line' ),
@@ -672,10 +648,7 @@ def parse_output(self, output):
672
648
'text' : '' ,
673
649
'target_name' : self .target .name ,
674
650
'toolchain_name' : self .name
675
- }
676
-
677
- if msg is not None :
678
- self .notify .cc_info (msg )
651
+ })
679
652
680
653
def get_config_option (self , config_header ):
681
654
return ["-include" , config_header ]
0 commit comments