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