https://github.com/shafik created 
https://github.com/llvm/llvm-project/pull/153671

Static analysis flagged that the non-static member Semantics was not 
initialized by the default default constructor. Fix is to initialize it using 
in class member initialization.

>From bd93d02c1d7d0ba27ad563a5e143b071fa3a8353 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour <shafik.yaghm...@intel.com>
Date: Thu, 14 Aug 2025 13:24:57 -0700
Subject: [PATCH] [Clang][Bytecode][NFS] Init Semantics non-static member of
 class Floating

Static analysis flagged that the non-static member Semantics was not initialized
by the default default constructor. Fix is to initialize it using in class
member initialization.
---
 clang/lib/AST/ByteCode/Floating.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/AST/ByteCode/Floating.h 
b/clang/lib/AST/ByteCode/Floating.h
index 659892e720abf..9561aee434d91 100644
--- a/clang/lib/AST/ByteCode/Floating.h
+++ b/clang/lib/AST/ByteCode/Floating.h
@@ -38,7 +38,7 @@ class Floating final {
     uint64_t Val = 0;
     uint64_t *Memory;
   };
-  llvm::APFloatBase::Semantics Semantics;
+  llvm::APFloatBase::Semantics Semantics{};
 
   APFloat getValue() const {
     unsigned BitWidth = bitWidth();

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to