Code completion (from Sema) (#144)

This commit is contained in:
ykiko
2025-07-07 11:32:16 +08:00
committed by GitHub
parent bfd6bbadbb
commit cce576dfdd
12 changed files with 1216 additions and 271 deletions

View File

@@ -141,6 +141,11 @@ std::expected<CompilationUnit, std::string> clang_compile(CompilationParams& par
return std::unexpected(std::format("Failed to execute action, because {} ", error));
}
if(instance->getDiagnostics().hasFatalErrorOccurred()) {
action->EndSourceFile();
return report_diagnostics("Fetal error occured!!!", *diagnostics);
}
std::optional<clang::syntax::TokenBuffer> tokBuf;
if(tokCollector) {
tokBuf = std::move(*tokCollector).consume();