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

Function getFunctionDecl

lib/utils/ASTUtil.cpp:93–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93FunctionDecl *getFunctionDecl(Expr &E) {
94 if (auto *CE = dyn_cast<CallExpr>(&E))
95 return CE->getDirectCallee();
96
97 if (auto *CMCE = dyn_cast<CXXMemberCallExpr>(&E))
98 return CMCE->getDirectCallee();
99
100 if (auto *CCE = dyn_cast<CXXConstructExpr>(&E))
101 return CCE->getConstructor();
102
103 if (auto *CNE = dyn_cast<CXXNewExpr>(&E))
104 return CNE->getOperatorNew();
105
106 if (auto *CDE = dyn_cast<CXXDeleteExpr>(&E))
107 return CDE->getOperatorDelete();
108
109 return nullptr;
110}
111
112clang::CharSourceRange
113getMacroFunctionExpansionRange(const clang::SourceManager &SrcManager,

Callers 3

insertMacroNodeMethod · 0.50
getDiffNumArgsMethod · 0.50
isCallReturnMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected