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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits