Mocking libraries for C++ like http://hippomocks.com require functions be labeled as virtual to mock the code. clang-analyzer-alpha.cplusplus.VirtualCall however complains about functions being labeled virtual when the function is labeled virtual for mocking, and not because there is an issue with calling derived classes.
That being said... I understand the need for this check. The only solution I can think of (outside of updating the C++ spec to better account for mocking), would be to macro "virtual" for functions that only need virtual for unit testing, and then only analyze non-unit tested code, but this approach seems very anti-C++.
Extended Description
Mocking libraries for C++ like http://hippomocks.com require functions be labeled as virtual to mock the code. clang-analyzer-alpha.cplusplus.VirtualCall however complains about functions being labeled virtual when the function is labeled virtual for mocking, and not because there is an issue with calling derived classes.
That being said... I understand the need for this check. The only solution I can think of (outside of updating the C++ spec to better account for mocking), would be to macro "virtual" for functions that only need virtual for unit testing, and then only analyze non-unit tested code, but this approach seems very anti-C++.