[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 07:49:08 PDT 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/67961/clang at github.com>
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 1a3a1d9674df00451ab6f7153b78d5f60abcd3c9 3c8924be41121056b60b0aa4d2a3de43dd2db9e3 -- clang/lib/AST/Interp/IntegralAP.h clang/test/AST/Interp/literals.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/Interp/IntegralAP.h b/clang/lib/AST/Interp/IntegralAP.h
index ca45c7e243e2..1f49077608f4 100644
--- a/clang/lib/AST/Interp/IntegralAP.h
+++ b/clang/lib/AST/Interp/IntegralAP.h
@@ -33,7 +33,6 @@ class Boolean;
template <bool Signed> class IntegralAP final {
private:
-
template <typename T> static T truncateCast(const APSInt &V) {
return std::is_signed_v<T> ? V.trunc(sizeof(T) * 8).getSExtValue()
: V.trunc(sizeof(T) * 8).getZExtValue();
``````````
</details>
https://github.com/llvm/llvm-project/pull/67961
More information about the cfe-commits
mailing list