diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-10-18 17:00:22 +0100 | 
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-10-18 17:00:36 +0100 | 
| commit | 31d3c0b33310ef17df3bbd47bd832d61b8155d1e (patch) | |
| tree | 835295c06bd6db69de15392c4b8e78bf24c08746 /llvm/unittests/ADT/APIntTest.cpp | |
| parent | 8612b47a8e6454ebbe9d49708365048119275834 (diff) | |
| download | llvm-31d3c0b33310ef17df3bbd47bd832d61b8155d1e.zip llvm-31d3c0b33310ef17df3bbd47bd832d61b8155d1e.tar.gz llvm-31d3c0b33310ef17df3bbd47bd832d61b8155d1e.tar.bz2 | |
[ADT] Fix Wshift-overflow gcc warning in isPowerOf2 unit test
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
| -rw-r--r-- | llvm/unittests/ADT/APIntTest.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp index 3631c12..0efe28f 100644 --- a/llvm/unittests/ADT/APIntTest.cpp +++ b/llvm/unittests/ADT/APIntTest.cpp @@ -1769,7 +1769,7 @@ TEST(APIntTest, isPowerOf2) {    EXPECT_FALSE(APInt(5, 0x00).isPowerOf2());    EXPECT_FALSE(APInt(32, 0x11).isPowerOf2());    EXPECT_TRUE(APInt(17, 0x01).isPowerOf2()); -  EXPECT_TRUE(APInt(32, 0xff << 31).isPowerOf2()); +  EXPECT_TRUE(APInt(32, (unsigned)(0xffu << 31)).isPowerOf2());    for (int N : {1, 2, 3, 4, 7, 8, 16, 32, 64, 127, 128, 129, 256}) {      EXPECT_FALSE(APInt(N, 0).isPowerOf2()); | 
