FileIndex and MergedIndex for clice (#271)

This commit is contained in:
ykiko
2025-10-05 22:46:32 +08:00
committed by GitHub
parent 4a184a26ce
commit 49caa2d9ba
22 changed files with 781 additions and 813 deletions

View File

@@ -75,8 +75,10 @@ public:
}
void handleAttrOccurrence(const clang::Attr* attr, clang::SourceRange range) {
assert(attr && "Invalid attribute");
assert(range.isValid() && "Invalid range");
if(!attr || range.isInvalid()) {
return;
}
if constexpr(!std::same_as<decltype(&SemanticVisitor::handleAttrOccurrence),
decltype(&Derived::handleAttrOccurrence)>) {
getDerived().handleAttrOccurrence(attr, range);
@@ -633,6 +635,7 @@ public:
}
bool VisitAttr(clang::Attr* attr) {
getDerived().handleAttrOccurrence(attr, attr->getRange());
return true;
}