do not disable all clang static analyzer checkers unconditionally
The behaviour today is to disable all clang static analyzer checkers that are not enabled by default. This can lead to errorneous analysis as the built-in infranstructure checkers (such as .core) will get disabled.
For example by enabling the -e portability only.
With regards to Tidy, I'm not sure if there's a concept of "default enabled checks" here. How will this synergise with Tidy?
For example, how will my command-line look like, if I want to only run a few particular checks (perhaps the only one I'm developing right now and want to use CodeChecker to run it on large projects)?
It'd be weird if I had to do -d modernize -d abseil -d corecppguidelines -d misc bla bla bla for all checker groups.
scan-build implements a workaround to make sure the user cannot disable the core: https://reviews.llvm.org/D66042
I get these new errors when analyzing tmux with the sensitive profile
INFO 2019-12-07 17:42] - [257/272] clang-tidy analyzed notify.c successfully. [ERROR 2019-12-07 17:42] - Analyzing tmux.c with clang-tidy failed! ERROR:analyzer:Analyzing tmux.c with clang-tidy failed! [ERROR 2019-12-07 17:42] - warning: macro replacement list should be enclosed in parentheses [bugprone-macro-parentheses] /mnt/ssd/ednikru/ctu/tests/test-projects/tmux/tmux.c:252:37: error: use of undeclared identifier 'rc4' [clang-diagnostic-error] printf("%s %s\n", getprogname(), VERSION); ^ note: expanded from here
ERROR:analyzer: warning: macro replacement list should be enclosed in parentheses [bugprone-macro-parentheses] /mnt/ssd/ednikru/ctu/tests/test-projects/tmux/tmux.c:252:37: error: use of undeclared identifier 'rc4' [clang-diagnostic-error] printf("%s %s\n", getprogname(), VERSION); ^ note: expanded from here
[ERROR 2019-12-07 17:42] - 50 warnings and 1 error generated. Error while processing /mnt/ssd/ednikru/ctu/tests/test-projects/tmux/tmux.c. Suppressed 47 warnings (47 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. Found compiler error(s).
ERROR:analyzer: 50 warnings and 1 error generated. Error while processing /mnt/ssd/ednikru/ctu/tests/test-projects/tmux/tmux.c. Suppressed 47 warnings (47 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. Found compiler error(s).
[INFO 2019-12-07 17:42] - [258/272] clang-tidy analyzed cmd-set-environment.c successfully. [INFO 2019-12-07 17:42] - [259/272] clang-tidy analyzed getprogname.c successfully. INFO:analyzer:[259/272] clang-tidy analyzed getprogname.c successfully. [INFO 2019-12-07 17:42] - [260/272] clang-tidy analyzed cmd-kill-pane.c successfully. [ERROR 2019-12-07 17:42] - warning: macro replacement list should be enclosed in parentheses [bugprone-macro-parentheses] /mnt/ssd/ednikru/ctu/tests/test-projects/tmux/tmux.c:252:37: error: use of undeclared identifier 'rc4' [clang-diagnostic-error] printf("%s %s\n", getprogname(), VERSION); ^ note: expanded from here