fix(clang-tidy): Add cppcoreguidelines-init-vars,slicing, and throw-by-value-catch-by-reference checks (#3094)

* clang-tidy: guard against more UB behavior

* Remove slicing check for now
This commit is contained in:
Aaron Gokaslan
2021-07-13 09:54:32 -04:00
committed by GitHub
parent 6a644c8f04
commit 25e470c57d
7 changed files with 33 additions and 30 deletions

View File

@@ -92,7 +92,7 @@ TEST_SUBMODULE(numpy_vectorize, m) {
[](const py::array_t<int, py::array::forcecast> &arg1,
const py::array_t<float, py::array::forcecast> &arg2,
const py::array_t<double, py::array::forcecast> &arg3) {
py::ssize_t ndim;
py::ssize_t ndim = 0;
std::vector<py::ssize_t> shape;
std::array<py::buffer_info, 3> buffers{
{arg1.request(), arg2.request(), arg3.request()}};