For issue https://github.com/llvm/llvm-project/issues/58723. Although we can't say the current status is good (enough), it should be good to add some tests to prevent the current status become worse.
Diff Detail
Event Timeline
clang-tools-extra/clangd/test/completion-modules2.test | ||
---|---|---|
14 | It looks redundant at the first sight. I know we can reduce the size by the following trick: #ifdef USE_EXPORT export #endif void printA() ... But this style will become very complex soon as long as the the size increases. An example could be found at: https://github.com/llvm/llvm-project/blob/main/clang/test/CXX/module/module.interface/p2.cpp. It was pretty painful for me to understand and edit the test cases. So I don't like such styles. I prefer the psychology that the somebody's redundancy is another's clearness. And the redundant test cases looks not a problem to me. |
The failed tests in windows says:
Failed to find compilation database for \\C:\ws\w9\llvm-project\premerge-checks\build\tools\clang\tools\extra\clangd\test\Output\completion-modules.test.tmp\Use.cpp
I think at this point we specifically don't want to commit to preserving particular modules behavior, this is more or less what the unsupported state means (https://github.com/clangd/clangd/issues/1293).
In particular the pattern where modules are built externally by clang, clang must be version-locked to clangd, and module content is never indexed, doesn't seem to be a good foundation for most users, so having the freedom to tear it down later seems better than encouraging people to rely on it.
clang-tools-extra/clangd/test/CMakeLists.txt | ||
---|---|---|
2 | A dependency on clang here probably isn't acceptable:
| |
clang-tools-extra/clangd/test/completion-modules.test | ||
2 | We generally find lit tests too hard to maintain for this sort of thing. In particular:
It's usually OK to have a single smoke test if needed, but generally these are written as unittests. |
A dependency on clang here probably isn't acceptable: