diff options
author | David Stenberg <david.stenberg@ericsson.com> | 2019-03-07 13:01:17 +0000 |
---|---|---|
committer | David Stenberg <david.stenberg@ericsson.com> | 2019-03-07 13:01:17 +0000 |
commit | 27ed855a6e1f3dd8e33bd1242fafadc4fee8282d (patch) | |
tree | 90e7e5a8a6e25d36e22449193fb93168179312cc /lldb/packages/Python/lldbsuite/support/encoded_file.py | |
parent | a5a0a0f0493c981f568a9572c8adbb061dfcf829 (diff) | |
download | bcm5719-llvm-27ed855a6e1f3dd8e33bd1242fafadc4fee8282d.tar.gz bcm5719-llvm-27ed855a6e1f3dd8e33bd1242fafadc4fee8282d.zip |
[analyzer] Handle comparison between non-default AS symbol and constant
Summary:
When comparing a symbolic region and a constant, the constant would be
widened or truncated to the width of a void pointer, meaning that the
constant could be incorrectly truncated when handling symbols for
non-default address spaces. In the attached test case this resulted in a
false positive since the constant was truncated to zero. To fix this,
widen/truncate the constant to the width of the symbol expression's
type.
This commit does not consider non-symbolic regions as I'm not sure how
to generalize getting the type there.
This fixes PR40814.
Reviewers: NoQ, zaks.anna, george.karpenkov
Reviewed By: NoQ
Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, jdoerfert, Charusso, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58665
llvm-svn: 355592
Diffstat (limited to 'lldb/packages/Python/lldbsuite/support/encoded_file.py')
0 files changed, 0 insertions, 0 deletions