[all-commits] [llvm/llvm-project] 7d2b56: [Sema] Handle large shift counts in GetExprRange (...
Björn Pettersson via All-commits
all-commits at lists.llvm.org
Tue Oct 10 01:25:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7d2b569cc42487c85982aa3ebc8243204042d2ce
https://github.com/llvm/llvm-project/commit/7d2b569cc42487c85982aa3ebc8243204042d2ce
Author: Björn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2023-10-10 (Tue, 10 Oct 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaChecking.cpp
A clang/test/Sema/c2x-expr-range.c
Log Message:
-----------
[Sema] Handle large shift counts in GetExprRange (#68590)
GetExprRange did not expect that very large shift counts when
narrowing the range based on logical right shifts. So with inputs
such as
*a >> 123456789012345678901uwb
it would hit assertions about trying to convert a too large APInt
into uint64_t.
This patch fixes that by using the APInt value when determining if
we should reduce the range by the shift count or not.
More information about the All-commits
mailing list