Skip to content

Commit 4f03375

Browse files
Update tokenize.cpp
1 parent 1e53b73 commit 4f03375

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/tokenize.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Cppcheck - A tool for static C/C++ code analysis
3-
* Copyright (C) 2007-2025 Cppcheck team.
3+
* Copyright (C) 2007-2026 Cppcheck team.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -1043,7 +1043,7 @@ void Tokenizer::simplifyTypedef()
10431043
if (t != ts.nameToken())
10441044
existing_data_type += t->str() + " ";
10451045
}
1046-
numberOfTypedefs[ts.name()].insert(existing_data_type);
1046+
numberOfTypedefs[ts.name()].emplace(std::move(existing_data_type));
10471047
continue;
10481048
}
10491049
}
@@ -3788,7 +3788,7 @@ void Tokenizer::simplifyParenthesizedLibraryFunctions()
37883788
if (!Token::simpleMatch(tok, ") ("))
37893789
continue;
37903790
Token *rpar = tok, *lpar = tok->link();
3791-
if (!lpar || (Token::Match(lpar->previous(), "%name%") && !lpar->previous()->isKeyword()))
3791+
if (!lpar || (Token::Match(lpar->previous(), "%name%") && !Token::Match(lpar->previous(), "return|delete|throw")))
37923792
continue;
37933793
const Token *ftok = rpar->previous();
37943794
if (mSettings.library.isNotLibraryFunction(ftok))

0 commit comments

Comments
 (0)