| 5 | using namespace ast_matchers; |
| 6 | |
| 7 | void NamedDeclCallback::run(const MatchFinder::MatchResult &Result) { |
| 8 | for (auto MatcherTag : MatcherTags) { |
| 9 | const NamedDecl *FoundNamedDecl = |
| 10 | Result.Nodes.getNodeAs<NamedDecl>(MatcherTag); |
| 11 | |
| 12 | if (FoundNamedDecl) { |
| 13 | FoundNamedDecls[MatcherTag].emplace_back( |
| 14 | llvm::cast<NamedDecl>(FoundNamedDecl)); |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | const std::map<std::string, std::vector<const NamedDecl *>> |
| 20 | NamedDeclCallback::getFoundNamedDecls() const { |