File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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))
You can’t perform that action at this time.
0 commit comments