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
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
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
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.
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`
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
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
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