зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476000 - Support warnings format from clang-cl. r=dmajor
--HG-- extra : rebase_source : faf01d659a589c81718e58e2c73b1b46063ce989
This commit is contained in:
Родитель
6043bb48c5
Коммит
632e94cf4d
|
@ -33,6 +33,15 @@ RE_CLANG_WARNING = re.compile(r"""
|
|||
\[(?P<flag>[^\]]+)
|
||||
""", re.X)
|
||||
|
||||
# This captures Clang-cl warning format.
|
||||
RE_CLANG_CL_WARNING = re.compile(r"""
|
||||
(?P<file>.*)
|
||||
\((?P<line>\d+),(?P<column>\d+)\)
|
||||
\s?:\s+warning:\s
|
||||
(?P<message>.*)
|
||||
\[(?P<flag>[^\]]+)
|
||||
""", re.X)
|
||||
|
||||
# This captures Visual Studio's warning format.
|
||||
RE_MSVC_WARNING = re.compile(r"""
|
||||
(?P<file>.*)
|
||||
|
@ -329,6 +338,7 @@ class WarningsCollector(object):
|
|||
|
||||
# TODO make more efficient so we run minimal regexp matches.
|
||||
match_clang = RE_CLANG_WARNING.match(filtered)
|
||||
match_clang_cl = RE_CLANG_CL_WARNING.match(filtered)
|
||||
match_msvc = RE_MSVC_WARNING.match(filtered)
|
||||
if match_clang:
|
||||
d = match_clang.groupdict()
|
||||
|
@ -339,6 +349,15 @@ class WarningsCollector(object):
|
|||
warning['flag'] = d['flag']
|
||||
warning['message'] = d['message'].rstrip()
|
||||
|
||||
elif match_clang_cl:
|
||||
d = match_clang_cl.groupdict()
|
||||
|
||||
filename = d['file']
|
||||
warning['line'] = int(d['line'])
|
||||
warning['column'] = int(d['column'])
|
||||
warning['flag'] = d['flag']
|
||||
warning['message'] = d['message'].rstrip()
|
||||
|
||||
elif match_msvc:
|
||||
d = match_msvc.groupdict()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче