From 36cabb95297eae8026069824c2627ad9997f5019 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 4 Oct 2024 21:57:59 +0800 Subject: [PATCH] Some update. --- include/Compiler/Compiler.h | 2 -- tests/Feature/CodeCompletion.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/Compiler/Compiler.h b/include/Compiler/Compiler.h index 2d824604..05b30b65 100644 --- a/include/Compiler/Compiler.h +++ b/include/Compiler/Compiler.h @@ -16,8 +16,6 @@ std::unique_ptr createInvocation(StringRef filename, std::unique_ptr createInstance(std::shared_ptr invocation); - - /// - build AST /// - build module /// - build preamble diff --git a/tests/Feature/CodeCompletion.cpp b/tests/Feature/CodeCompletion.cpp index c3d95d96..57da7b7b 100644 --- a/tests/Feature/CodeCompletion.cpp +++ b/tests/Feature/CodeCompletion.cpp @@ -62,6 +62,9 @@ TEST(clice, CodeCompletion) { instance->setCodeCompletionConsumer(new CodeCompletionConsumer()); auto action = std::make_unique(); + // FIXME: test with preamble build, note we need to set `MaxLines` to avoid the bound exceed the location of non + // self contained file. + if(!action->BeginSourceFile(*instance, instance->getFrontendOpts().Inputs[0])) { llvm::errs() << "Failed to begin source file\n"; std::terminate();