| 35 | } |
| 36 | |
| 37 | std::vector<const clang::CXXMethodDecl *> |
| 38 | collectNonStaticClassMethods(const std::vector<clang::ASTUnit *> Srcs) { |
| 39 | const std::string Tag = "Tag"; |
| 40 | std::vector<const clang::CXXMethodDecl *> Result; |
| 41 | for (auto *Src : Srcs) { |
| 42 | if (!Src) |
| 43 | continue; |
| 44 | |
| 45 | auto &Ctx = Src->getASTContext(); |
| 46 | auto Matcher = cxxMethodDecl(unless(isStaticStorageClass())).bind(Tag); |
| 47 | for (const auto &Node : match(Matcher, Ctx)) { |
| 48 | const auto *Record = Node.getNodeAs<CXXMethodDecl>(Tag); |
| 49 | if (!Record) |
| 50 | continue; |
| 51 | Result.emplace_back(Record); |
| 52 | } |
| 53 | } |
| 54 | return Result; |
| 55 | } |
| 56 | |
| 57 | std::vector<Expr *> getArgExprs(Expr &E) { |
| 58 | std::vector<Expr *> Args; |