mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-21 18:22:53 +01:00
utils: Tweak clang-parse-diagnostics-file for modules includes
Diagnostics from modules do not have a `main-file` listed. Tweak `clang-parse-diagnostics-file` to patch this up. Previously, the call to `os.path.basename` would crash. Radar-Id: rdar://problem/59000292
This commit is contained in:
parent
b63fb1d467
commit
3a5bd3107b
@ -66,6 +66,10 @@ Utility for dumping Clang-style logged diagnostics.\
|
||||
for file_diags in diags:
|
||||
file = file_diags.get('main-file')
|
||||
|
||||
# Diagnostics from modules don't have a main-file listed.
|
||||
if not file:
|
||||
file = '<module-includes>'
|
||||
|
||||
# Ignore diagnostics for 'conftest.c', which is the file autoconf uses
|
||||
# for its tests (which frequently will have warnings).
|
||||
if os.path.basename(file) == 'conftest.c':
|
||||
|
Loading…
Reference in New Issue
Block a user