[PATCH] D51926: [scan-build-py] Prevent crashes of CTU analysis by suppressing warnings

Lorinc Balog via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 11 05:49:12 PDT 2018


lorincbalog created this revision.
lorincbalog added reviewers: rizsotto.mailinglist, dcoughlin.
Herald added subscribers: cfe-commits, whisperity.

During the mapping of functions for cross-translation unit analysis, the functions' names and the containing files are collected by clang-func-mapping. Warnings are stored in the collection too, which later makes the parsing of the collection fail. Proposed solution is to suppress all warnings during the function mapping.


Repository:
  rC Clang

https://reviews.llvm.org/D51926

Files:
  tools/scan-build-py/libscanbuild/analyze.py


Index: tools/scan-build-py/libscanbuild/analyze.py
===================================================================
--- tools/scan-build-py/libscanbuild/analyze.py
+++ tools/scan-build-py/libscanbuild/analyze.py
@@ -598,6 +598,7 @@
         funcmap_command.append(opts['file'])
         funcmap_command.append('--')
         funcmap_command.extend(args)
+        funcmap_command.append('-w')
         logging.debug("Generating function map using '%s'", funcmap_command)
         func_src_list = run_command(funcmap_command, cwd=opts['directory'])
         func_ast_list = func_map_list_src_to_ast(func_src_list)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51926.164823.patch
Type: text/x-patch
Size: 615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180911/c4488486/attachment.bin>


More information about the cfe-commits mailing list