Thanks
Version: e0014e1b023442e9c0e15609658a910c41436356 void test(bool a, bool b) { if (a) { return; } if (a || b) { // true positive for identicalConditionAfterEarlyExit return; } } template <bool a, bool b> constexpr void test_constexpr() { if constexpr (a) { return; } if constexpr (a || b) { // false negative for identicalConditionAfterEarlyExit if function is called, true positive if it is not called return; } } int main() { test(true, false); test_constexpr<true, false>(); return 0; }
Thanks for checking.
Might be worth mentioning that if &c == &b is replaced with c < 0 && b > 0, it triggers: Logical conjunction always evaluates to false: c < 0 && b > 0. [incorrectLogicOperator]
struct SomeStruct { SomeStruct(int a, int b) : a(a), b(b) {} int a, c[2]{0, 0}, b; }; [test.cpp:2]: (error) Member variable 'b' is initialized by itself. Tested with cppcheck-2.18.0
struct SomeStruct { SomeStruct(int a, int b) : a(a), b(b) {} int a, c[2]{0, 0}, b; }; [test.cpp:2]: (error) Member variable 'b' is initialized by itself.
I would like to thank you both Sylvain and Hongshe very much for your dedication and effort you put in your work that is pushing Task Coach forward, step by step, closer to a revived version that can hopefully reach more people. And also thanks to Aaron for his encouragement and will to keep being involved in the development and coordination of the project. It really gives me hope that the effort is worth it and, although these are busy times for me, I hope to be able to contribute more to it.
Reviving Task Coach development