[PATCH] D92634: [Analyzer] Diagnose signed integer overflow

Daniel Marjamäki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 23:43:16 PST 2020


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

Diagnose signed integer overflows. The core.UndefResultChecker will warn.

This is a bit unfinished.. I wonder if you like the approach. It only checks addition right now. and not underflow.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92634

Files:
  clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
  clang/test/Analysis/integer-overflow.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92634.309464.patch
Type: text/x-patch
Size: 4666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201204/4617e3dd/attachment.bin>


More information about the cfe-commits mailing list