#pragma once #include #include #include #include #include namespace vls::modules { enum class ScanCommandError { invalid_context, missing_source, duplicate_source, relative_dependency_file, limit }; struct ScanInvocation { // Driver first, then the original checked arguments with the scan options // appended. The owning source is the final operand. std::vector arguments; }; // Derives a P1689 scan command from a checked compiler context. The driver and // owning source come from the context itself; the dependency file must be // absolute. Existing output, preprocess and dependency options are removed so // project metadata cannot select or duplicate the scan outputs. [[nodiscard]] std::expected build_scan_invocation(const Build::BuildContext &context, const ExpectedOutput &output, const std::filesystem::path &dependency_file); } // namespace vls::modules