HomePhabricator

scan-build: Add support of the option --exclude like in scan-build-py

Description

scan-build: Add support of the option --exclude like in scan-build-py

Summary:
To exclude thirdparty code.

To test:
With /tmp/foo.c

void test() {
    int x;
    x = 1; // warn
}
$ scan-build --exclude non-existing/  --exclude /tmp/ -v gcc -c foo.c                                                                                                                                                                                   

scan-build: Using '/usr/lib/llvm-7/bin/clang' for static analysis
scan-build: Emitting reports for this run to '/tmp/scan-build-2018-09-16-214531-8410-1'.
foo.c:3:3: warning: Value stored to 'x' is never read
  x = 1; // warn
  ^   ~
1 warning generated.
scan-build: File '/tmp/foo.c' deleted: part of an ignored directory.
scan-build: 0 bugs found.

Reviewers: jroelofs

Reviewed By: jroelofs

Subscribers: whisperity, cfe-commits

Differential Revision: https://reviews.llvm.org/D52153

Details

Committed
sylvestreSep 16 2018, 11:31 PM
Reviewer
jroelofs
Differential Revision
D52153: scan-build: Add support of the option --exclude like in scan-build-py
Parents
rL342358: [Lexer] Add xray_instrument feature
Branches
Unknown
Tags
Unknown