in glean/lang/clang/ast.cpp [1426:1448]
Fact<Cxx::Declarations> objcContainerMembers(
const clang::ObjCContainerDecl *decl) {
std::vector<Cxx::Declaration> members;
for (auto member : decl->decls()) {
if (auto method = clang::dyn_cast<clang::ObjCMethodDecl>(member)) {
if (auto d = objcMethodDecls(method)) {
members.push_back(Cxx::Declaration::objcMethod(d->decl));
}
}
if (auto property = clang::dyn_cast<clang::ObjCPropertyDecl>(member)) {
if (auto d = objcPropertyDecls(property)) {
members.push_back(Cxx::Declaration::objcProperty(d->decl));
}
}
if (auto ivar = clang::dyn_cast<clang::ObjCIvarDecl>(member)) {
if (auto d = varDecls(ivar)) {
members.push_back(Cxx::Declaration::variable(d->decl));
}
}
}
return db.fact<Cxx::Declarations>(std::move(members));
}