diff options
author | DonatNagyE <donat.nagy@ericsson.com> | 2023-09-29 20:02:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-29 20:02:38 +0200 |
commit | 23b88e812366cd00a3724e182f43edab080b634b (patch) | |
tree | 9817b64131d5d700a4d9a1c4c91c4cb8e5d7ee15 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
parent | 22ebf1e9b702e59077d668f3fc07632970db5968 (diff) | |
download | llvm-23b88e812366cd00a3724e182f43edab080b634b.zip llvm-23b88e812366cd00a3724e182f43edab080b634b.tar.gz llvm-23b88e812366cd00a3724e182f43edab080b634b.tar.bz2 |
[analyzer] Remove inaccurate legacy handling of bad bitwise shifts (#66647)
Previously, bitwise shifts with constant operands were validated by the
checker `core.UndefinedBinaryOperatorResult`. However, this logic was
unreliable, and commit 25b9696b61e53a958e217bb3d0eab66350dc187f added
the dedicated checker `core.BitwiseShift` which validated the
preconditions of all bitwise shifts with a more accurate logic (that
uses the real types from the AST instead of the unreliable type
information encoded in `APSInt` objects).
This commit disables the inaccurate logic that could mark bitwise shifts
as 'undefined' and removes the redundant shift-related warning messages
from core.UndefinedBinaryOperatorResult. The tests that were validating
this logic are also deleted by this commit; but I verified that those
testcases trigger the expected bug reports from `core.BitwiseShift`. (I
didn't convert them to tests of `core.BitwiseShift`, because that
checker already has its own extensive test suite with many analogous
testcases.)
I hope that there will be a time when the constant folding will be
reliable, but until then we need hacky solutions like this improve the
quality of results.
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
0 files changed, 0 insertions, 0 deletions