Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

I is already of int64_t.

@llvmbot
Copy link
Member

llvmbot commented Jul 8, 2025

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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

@kazutakahirata kazutakahirata merged commit 75b989e into llvm:main Jul 8, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250708_cast_llvm_Support branch July 8, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants