aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorDonatNagyE <donat.nagy@ericsson.com>2023-09-29 20:02:38 +0200
committerGitHub <noreply@github.com>2023-09-29 20:02:38 +0200
commit23b88e812366cd00a3724e182f43edab080b634b (patch)
tree9817b64131d5d700a4d9a1c4c91c4cb8e5d7ee15 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parent22ebf1e9b702e59077d668f3fc07632970db5968 (diff)
downloadllvm-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