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

Function getFunctionDecl

tests/TestASTUtils.cpp:124–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122};
123
124FunctionDecl *getFunctionDecl(ASTUnit &AST, std::string FuncName) {
125 for (auto D : AST.getASTContext().getTranslationUnitDecl()->decls()) {
126 if (auto clangF = D->getAsFunction()) {
127 if (clangF->getName() != FuncName)
128 continue;
129 return clangF;
130 }
131 }
132 return nullptr;
133}
134
135class TestStripConstExpr : public ::testing::Test {
136

Callers 2

TEST_FFunction · 0.70
TESTFunction · 0.70

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected