File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1324,6 +1324,9 @@ const Library::Container* Library::detectContainerInternal(const Token* const ty
1324
1324
{
1325
1325
if (!typeStart)
1326
1326
return nullptr ;
1327
+ if (typeStart->tokType () != Token::Type::eType && typeStart->tokType () != Token::Type::eName) {
1328
+ return nullptr ;
1329
+ }
1327
1330
const Token* firstLinkedTok = nullptr ;
1328
1331
for (const Token* tok = typeStart; tok && !tok->varId (); tok = tok->next ()) {
1329
1332
if (!tok->link ())
@@ -1889,6 +1892,11 @@ bool Library::isSmartPointer(const Token* tok) const
1889
1892
1890
1893
const Library::SmartPointer* Library::detectSmartPointer (const Token* tok, bool withoutStd) const
1891
1894
{
1895
+ if (tok->tokType () != Token::Type::eType && tok->tokType () != Token::Type::eName) {
1896
+ return nullptr ;
1897
+ }
1898
+
1899
+ // TODO: this is flawed and might result in lookups like "uint64_tflags_"
1892
1900
std::string typestr = withoutStd ? " std::" : " " ;
1893
1901
while (Token::Match (tok, " %name%|::" )) {
1894
1902
typestr += tok->str ();
You can’t perform that action at this time.
0 commit comments