[libcxx-commits] [libcxx] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 17 14:27:52 PDT 2023
ldionne wrote:
> That depends on what we want to do with these kinds of issues in general. I think we should avoid making functions so complex. If we have a general consensus there, I think we should just suppress the warning with a todo that the function should be split up (or simplified some other way).
I think I agree. I just looked at the function and if this were code being committed today, it would likely never pass code review in that state (I'm not judging what was done at that time, but realistically we would ask for the function to be broken up -- I think).
@philnik777 is there a way to turn off clang-tidy warnings selectively? Do we simply use the usual pragma to disable diagnostics?
https://github.com/llvm/llvm-project/pull/67023
More information about the libcxx-commits
mailing list