[PATCH] D124758: [analyzer] Implement assume in terms of assumeDual

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 04:47:25 PDT 2022


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

By evaluating both children states, now we are capable of discovering
infeasible parent states. In this patch, `assume` is implemented in the terms
of `assumeDual`. This might be suboptimal (e.g. where there are adjacent
assume(true) and assume(false) calls, next patches addresses that). This patch
fixes a real CRASH.
Fixes https://github.com/llvm/llvm-project/issues/54272


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124758

Files:
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManager.h
  clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp
  clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
  clang/test/Analysis/infeasible-crash.c
  clang/test/Analysis/infeasible-sink.c
  clang/test/Analysis/sink-infeasible.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124758.426376.patch
Type: text/x-patch
Size: 8074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220502/4427ccaf/attachment-0001.bin>


More information about the cfe-commits mailing list