Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/lib/Lib/CorpusImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ format_duration(
mrdocs::Expected<std::unique_ptr<Corpus>>
CorpusImpl::
build(
report::Level reportLevel,
std::shared_ptr<ConfigImpl const> const& config,
tooling::CompilationDatabase const& compilations)
{
Expand Down Expand Up @@ -159,7 +158,7 @@ build(
// ------------------------------------------
// Traverse the AST for all translation units.
// This operation happens on a thread pool.
report::print(reportLevel, "Extracting declarations");
report::info("Extracting declarations");

// Get a copy of the filename strings
std::vector<std::string> files = compilations.getAllFiles();
Expand Down Expand Up @@ -187,15 +186,14 @@ build(
taskGroup.async(
[&, idx = ++index, path = std::move(file)]()
{
report::log(reportLevel,
"[{}/{}] \"{}\"", idx, files.size(), path);
report::debug("[{}/{}] \"{}\"", idx, files.size(), path);
processFile(path);
});
}
errors = taskGroup.wait();
}
// Print diagnostics totals
context.reportEnd(reportLevel);
context.reportEnd(report::Level::info);

// ------------------------------------------
// Report warning and error totals
Expand All @@ -216,7 +214,7 @@ build(
return Unexpected(results.error());
corpus->info_ = std::move(results.value());

report::log(reportLevel,
report::info(
"Extracted {} declarations in {}",
corpus->info_.size(),
format_duration(clock_type::now() - start_time));
Expand Down
2 changes: 0 additions & 2 deletions src/lib/Lib/CorpusImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class CorpusImpl : public Corpus
instance will be already populated. They will
not need to call this function directly.

@param reportLevel Error reporting level.
@param config A shared pointer to the configuration.
@param compilations A compilations database for the input files.
*/
Expand All @@ -88,7 +87,6 @@ class CorpusImpl : public Corpus
static
mrdocs::Expected<std::unique_ptr<Corpus>>
build(
report::Level reportLevel,
std::shared_ptr<ConfigImpl const> const& config,
tooling::CompilationDatabase const& compilations);

Expand Down
4 changes: 2 additions & 2 deletions src/test/TestRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ handleFile(
MrDocsCompilationDatabase compilations(
llvm::StringRef(parentDir), SingleFileDB(filePath), config, defaultIncludePaths);

report::setMinimumLevel(report::Level::warn);
// Build Corpus
auto corpus = CorpusImpl::build(
report::Level::debug, config, compilations);
auto corpus = CorpusImpl::build(config, compilations);
if(! corpus)
return report::error("{}: \"{}\"", corpus.error(), filePath);

Expand Down
3 changes: 1 addition & 2 deletions src/tool/GenerateAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ DoGenerateAction(
// --------------------------------------------------------------
MRDOCS_TRY(
std::unique_ptr<Corpus> corpus,
CorpusImpl::build(
report::Level::info, config, compilationDatabase));
CorpusImpl::build(config, compilationDatabase));
if (corpus->empty())
{
report::warn("Corpus is empty, not generating docs");
Expand Down
Loading