Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jan 10, 2024
1 parent 7a89f07 commit ffcd313
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9665,6 +9665,7 @@ void Tokenizer::simplifyNamespaceStd()
if (Token::Match(tok->previous(), ".|::|namespace"))
continue;
const Library::Container* ctr{};
const Library::SmartPointer* ptr{};
if (Token::simpleMatch(tok->next(), "(")) {
if (isFunctionHead(tok->next(), "{"))
userFunctions.insert(tok->str());
Expand All @@ -9678,7 +9679,8 @@ void Tokenizer::simplifyNamespaceStd()
if (userFunctions.find(tok->str()) == userFunctions.end() && mSettings->library.matchArguments(tok, "std::" + tok->str()))
insert = true;
} else if (Token::simpleMatch(tok->next(), "<") &&
(mSettings->library.detectContainerOrIterator(tok, nullptr, /*withoutStd*/ true) || mSettings->library.detectSmartPointer(tok, /*withoutStd*/ true)))
(((ctr = mSettings->library.detectContainerOrIterator(tok, nullptr, /*withoutStd*/ true)) != nullptr && startsWith(ctr->startPattern, "std ::")) ||
((ptr = mSettings->library.detectSmartPointer(tok, /*withoutStd*/ true)) != nullptr && startsWith(ptr->name, "std::"))))
insert = true;
else if (mSettings->library.hasAnyTypeCheck("std::" + tok->str()) ||
mSettings->library.podtype("std::" + tok->str()) ||
Expand Down

0 comments on commit ffcd313

Please sign in to comment.