MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getType

Method getType

lib/clangimport.cpp:444–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444std::string clangimport::AstNode::getType(int index) const
445{
446 std::string type = getFullType(index);
447 if (type.find(" (") != std::string::npos) {
448 const std::string::size_type pos = type.find(" (");
449 type[pos] = '\'';
450 type.erase(pos+1);
451 }
452 if (type.find(" *(") != std::string::npos) {
453 const std::string::size_type pos = type.find(" *(") + 2;
454 type[pos] = '\'';
455 type.erase(pos+1);
456 }
457 if (type.find(" &(") != std::string::npos) {
458 const std::string::size_type pos = type.find(" &(") + 2;
459 type[pos] = '\'';
460 type.erase(pos+1);
461 }
462 return unquote(type);
463}
464
465std::string clangimport::AstNode::getFullType(int index) const
466{

Callers 1

Calls 3

unquoteFunction · 0.70
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected