Issue 89754
Summary [clang-tidy][request] Flag use of empty init list in function call
Labels clang-tidy
Assignees
Reporter chrchr-github
    Readibility can be improved by specifying the type or using a literal. Maybe there could be an option to only consider fundamental types.
~~~c++
#include <vector>

void f(const std::vector<int>& v, bool b, int i, double d);
void g() {
    f({}, {}, {}, {});
    f(std::vector<int>(), false, 0, 0.0);
}
~~~
https://godbolt.org/z/Pfo3YYWGc
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to