[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 06:42:07 PDT 2024


================
@@ -192,8 +192,10 @@ TEST(PreamblePatchTest, PatchesPreambleIncludes) {
   TU.AdditionalFiles["b.h"] = "";
   TU.AdditionalFiles["c.h"] = "";
   auto PI = TU.inputs(FS);
-  auto BaselinePreamble = buildPreamble(
-      TU.Filename, *buildCompilerInvocation(PI, Diags), PI, true, nullptr);
+  MockCompilationDatabase CDB;
+  auto BaselinePreamble =
+      buildPreamble(TU.Filename, *buildCompilerInvocation(PI, Diags), PI, true,
+                    /*RequiredModuleBuilder=*/nullptr, nullptr);
----------------
kadircet wrote:

yes, and I was trying to say that none of them are actually testing `buildPreamble`.

we should basically have some end-to-end tests for the behaviour around building a preamble with modules, and using that preamble to build some ASTs. all the new unittests you introduced are testing the behavior for new components (surely there's some coverage true lit-tests but we can do better).

https://github.com/llvm/llvm-project/pull/66462


More information about the cfe-commits mailing list