Skip to content
Open
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
4 changes: 3 additions & 1 deletion src/indexer/Indexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ void hdoc::indexer::Indexer::updateRecordNames() {
void hdoc::indexer::Indexer::updateMemberFunctions() {
for (auto& [k, c] : this->index.records.entries) {
for (auto& symbol : c.methodIDs) {
auto& f = this->index.functions.entries[symbol];
if (!this->index.functions.contains(symbol)) continue;

auto& f = this->index.functions.entries.at(symbol);
// split the proto into parts
std::string templatePart = f.proto.substr(0, f.postTemplate);
std::string preNamePart = f.proto.substr(f.postTemplate, f.nameStart - f.postTemplate);
Expand Down
5 changes: 5 additions & 0 deletions src/indexer/Matchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ static hdoc::types::SymbolID getTypeSymbolID(const clang::QualType& typ) {
void hdoc::indexer::matchers::FunctionMatcher::run(const clang::ast_matchers::MatchFinder::MatchResult& Result) {
const auto res = Result.Nodes.getNodeAs<clang::FunctionDecl>("function");

// We must either deliberately ignore deleted functions or document them as deleted. Doing neither will mean
// they show up as _defined_, which is the opposite of the truth. Not listing them is the easier way out; if
// we ever do want document them we should also document implicitly deleted constructors and functions.
if (res->isDeletedAsWritten()) return;

// Ignore deduction guides, at least for now
// (generally, these usually are designed to make things work as one would expect, so
// having documentation for them is not as important as for other things)
Expand Down