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

Method getType

lib/astirmap/ASTNode.cpp:103–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103QualType ASTNode::getType(const DynTypedNode &Node) const {
104 if (const auto *AST = Node.get<VarDecl>())
105 return AST->getType();
106
107 if (const auto *AST = Node.get<CXXCtorInitializer>()) {
108 auto *FD = AST->getAnyMember();
109 if (!FD)
110 throw std::runtime_error("Unknown nullptr of LLVM instance");
111 return FD->getType();
112 }
113
114 if (const auto *AST = Node.get<ReturnStmt>()) {
115 auto *RetValue = AST->getRetValue();
116 if (!RetValue)
117 return QualType();
118 return RetValue->getType();
119 }
120
121 if (const auto *AST = Node.get<Expr>())
122 return AST->getType();
123
124 assert(false && "Not implemented");
125}
126
127} // namespace ftg

Callers 15

handleMemoryCallMethod · 0.45
getFromArgMapMethod · 0.45
getConstVarDeclMethod · 0.45
isNullTypeMethod · 0.45
isTemplateTypeMethod · 0.45
checkMethod · 0.45
checkMethod · 0.45
hasConstRedeclsMethod · 0.45
isUndefinedTypeMethod · 0.45
checkMethod · 0.45
handleMethod · 0.45
solveMethod · 0.45

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.36
TESTFunction · 0.36