[PATCH] D16200: Add --force-analyze-debug-code option to scan-build to force debug build and hopefully enable more precise warnings.

Yury Gribov via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 12:06:49 PST 2016


ygribov added a comment.

> 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.)


Makes good sense.

> 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


I don't think so:

  $ python -m unittest -v
  
  ----------------------------------------------------------------------
  Ran 0 tests in 0.000s
  
  OK

whereas

  $ for t in tests/unit/*.py; do t=$(echo $t | sed -e 's/\..*//'); python -m unittest tests.unit.$(basename $t); done
  
  ----------------------------------------------------------------------
  Ran 0 tests in 0.000s
  
  OK
  ...............................................
  ----------------------------------------------------------------------
  Ran 47 tests in 0.452s
  
  OK
  etc. etc.

leaving me puzzled about what exactly needs to be tested.

As for adding the unit test, is there currently a way to analyze C file and verify that output contains particular analyzer warning? I haven't found anything like this in tests/.


Repository:
  rL LLVM

http://reviews.llvm.org/D16200





More information about the llvm-commits mailing list