This is a patch of add a testcase for https://reviews.llvm.org/D50628.
Details
Diff Detail
- Repository
- rCTE Clang Tools Extra
- Build Status
Buildable 21608 Build 21608: arc lint + arc unit
Event Timeline
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.
unittests/clangd/TUSchedulerTests.cpp | ||
---|---|---|
312 | Maybe call PrecompiledPreamble directly? it requires some setup, but tests the modified code without extra layers that TUScheduler adds. |
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 in TUScheduler, I will send out a separate patch fixing it (based on our discussion).
LGTM, but note the comment: we don't need ASSERT_TRUE(bool(Preamble)).
unittests/clangd/TUSchedulerTests.cpp | ||
---|---|---|
333 | Remove ASSERT_TRUE(bool(Preamble))? |
Maybe call PrecompiledPreamble directly? it requires some setup, but tests the modified code without extra layers that TUScheduler adds.