We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
detectSmartPointer()
1 parent 3dbd78f commit fe6549eCopy full SHA for fe6549e
lib/library.cpp
@@ -1890,9 +1890,15 @@ bool Library::isSmartPointer(const Token* tok) const
1890
const Library::SmartPointer* Library::detectSmartPointer(const Token* tok, bool withoutStd) const
1891
{
1892
std::string typestr = withoutStd ? "std::" : "";
1893
- while (Token::Match(tok, "%name%|::")) {
1894
- typestr += tok->str();
+ if (tok->str() == "::")
1895
tok = tok->next();
+ while (Token::Match(tok, "%name% ::")) {
1896
+ typestr += tok->str();
1897
+ typestr += "::";
1898
+ tok = tok->tokAt(2);
1899
+ }
1900
+ if (tok && tok->isName()) {
1901
1902
}
1903
auto it = mData->mSmartPointers.find(typestr);
1904
if (it == mData->mSmartPointers.end())
0 commit comments