File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ class MRDOCS_VISIBLE
7878 iterator
7979 end () const noexcept = 0 ;
8080
81+ /* * Whether the corpus contains any symbols.
82+ */
83+ MRDOCS_DECL
84+ bool
85+ empty () const noexcept ;
86+
8187 /* * Return the Info with the matching ID, or nullptr.
8288 */
8389 MRDOCS_DECL
Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ Corpus::~Corpus() noexcept = default;
2828//
2929// ------------------------------------------------
3030
31+ bool
32+ Corpus::
33+ empty () const noexcept
34+ {
35+ return begin () == end ();
36+ }
37+
3138/* * Return the metadata for the global namespace.
3239*/
3340NamespaceInfo const &
Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ DoGenerateAction()
114114 CorpusImpl::build (
115115 report::Level::info, config, compilationDatabase));
116116
117+ if (corpus->empty ())
118+ {
119+ report::warn (" Corpus is empty, not generating docs" );
120+ return {};
121+ }
122+
117123 // --------------------------------------------------------------
118124 //
119125 // Generate docs
You can’t perform that action at this time.
0 commit comments