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

Method getRealType

lib/type/Type.cpp:174–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172std::string Type::getNameSpace() const { return NameSpace; }
173
174const Type *Type::getRealType(bool ArrayElement) const {
175 // TODO: cover multi-dimensional array
176 const Type *Result = this;
177 while (Result && Result->isPointerType()) {
178 if (Result->isNormalPtr()) {
179 Result = Result->getPointeeType();
180 continue;
181 }
182
183 if (ArrayElement && Result->isArrayPtr()) {
184 Result = Result->getPointeeType();
185 } else {
186 break;
187 }
188 }
189 return Result;
190}
191
192size_t Type::getTypeSize() const { return TypeSize; }
193

Callers 4

addInputMethod · 0.80
genFuzzVarDeclMethod · 0.80
genFuzzVarAssignMethod · 0.80
setTypeMethod · 0.80

Calls 4

isPointerTypeMethod · 0.80
isNormalPtrMethod · 0.80
getPointeeTypeMethod · 0.80
isArrayPtrMethod · 0.80

Tested by

no test coverage detected