0
I looked up the instruction from https://www.kdab.com/clang-tidy-part-1-modernize-source-code-using-c11c14/
It says that, suppose we have a file test.cpp
struct Base {
virtual void reimplementMe(int a) {}
};
struct Derived : public Base {
virtual void reimplementMe(int a) {}
};
If we enter
clang-tidy -checks='modernize-use-override' -fix test.cpp -- -std=c++11
It will detect that the function reimplementMe in struct Derived forgets the override keyword. However, when I was doing this, clang-tidy didn't do anything for this problem.
My clang-tidy's version is 8.0.0. Although the version of clang-tidy used in that instruction is 3.9, I assume that this feature still exists in the latest version.
Is there anything wrong with my operation, or it's due to some bug in clang-tidy?
Thanks a lot.