[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-10 Thread Björn Pettersson via cfe-commits
https://github.com/bjope closed https://github.com/llvm/llvm-project/pull/68590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-10 Thread Björn Pettersson via cfe-commits
https://github.com/bjope updated https://github.com/llvm/llvm-project/pull/68590 From 8ef4560759280bbc14e0dc6c01efc036d0410dca Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Mon, 9 Oct 2023 16:13:39 +0200 Subject: [PATCH] [Sema] Handle large shift counts in GetExprRange GetExprRange did

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/68590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Björn Pettersson via cfe-commits
https://github.com/bjope updated https://github.com/llvm/llvm-project/pull/68590 From 44eedec9dae39e72d5474426a15a07d9be4144fc Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Mon, 9 Oct 2023 16:13:39 +0200 Subject: [PATCH 1/3] [Sema] Handle large shift counts in GetExprRange GetExprRange

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Björn Pettersson via cfe-commits
@@ -219,6 +219,10 @@ Bug Fixes in This Version - Clang no longer considers the loss of ``__unaligned`` qualifier from objects as an invalid conversion during method function overload resolution. +- Fixed an issue when a shift count larger than ``__INT64_MAX__``, in a right

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -fsyntax-only -std=c2x -triple=x86_64-unknown-linux %s + +// Regression test for bug where we used to hit assertion due to shift amount +// being larger than 64 bits. We want to see a warning about too large shift +// amount. +void tes

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -fsyntax-only -std=c2x -triple=x86_64-unknown-linux %s + +// Regression test for bug where we used to hit assertion due to shift amount +// being larger than 64 bits. We want to see a warning about too large shift +// amount. +void tes

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -fsyntax-only -std=c2x -triple=x86_64-unknown-linux %s + +// Regression test for bug where we used to hit assertion due to shift amount +// being larger than 64 bits. We want to see a warning about too large shift +// amount. +void tes

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -fsyntax-only -std=c2x -triple=x86_64-unknown-linux %s + +// Regression test for bug where we used to hit assertion due to shift amount erichkeane wrote: ```suggestion // Regression test for bug where we used to hit a

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Erich Keane via cfe-commits
@@ -219,6 +219,10 @@ Bug Fixes in This Version - Clang no longer considers the loss of ``__unaligned`` qualifier from objects as an invalid conversion during method function overload resolution. +- Fixed an issue when a shift count larger than ``__INT64_MAX__``, in a right

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Björn Pettersson via cfe-commits
bjope wrote: > So the change itself looks right. The comment at the top of the test belongs > in the commit message/github discussion, not in the test itself. > > Also, needs a release note. Thanks. I pushed an update. It fixes the test case to just explain the purpose of the tests. And I add

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Björn Pettersson via cfe-commits
https://github.com/bjope updated https://github.com/llvm/llvm-project/pull/68590 From 44eedec9dae39e72d5474426a15a07d9be4144fc Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Mon, 9 Oct 2023 16:13:39 +0200 Subject: [PATCH 1/2] [Sema] Handle large shift counts in GetExprRange GetExprRange

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: So the change itself looks right. The comment at the top of the test belongs in the commit message/github discussion, not in the test itself. Also, needs a release note. https://github.com/llvm/llvm-project/pull/68590 __

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes 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

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-09 Thread Björn Pettersson via cfe-commits
https://github.com/bjope created https://github.com/llvm/llvm-project/pull/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 conve