[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 0/8] Introduce an extensible static analyzer
From: |
Alberto Faria |
Subject: |
Re: [RFC 0/8] Introduce an extensible static analyzer |
Date: |
Tue, 5 Jul 2022 12:28:55 +0100 |
On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> for i in `git ls-tree --name-only -r HEAD:`
> do
> clang-tidy $i 1>/dev/null 2>&1
> done
All of those invocations are probably failing quickly due to missing
includes and other problems, since the location of the compilation
database and some other arguments haven't been specified.
Accounting for those problems (and enabling just one random C++ check):
$ time clang-tidy -p build \
--extra-arg-before=-Wno-unknown-warning-option \
--extra-arg='-isystem [...]' \
--checks='-*,clang-analyzer-cplusplus.Move' \
$( find block -name '*.c' )
[...]
real 3m0.260s
user 2m58.041s
sys 0m1.467s
Single-threaded static-analyzer.py without any checks:
$ time ./static-analyzer.py build block -j 1
Analyzed 79 translation units in 16.0 seconds.
real 0m16.665s
user 0m15.967s
sys 0m0.604s
And with just the 'return-value-never-used' check enabled for a
somewhat fairer comparison:
$ time ./static-analyzer.py build block -j 1 \
-c return-value-never-used
Analyzed 79 translation units in 61.5 seconds.
real 1m2.080s
user 1m1.372s
sys 0m0.513s
Which is good news!
Alberto
- Re: [RFC 5/8] static-analyzer: Enforce coroutine_fn restrictions on function pointers, (continued)
[RFC 6/8] Fix some coroutine_fn indirect calls and pointer assignments, Alberto Faria, 2022/07/02
[RFC 7/8] block: Add no_coroutine_fn marker, Alberto Faria, 2022/07/02
[RFC 8/8] Avoid calls from coroutine_fn to no_coroutine_fn, Alberto Faria, 2022/07/02
Re: [RFC 0/8] Introduce an extensible static analyzer, Paolo Bonzini, 2022/07/02
Re: [RFC 0/8] Introduce an extensible static analyzer, Daniel P . Berrangé, 2022/07/04
- Re: [RFC 0/8] Introduce an extensible static analyzer, Alberto Faria, 2022/07/04
- Re: [RFC 0/8] Introduce an extensible static analyzer, Daniel P . Berrangé, 2022/07/05
- Re: [RFC 0/8] Introduce an extensible static analyzer,
Alberto Faria <=
- Re: [RFC 0/8] Introduce an extensible static analyzer, Daniel P . Berrangé, 2022/07/05
- Re: [RFC 0/8] Introduce an extensible static analyzer, Alberto Faria, 2022/07/06
- Re: [RFC 0/8] Introduce an extensible static analyzer, Daniel P . Berrangé, 2022/07/06
- Re: [RFC 0/8] Introduce an extensible static analyzer, Alberto Faria, 2022/07/08
Re: [RFC 0/8] Introduce an extensible static analyzer, Daniel P . Berrangé, 2022/07/05