cppcheck
cppcheck copied to clipboard
fixed some `modernize-use-emplace` false negatives with `std::stack` / removed `internalStlUsage` check
A ticket about this has been filed upstream: https://github.com/llvm/llvm-project/issues/56996.
The build fails because of
lib/tokenize.cpp:3470:15: error: The 'emplace' function shall be avoided for now. It is not available e.g. in Slackware [14](https://github.com/danmar/cppcheck/runs/7721081075?check_suite_focus=true#step:10:15).0. 'emplace_back' is fine. [internalStlUsage]
mScopeInfo.emplace(/*std::vector<std::pair<std::string, nonneg int>>()*/);
^
Slackware 14. uses GCC 4.7.1. Since we now require GCC 4.8 and we actually have that in our CI (via CentOS 7 and Ubuntu 14.04) and it works. So we can actually remove this check.