| 21 | } |
| 22 | |
| 23 | void TypeAnalyzer::collectEnums(const ASTUnit &Unit) { |
| 24 | const std::string Tag = "Tag"; |
| 25 | for (const auto &Node : |
| 26 | match(enumDecl().bind(Tag), |
| 27 | *const_cast<ASTContext *>(&Unit.getASTContext()))) { |
| 28 | auto *Record = Node.getNodeAs<EnumDecl>(Tag); |
| 29 | if (!Record) |
| 30 | continue; |
| 31 | |
| 32 | Report.addEnum(*Record); |
| 33 | } |
| 34 | } |