[PATCH] D105340: [analyzer] Produce SymbolCast symbols for integral types in SValBuilder::evalCast

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 2 02:47:40 PDT 2021


ASDenysPetrov created this revision.
ASDenysPetrov added reviewers: NoQ, vsavchenko, steakhal, martong.
ASDenysPetrov added a project: clang.
Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
ASDenysPetrov requested review of this revision.
Herald added a subscriber: cfe-commits.

Produce SymbolCast for integral types in `evalCast` function. Apply several simplification techniques while producing the symbols. Added a boolean option `handle-integral-cast-for-ranges` under `-analyzer-config` flag. Disabled the feature by default. Replace `SValBuilder::evalIntegralCast` with `SValBuilder::evalCast`. Remove `SValBuilder::evalIntegralCast` as unnecessary one.

Due to suggestions for splitting D103096 <https://reviews.llvm.org/D103096> this patch has appeared. It's the first part of the D103096 <https://reviews.llvm.org/D103096> revision.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105340

Files:
  clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
  clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
  clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
  clang/test/Analysis/analyzer-config.c
  clang/test/Analysis/bool-assignment.c
  clang/test/Analysis/produce-symbolcast.cpp
  clang/test/Analysis/range_casts.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105340.356136.patch
Type: text/x-patch
Size: 119578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210702/a7f6c6f3/attachment-0001.bin>


More information about the cfe-commits mailing list