[PATCH] D77321: utils: Tweak clang-parse-diagnostics-file for modules includes
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 10:50:09 PDT 2020
dexonsmith created this revision.
dexonsmith added a reviewer: arphaman.
Herald added a subscriber: ributzka.
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
https://reviews.llvm.org/D77321
Files:
llvm/utils/clang-parse-diagnostics-file
Index: llvm/utils/clang-parse-diagnostics-file
===================================================================
--- llvm/utils/clang-parse-diagnostics-file
+++ llvm/utils/clang-parse-diagnostics-file
@@ -66,6 +66,10 @@
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':
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77321.254561.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200402/c21f4b13/attachment.bin>
More information about the llvm-commits
mailing list