[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)
authorTimm Bäder <tbaeder@redhat.com>
Mon, 2 Jan 2023 14:11:27 +0000 (15:11 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Thu, 26 Jan 2023 06:07:17 +0000 (07:07 +0100)
commit00e967f6c2d626d1913f5af5763beab7946978ce
treece65bb33d3315d44168997ad195077c9ca14ec18
parent7510b7ec4a662b050a41b399fcd3720e0e5afd82
[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)

We were just casting to `unsigned` before, so that caused problems when
shifting more bits than `unsigned` has.

Differential Revision: https://reviews.llvm.org/D140845
clang/lib/AST/Interp/Integral.h
clang/lib/AST/Interp/Interp.h
clang/test/AST/Interp/shifts.cpp