[libcxx-commits] [PATCH] D143327: [libc++] Introduce __is_pointer_in_range

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 4 14:54:45 PST 2023


philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This checks whether a pointer is within a range, even during constant evaluation. This allows running optimized code paths during constant evaluation, instad of falling back to the general-purpose implementation all the time. This is also a central place for comparing unrelated pointers, which is technically UB.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143327

Files:
  libcxx/.clang-format
  libcxx/include/CMakeLists.txt
  libcxx/include/__config
  libcxx/include/__utility/is_pointer_in_range.h
  libcxx/include/string
  libcxx/test/libcxx/utilities/is_pointer_in_range.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143327.494854.patch
Type: text/x-patch
Size: 7441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230204/e760d7ae/attachment.bin>


More information about the libcxx-commits mailing list