[PATCH] D66721: [analyzer] Analysis: Prevent bitwise operation false positives

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 25 11:50:56 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 `analyzer-config` configuration:
`-analyzer-config check-bitwise=false`
which could be used to toggle whether the bitwise (and shift) operations
should be checked. It by default set to `false` as we do not model the
bitwise operations enough well.


Repository:
  rC Clang

https://reviews.llvm.org/D66721

Files:
  clang/include/clang/AST/Expr.h
  clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
  clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
  clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
  clang/test/Analysis/analyzer-config.c
  clang/test/Analysis/bitwise-ops.c
  clang/test/Analysis/casts.c
  clang/test/Analysis/diagnostics/track_subexpressions.cpp
  clang/test/Analysis/left-shift-cxx2a.cpp
  clang/test/Analysis/misc-ps-region-store.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66721.217059.patch
Type: text/x-patch
Size: 10838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190825/e6b8a2a6/attachment-0001.bin>


More information about the cfe-commits mailing list