[clang] fdae557 - [clang] DeltaTree::AddDelta - fix "initialization is never read" clang-tidy warning. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 2 07:01:47 PST 2021
Author: Simon Pilgrim
Date: 2021-03-02T15:01:34Z
New Revision: fdae5573f54dd5f790630f5bba7f08bb00d62846
URL: https://github.com/llvm/llvm-project/commit/fdae5573f54dd5f790630f5bba7f08bb00d62846
DIFF: https://github.com/llvm/llvm-project/commit/fdae5573f54dd5f790630f5bba7f08bb00d62846.diff
LOG: [clang] DeltaTree::AddDelta - fix "initialization is never read" clang-tidy warning. NFCI.
Added:
Modified:
clang/lib/Rewrite/DeltaTree.cpp
Removed:
################################################################################
diff --git a/clang/lib/Rewrite/DeltaTree.cpp b/clang/lib/Rewrite/DeltaTree.cpp
index d27795c2f479..61467f84928f 100644
--- a/clang/lib/Rewrite/DeltaTree.cpp
+++ b/clang/lib/Rewrite/DeltaTree.cpp
@@ -458,7 +458,10 @@ void DeltaTree::AddDelta(unsigned FileIndex, int Delta) {
DeltaTreeNode::InsertResult InsertRes;
if (MyRoot->DoInsertion(FileIndex, Delta, &InsertRes)) {
- Root = MyRoot = new DeltaTreeInteriorNode(InsertRes);
+ Root = new DeltaTreeInteriorNode(InsertRes);
+#ifdef VERIFY_TREE
+ MyRoot = Root;
+#endif
}
#ifdef VERIFY_TREE
More information about the cfe-commits
mailing list