Consider this piece of code:
#include <iostream>
int main () {
std::string str = "not default";
std::cout << str << std::endl;
return 0;
}
Running clang-tidy -checks=* string.cpp
gives the following:
7800 warnings generated.
/tmp/clang_tidy_bug/string.cpp:4:21: warning: calling a function that uses a default argument is disallowed [fuchsia-default-arguments]
std::string str = "not default";
^
/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1/bits/basic_string.h:509:39: note: default parameter was declared here
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
^
Suppressed 7799 warnings (7799 in non-user code).
Is there some other argument that can be passed to make this warning go away? I am not really using any argument defaults here. But the implementation of std::string does.
Edit: Changed the code to simplify the test case.