| 1243 | } |
| 1244 | |
| 1245 | void SymbolDatabase::createSymbolDatabaseSetTypePointers() |
| 1246 | { |
| 1247 | std::unordered_set<std::string> typenames; |
| 1248 | for (const Type &t : typeList) { |
| 1249 | typenames.insert(t.name()); |
| 1250 | } |
| 1251 | |
| 1252 | // Set type pointers |
| 1253 | for (Token* tok = mTokenizer.list.front(); tok != mTokenizer.list.back(); tok = tok->next()) { |
| 1254 | if (!tok->isName() || tok->varId() || tok->function() || tok->type() || tok->enumerator()) |
| 1255 | continue; |
| 1256 | |
| 1257 | if (Token::simpleMatch(tok->next(), "<")) |
| 1258 | continue; |
| 1259 | |
| 1260 | if (typenames.find(tok->str()) == typenames.end()) |
| 1261 | continue; |
| 1262 | |
| 1263 | const Type *type = findVariableType(tok->scope(), tok); |
| 1264 | if (type) |
| 1265 | tok->type(type); |
| 1266 | } |
| 1267 | } |
| 1268 | |
| 1269 | void SymbolDatabase::createSymbolDatabaseSetSmartPointerType() |
| 1270 | { |