Closed
Description
Description
The clang-tidy
pass modernize-return-braced-init-list
complains about constructors of std::vector
that are not initializers lists.
In particular, the constructor
vector( size_type count,
const T& value,
const Allocator& alloc = Allocator() );
should be ignored.
Versions Affected
Bug seen with LLVM 14.
Reproducer
#include <vector>
std::vector<double>
foo()
{
return std::vector<double>(4, 5); // {5, 5, 5, 5}
}
https://en.cppreference.com/w/cpp/container/vector/vector
X-Ref
Keywords
- clang-tidy
- clang-tools-extra