enabled and fixed `performance-enum-size` clang-tidy warnings
This totally throws off several premium-only checks...
CC @danmar
Nevermind - it only occurs in the regular version.
I am not able to reproduce these issues locally. I assume it is related to class : std::uint8_t which leads to it no longer being treated as an enum but as a class with inheritance.
Here's a reproducer:
struct S {
enum class E : std::uint8_t {
E0
};
void f(S::E e) {
if (e == S::E::E0) {}
}
char a[20];
};
Here's a reproducer:
Thanks. That's very much the example I tried. I can reproduce it now on a different system. Maybe there is a Windows/Linux difference. Will check tomorrow.
I filed https://trac.cppcheck.net/ticket/12564 for it.
In the regular selfcheck we only have passedByValue false positives. The additional ones are just with the premium version.
But there is also the following:
cli/processexecutor.cpp:72:1: debug: Scope::checkVariable found variable 'namespace' with varid 0. [varid0]
namespace {
^
lib/mathlib.h:39:5: debug: SymbolDatabase couldn't resolve all user defined types. [debug]
class value {
^
And with the unusedFunction selfcheck:
cli/processexecutor.cpp:77:0: style: The function 'PipeWriter' is never used. [unusedFunction]
explicit PipeWriter(int pipe) : mWpipe(pipe) {}
^
@danmar After this passes the selfcheck we need an updated premium version which includes all the related fixes so it can pass the CI.
Reduced FP: https://trac.cppcheck.net/ticket/12588
All fixed, thanks. Now we just need an updated premium version.
All fixed, thanks. Now we just need an updated premium version.
The related fixes are: 2b88ca8660411fba8eb3d22e9363a0994656a2fd 3170c17b32f415175b055da4a5b13a4b65d2c1b1 4503fbf6610381c8fa8ee7743846a094bae08b25
@danmar We need a 2.14-based premium in the CI for this to land.
The premium CI job is currently disabled because it started to interfere with other changes so this can be merged.