]> granicus.if.org Git - clang/commit
[analyzer] pr37204: Take signedness into account in getTruthValue().
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 7 Aug 2018 02:27:38 +0000 (02:27 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 7 Aug 2018 02:27:38 +0000 (02:27 +0000)
commitd922539bac169bd1dcca808671873ed93eee5901
tree7f216fa434fd46591586fbcb2f32d2a5c0ce8a89
parent73df728949a3c9607aa81dee46af4470c35ce1b8
[analyzer] pr37204: Take signedness into account in getTruthValue().

It now actually produces a signed APSInt when the QualType passed into it is
signed, which is what any caller would expect.

Fixes a couple of crashes.

Differential Revision: https://reviews.llvm.org/D50363

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339088 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
test/Analysis/casts.c