Author: Shafik Yaghmour
Date: 2025-04-09T13:31:52-07:00
New Revision: 12b1ed213ec55750e8fd59dfa44f6872186ed709

URL: 
https://github.com/llvm/llvm-project/commit/12b1ed213ec55750e8fd59dfa44f6872186ed709
DIFF: 
https://github.com/llvm/llvm-project/commit/12b1ed213ec55750e8fd59dfa44f6872186ed709.diff

LOG: [Clang] Add non static data member initializer for BindingDecl member 
Decomp (#134969)

Static analysis flagged BindingDecl Decomp member as not being
initialized during construction or by any other member function.

Fix is add a default initializer for it like the other member Binding.

Added: 
    

Modified: 
    clang/include/clang/AST/DeclCXX.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/DeclCXX.h 
b/clang/include/clang/AST/DeclCXX.h
index 56cec07ec0293..f0e25c4105f87 100644
--- a/clang/include/clang/AST/DeclCXX.h
+++ b/clang/include/clang/AST/DeclCXX.h
@@ -4166,7 +4166,7 @@ class StaticAssertDecl : public Decl {
 /// DecompositionDecl of type 'int (&)[3]'.
 class BindingDecl : public ValueDecl {
   /// The declaration that this binding binds to part of.
-  ValueDecl *Decomp;
+  ValueDecl *Decomp = nullptr;
   /// The binding represented by this declaration. References to this
   /// declaration are effectively equivalent to this expression (except
   /// that it is only evaluated once at the point of declaration of the


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

Reply via email to