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

Method generateDeclTypeName

lib/generation/UTModify.cpp:175–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175std::string UTModify::generateDeclTypeName(const Type &T) const {
176 std::string TypeName = "";
177 if (T.isPointerType()) {
178 const auto *PointerT = &T;
179 const auto *PointeeT = PointerT->getPointeeType();
180
181 while (PointerT != PointeeT) {
182 TypeName += "*";
183 PointerT = PointeeT;
184 PointeeT = PointerT->getPointeeType();
185 }
186 assert(PointeeT && "Unexpected Program State");
187
188 TypeName = PointeeT->getASTTypeName() + " " + TypeName;
189 } else {
190 TypeName = T.getASTTypeName();
191 }
192 return util::stripConstExpr(TypeName);
193}
194
195void UTModify::generateFuzzVarDeclarations(
196 std::map<std::string, std::string> &FuzzVarDecls,

Callers

nothing calls this directly

Calls 4

stripConstExprFunction · 0.85
isPointerTypeMethod · 0.80
getPointeeTypeMethod · 0.80
getASTTypeNameMethod · 0.80

Tested by

no test coverage detected