[llvm] ba46252 - Fix uninitialized pointer members in TableGen

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 03:57:34 PDT 2023


Author: Akshay Khadse
Date: 2023-04-18T18:57:05+08:00
New Revision: ba46252b69bb2b1c04e2479265acdf98e4576a21

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

LOG: Fix uninitialized pointer members in TableGen

Fixes static code analysis errors

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D148464

Added: 
    

Modified: 
    llvm/utils/TableGen/GlobalISel/GIMatchTree.h

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/GlobalISel/GIMatchTree.h b/llvm/utils/TableGen/GlobalISel/GIMatchTree.h
index 0ce4060fe7b40..c65423ddacdb0 100644
--- a/llvm/utils/TableGen/GlobalISel/GIMatchTree.h
+++ b/llvm/utils/TableGen/GlobalISel/GIMatchTree.h
@@ -390,7 +390,7 @@ class GIMatchTreeBuilder {
   /// The leaves that the resulting decision tree will distinguish.
   LeafVec Leaves;
   /// The tree node being constructed.
-  GIMatchTree *TreeNode;
+  GIMatchTree *TreeNode = nullptr;
   /// The builders for each subtree resulting from the current decision.
   std::vector<GIMatchTreeBuilder> SubtreeBuilders;
   /// The possible partitioners we could apply right now.


        


More information about the llvm-commits mailing list