[clang] 76db4e3 - clang: Fix unnecessary truncation of resource limit values

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 11 16:38:58 PST 2022


Author: Matt Arsenault
Date: 2022-11-11T16:38:51-08:00
New Revision: 76db4e3c439e6bc2921690e501ba025998f4599d

URL: https://github.com/llvm/llvm-project/commit/76db4e3c439e6bc2921690e501ba025998f4599d
DIFF: https://github.com/llvm/llvm-project/commit/76db4e3c439e6bc2921690e501ba025998f4599d.diff

LOG: clang: Fix unnecessary truncation of resource limit values

Added: 
    

Modified: 
    clang/lib/CodeGen/CodeGenAction.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index b723a52fbdd59..8c12a6768d382 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -628,10 +628,9 @@ BackendConsumer::StackSizeDiagHandler(const llvm::DiagnosticInfoStackSize &D) {
   if (!Loc)
     return false;
 
-  // FIXME: Shouldn't need to truncate to uint32_t
   Diags.Report(*Loc, diag::warn_fe_frame_larger_than)
-      << static_cast<uint32_t>(D.getStackSize())
-      << static_cast<uint32_t>(D.getStackLimit())
+      << D.getStackSize()
+      << D.getStackLimit()
       << llvm::demangle(D.getFunction().getName().str());
   return true;
 }


        


More information about the cfe-commits mailing list