#include <string> static void f2(std::string&&) { } static void f() { std::string const s; f2(s.c_str()); // readability-redundant-string-cstr warning }
For this case I decide to do nothing by skipping it in the matcher. Another way is to fix with 'std::move(s)' but I`m not sure that it is correct.
Missing a full stop at the end of the comment.