[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340035: [clangd] Add a testcase for empty preamble. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50627 Files: clang-too

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161176. hokein marked an inline comment as done. hokein added a comment. Remove ASSERT_TRUE(bool(Preamble)). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50627 Files: unittests/clangd/TUSchedulerTests.cpp Index: unittests/clangd/TUSche

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-16 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, but note the comment: we don't need `ASSERT_TRUE(bool(Preamble))`. Comment at: unittests/clangd/TUSchedulerTests.cpp:333 + // We expe

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161000. hokein marked 2 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50627 Files: unittests/clangd/TUSchedulerTests.cpp Index: unittests/clangd/TUSchedulerTests.

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D50627#1198595, @hokein wrote: > I think this patch is in a good scope (for empty preamble). I'd leave it as > it is. The failure of GoTodefinition test is caused by an inconsistent > behavior of using `lastBuiltPreamble`/`NewPreamble`

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D50627#1196988, @ilya-biryukov wrote: > Maybe also add a test for find-definition that was broken before? (non-empty > preamble -> empty preamble -> bad gotodef that goes to included file instead > of the local variable) > To have a regressio

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Maybe also add a test for find-definition that was broken before? (non-empty preamble -> empty preamble -> bad gotodef that goes to included file instead of the local variable) To have a regression test against similar failures. Comment at: unit

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, javed.absar. clangd maintains the last good preamble for each TU and clang treats an empty preamble as an error, therefore, clangd will use the stale preamble for a