[clang-tools-extra] r365751 - [clangd] Add a missing "return nullptr; " to the SelectionTree::commonAncestor.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 11 03:06:25 PDT 2019
Author: hokein
Date: Thu Jul 11 03:06:24 2019
New Revision: 365751
URL: http://llvm.org/viewvc/llvm-project?rev=365751&view=rev
Log:
[clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.
This would fix some mysterious crashes on codeAction in clangd.
Modified:
clang-tools-extra/trunk/clangd/Selection.cpp
Modified: clang-tools-extra/trunk/clangd/Selection.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Selection.cpp?rev=365751&r1=365750&r2=365751&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Selection.cpp (original)
+++ clang-tools-extra/trunk/clangd/Selection.cpp Thu Jul 11 03:06:24 2019
@@ -364,6 +364,7 @@ const Node *SelectionTree::commonAncesto
// The tree only contains ancestors of the interesting nodes.
assert(!Ancestor->Children.empty() && "bad node in selection tree");
}
+ return nullptr;
}
} // namespace clangd
More information about the cfe-commits
mailing list