[PATCH] D56442: [clangd] Fix a crash when reading an empty index file.

2019-01-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350633: [clangd] Fix a crash when reading an empty index file. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://revi

[PATCH] D56442: [clangd] Fix a crash when reading an empty index file.

2019-01-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D56442#1349666 , @ilya-biryukov wrote: > LGTM. Thanks for fixing this. > > A few questions for the long-term: > > - Should we consider removing the YAML support altogether? The motivation of the YAML is for debugging purpose (

[PATCH] D56442: [clangd] Fix a crash when reading an empty index file.

2019-01-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Thanks for fixing this. A few questions for the long-term: - Should we consider removing the YAML support altogether? - If we want to keep, are there non-private APIs that

[PATCH] D56442: [clangd] Fix a crash when reading an empty index file.

2019-01-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. Unfortunately, yaml::Input::setCurrentDocument() and yaml::Input::nextDocument() are internal APIs, the way we use them may cause a nullptr accessing when