[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE358658: [clangd] Emit better error messages when rename fails. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D60821?vs=195715&id=195717#toc Repository: rCTE

[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 195715. hokein marked an inline comment as done. hokein added a comment. Simplify the code further. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60821/new/ https://reviews.llvm.org/D60821 Files: clang-tools-

[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG, thanks! I do think it can be further simplified, but if not then land as-is. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:57 public: + RefactoringResult

[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:57 public: + RefactoringResultCollector(DiagnosticsEngine &DE) : Diags(DE) {} void handleError(llvm::Error Err) override { sammccall wrote: > why inject the DE here (and hand

[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 195701. hokein marked 4 inline comments as done. hokein added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60821/new/ https://reviews.llvm.org/D60821 Files: clang-tools-extra/cla

[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:57 public: + RefactoringResultCollector(DiagnosticsEngine &DE) : Diags(DE) {} void handleError(llvm::Error Err) override { why inject the DE here (and handle mapping error

[PATCH] D60821: [clangd] Emit better error messages when rename fails.

2019-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Currently we emit an unfriendly "clang diagnostic" message when rename fails. This patch makes clangd to emit a