This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add a test case that verifies -fimplicit-modules work in Clangd when building the AST
Needs RevisionPublic

Authored by arphaman on Dec 16 2019, 6:27 PM.

Details

Summary

This patch adds a test case that verifies that -fmodules -fimplicit-modules work in Clangd when building the AST for Objective-C sources.

I based it on the test case attached to https://github.com/clangd/clangd/issues/198. I'm still looking into https://github.com/clangd/clangd/issues/198, but it might be unrelated to -fimplicit-modules support.

Diff Detail

Event Timeline

arphaman created this revision.Dec 16 2019, 6:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2019, 6:27 PM

Can we add a unit test instead of(or in addition to) this one?

I suppose it should be easy to right one using TestTU with ExtraArgs and AdditionalFiles

ilya-biryukov requested changes to this revision.Dec 17 2019, 1:49 AM

+1, please add a unit test instead.
We prefer to keep the number of lit tests in clangd minimal. They're mostly testing the LSP layer and other things which are hard to unit-test. -fimplicit-modules does not seem to be one of these things.

This revision now requires changes to proceed.Dec 17 2019, 1:49 AM

We do now have tests in unittests/ModulesTests.cpp that likely covers at least part of this?