| 679 | } |
| 680 | |
| 681 | void clangimport::AstNode::setValueType(Token *tok) |
| 682 | { |
| 683 | for (int i = 0; i < 2; i++) { |
| 684 | const std::string &type = getType(i); |
| 685 | |
| 686 | if (type.find('<') != std::string::npos) |
| 687 | // TODO |
| 688 | continue; |
| 689 | |
| 690 | TokenList decl(mData->mSettings, tok->isCpp() ? Standards::Language::CPP : Standards::Language::C); |
| 691 | addTypeTokens(decl, type, tok->scope()); |
| 692 | if (!decl.front()) |
| 693 | break; |
| 694 | |
| 695 | ValueType valueType = ValueType::parseDecl(decl.front(), mData->mSettings); |
| 696 | if (valueType.type != ValueType::Type::UNKNOWN_TYPE) { |
| 697 | tok->setValueType(new ValueType(std::move(valueType))); |
| 698 | break; |
| 699 | } |
| 700 | } |
| 701 | } |
| 702 | |
| 703 | Scope *clangimport::AstNode::createScope(TokenList &tokenList, ScopeType scopeType, AstNodePtr astNode, const Token *def) |
| 704 | { |
no test coverage detected