[llvm] [Support] Remove an unnecessary cast (NFC) (PR #147548)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 08:14:51 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

I is already of int64_t.


---
Full diff: https://github.com/llvm/llvm-project/pull/147548.diff


1 Files Affected:

- (modified) llvm/lib/Support/JSON.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Support/JSON.cpp b/llvm/lib/Support/JSON.cpp
index e7b762f550d46..d8662340cb3ed 100644
--- a/llvm/lib/Support/JSON.cpp
+++ b/llvm/lib/Support/JSON.cpp
@@ -516,7 +516,7 @@ bool Parser::parseNumber(char First, Value &Out) {
   errno = 0;
   int64_t I = std::strtoll(S.c_str(), &End, 10);
   if (End == S.end() && errno != ERANGE) {
-    Out = int64_t(I);
+    Out = I;
     return true;
   }
   // strtroull has a special handling for negative numbers, but in this

``````````

</details>


https://github.com/llvm/llvm-project/pull/147548


More information about the llvm-commits mailing list