[PATCH] D16200: Add --force-analyze-debug-code option to scan-build to force debug build and hopefully enable more precise warnings.
Laszlo Nagy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 01:48:46 PST 2016
rizsotto.mailinglist added a comment.
hey Yury,
nice idea and good work! i personally think that even more aggressive ways to explore bugs. (like call it with and without optimization/debug flags, collect the report from multiple runs and merge it into a single report.) anyway, here it is how to run the python tests. (run it from the `scan-build-py` directory.)
$ PATH=$(pwd)/bin:$PATH python -m unittest -v
================
Comment at: tools/scan-build-py/libscanbuild/runner.py:182
@@ +181,3 @@
+
+ args = opts.pop('compile_options', [])
+ new_args = []
----------------
can you move this logic into a separate method, and write tests around it? (it also will give you better names than `new_args` or `args` :)) unit tests for this module are in `tests/unit/test_runner.py`.
also, iterate through a list in python should do differently. (please take a look at the `command` module `classify_parameters` method.)
and i am not sure about the check you do with the line `if 'force_analyze_debug_code' in args`. you want to check `opt` instead of `args`, don't you? and since you were required to pass this parameter, you can write `if opts['force_analyze_debug_code']`.
Repository:
rL LLVM
http://reviews.llvm.org/D16200
More information about the llvm-commits
mailing list