MCPcopy Create free account
hub / github.com/Samsung/UTopia / collectConstructors

Function collectConstructors

lib/utils/ASTUtil.cpp:16–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace util {
15
16std::vector<const clang::CXXConstructorDecl *>
17collectConstructors(const std::vector<clang::ASTUnit *> Srcs) {
18 const std::string Tag = "Tag";
19 std::vector<const clang::CXXConstructorDecl *> Result;
20 for (auto *Src : Srcs) {
21 if (!Src)
22 continue;
23
24 auto &Ctx = Src->getASTContext();
25 auto Matcher = cxxConstructorDecl().bind(Tag);
26
27 for (auto &Node : match(Matcher, Ctx)) {
28 auto *Record = Node.getNodeAs<CXXConstructorDecl>(Tag);
29 if (!Record)
30 continue;
31 Result.emplace_back(Record);
32 }
33 }
34 return Result;
35}
36
37std::vector<const clang::CXXMethodDecl *>
38collectNonStaticClassMethods(const std::vector<clang::ASTUnit *> Srcs) {

Callers 2

initializeRDAnalyzerMethod · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68