[PATCH] D66042: [analyzer] Analysis: "Disable" core checkers

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 18:22:45 PDT 2019


Charusso created this revision.
Charusso added a reviewer: NoQ.
Charusso added a project: clang.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.

This patch introduces a new option:
`-analyzer-disable-warning`
which could be used to disable warnings of given checkers.

It could be used to "disable" core checkers, so they model the analysis as
before, just if some of them are too noisy it prevents to emit reports.

This patch also adds support for that new option to the scan-build.
Passing the option `-disable-checker core.DivideZero` to the scan-build
will be transferred to `-analyzer-disable-warning=core.DivideZero`.


Repository:
  rC Clang

https://reviews.llvm.org/D66042

Files:
  clang-tools-extra/clang-tidy/ClangTidy.cpp
  clang/include/clang/Driver/CC1Options.td
  clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/StaticAnalyzer/Core/BugReporter.cpp
  clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
  clang/test/Analysis/turn-off-warnings-core-all.cpp
  clang/test/Analysis/turn-off-warnings-core-div-by-zero.cpp
  clang/tools/scan-build/bin/scan-build
  clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66042.214487.patch
Type: text/x-patch
Size: 10284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190810/780d4e40/attachment-0001.bin>


More information about the cfe-commits mailing list